Blog

Brad Wood

January 30, 2013

Spread the word


Share your thoughts

 

One of the handy things about the ColdBox settings CFC is you can store ad-hoc settings for your application which can be retrieved or injected anywhere in your application.  
 
Remember, since your settings config is just a struct in a CFC, you aren't limited to settings which are strings.  You can store pretty much any kind of setting that will fit into a ColdFusion variable.
 
// Custom Settings
settings = {
    useSkins = true,
    servers = ['web1','web2','web3','web4'],
    skinsPath = "views/skins",
    myUtil = createObject("component","#appmapping#.model.util.MyUtility")
};
 
// Add another late addition here
settings["setMe"] = {as = 'you wish'};
 
 
P.S. Don't forget, in your environment overrides you don't need to specify the entire settings struct again.  You can override individual settings by referencing them directly.
 
function stage() {
    settings.servers = ['stage1','stage2'];
}
 

Add Your Comment

Recent Entries

BoxLang v1.13.0: Compatibility, Concurrency, and Formatter Maturity

BoxLang v1.13.0: Compatibility, Concurrency, and Formatter Maturity

BoxLang 1.13.0 is here, and it marks an important step forward for the platform. This release includes 48 tickets—every one of them completed—reflecting a focused effort on CFML compatibility, a more robust concurrency engine, a production-hardened miniserver, and meaningful tooling improvements.

Luis Majano
Luis Majano
April 30, 2026
🚀 ColdBox CLI 8.11: The Era of AI Skills Comes to Every ColdBox & BoxLang App

🚀 ColdBox CLI 8.11: The Era of AI Skills Comes to Every ColdBox & BoxLang App

ColdBox CLI 8.11 is here, and it's one of the most significant releases we've shipped for AI-assisted development. This release wires the CLI directly into our brand new public skills directory at skills.boxlang.io, brings our AI tooling in line with industry-wide agent conventions, and introduces a wave of quality-of-life improvements that make AI integration feel less like setup and more like infrastructure.

Luis Majano
Luis Majano
April 30, 2026