-
Notifications
You must be signed in to change notification settings - Fork 2
Adding A Module
akersten edited this page Oct 23, 2012
·
2 revisions
The design of the Webfront is fairly modular in that you can extend the module class in /modules and easily create a new 'tab' on the navbar with your custom content. This is fairly straightforward (and 'nicely' documented in /modules/modules) but the process is as follows:
- Create a new module file in
/modulesnamedyourModule.php(look at the others for an idea of the convention) - Extend
modulebyclass yourModule extends module. No need to include or require/modules/module.php- it's taken care of byglobalHeader.php - Add your module to the initialization of the module array in
/php/session.php- the order that these are initialized in is the order in which they will display on the navbar. See the other entries for an example of how this is done (at the most basic level, it's justnew yourModule()in the array initialization).
If your module is extending another module other than module, then you'll need to add that other module explicitly to the require list in /php/imports.php, just like /modules/module.php in that file.