I am still having a couple issues with modules and I am hoping someone can help me resolve them.
1.) Modules External Location - I have a stand along folder for this project (“c:\www\solitary”) that is not a part of any coldbox app. The documentation says that you can point to an external location and this is exactly what I need to do for development. However the following code does not seem to load my module (I added a mapping for this)
// Module Directives
modules = {
//Turn to false in production
autoReload = false,
// An array of modules names to load, empty means all of them
include = [],
// An array of modules names to NOT load, empty means none
exclude = []
};
modulesExternalLocation = ["/solitary"];
2.) layouts - in the config for the module there is an option for layoutParentLookup
“If true, coldbox checks for layouts in the parent overrides first, then in the module. If false, coldbox checks for layouts in the module first, then the parent.”
my module config
// If true, looks for views in the parent first, if not found, then in the module. Else vice-versa
this.viewParentLookup = true;
// If true, looks for layouts in the parent first, if not found, then in module. Else vice-versa
this.layoutParentLookup = true;
This is exactly what I want. Ultimately the layouts for this module should be handled by the parent application. When the module is first installed though I want some default layout to show the user the different views. In my module config I have
layoutSettings = {
defaultLayout = “layout.security.cfm”
};
So far everything is working great. Now I want the layout to be defined in the parent so I added a file to {project_root}/layouts/layout.security.cfm. When I reload the application the layout is still coming from the module. What am I doing wrong here. Can anyone verify that this works as it should?