Created
March 5, 2012 01:17
-
-
Save gratzc/1975777 to your computer and use it in GitHub Desktop.
Add modules external location to CB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Fired when the module is registered and activated. | |
*/ | |
function onLoad(){ | |
//get the current external locations | |
var modulesExternalLocation = controller.getSetting('modulesExternalLocation'); | |
//if the contentbox-modules isn't already part of the setting, add it and register/activate all modules | |
if (!arrayFind(modulesExternalLocation,"/contentbox-modules")) { | |
//get the module service | |
var ms = controller.getModuleService(); | |
//add the contentbox-modules to the setting | |
arrayAppend(modulesExternalLocation,'/contentbox-modules'); | |
controller.setSetting('modulesExternalLocation',modulesExternalLocation); | |
//register and activate all the modules now that we have more locations | |
ms.registerAllModules(); | |
ms.activateAllModules(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment