Using modules in headers and footers

Since the header.php and footer.php files are pure PHP and not parsed by Unicity CMS, if you wish to use modules within these files, for example to include a menu, they have to be written in PHP instead of using Unicity shortcodes.

Each module has an index.php file which must be loaded using include_once, for example for the module sectionmenu:

include_once("modules/sectionmenu/index.php");

Then to use the module, call and print the function with the name of the module, passing any parameters (comma separated, as with any PHP function):

print( sectionmenu( 1 ) );