/** * Implement event onRenderModule to include the module chrome provide by CANVAS * This event is fired by overriding ModuleHelper class * Return false for continueing render module * * @param object &$module A module object. * @param array $attribs An array of attributes for the module (probably from the XML). * * @return bool */ function onRenderModule(&$module, $attribs) { static $chromed = false; // Detect layout path in CANVAS themes if (defined('CANVAS_PLUGIN') && CANVAS::detect()) { // fix JA Backlink if ($module->module == 'mod_footer') { $module->content = CANVAS::fixJALink($module->content); } // Chrome for module if (!$chromed) { $chromed = true; // We don't need chrome multi times $chromePath = CANVASPath::getPath('html/modules.php'); if (file_exists($chromePath)) { include_once $chromePath; } } } return false; }