public static function bootstrap() { // add/update module related layouts BLayout::i()->afterTheme('MyBootstrapClass::layout'); } public static function layout() { BLayout::i()->addLayout(array( // update base layout initialization, which is loaded for most pages 'base' => array( array('view', 'head', 'do'=>array( array('js', '{MyModule}/js/jquery.is.cool.js'), // declare a JS source from my module array('css', '{MyModule}/css/styles.css'), // my styles array('icon', '{MyModule}/favicon.ico'), // my app icon array('meta', 'meta-name', 'meta-value', true) // set http-equiv meta array('remove', 'js, '{AnotherModule}/js/file.js'), // remove script that was declared in another module array('addTitle', 'My Great App'), // add to existing title array('setTitleSeparator', ' | '), )), array('view', 'nav', 'do'=>array( array('addNav', 'my/url', 'Label for my url'), // add navigation item for my url )), ), // update a specific page identified by url. The convention is if it starts with slash it's a page, otherwise it has a special use '/my/url' => array( array('layout', 'base'), // load base layout before anything array('view', 'nav', 'do'=>array( array('setNav', 'my/url'), // set navigation active for current url )), array('hook', 'main', 'views'=>array('my/view')), // add my page view to main content hook ), )); }