RE: [coldbox:16278] [coldbox-3.5.2] overriding module settings from host app on load

I haven’t tried this yet, but I would recommend reversing the logic a bit. The host app loads first, and then registers its modules. When the module loads, I would have it check for a setting in the host app and if found, is it. Otherwise, use it’s default.

if(controller.settingExists(‘mySettingName’)) {
settings.myModuleSetting = controller.getSetting(‘mySettingName’);
} else {
settings.myModuleSetting =‘DefaultValue’;



ColdBox Platform Evangelist
Ortus Solutions, Corp

ColdBox Platform: