rubenvincenten Posted November 16, 2012 Share Posted November 16, 2012 (edited) How can I add a hook to a module for a specific theme? I have this FrontController class (/override/classes/controller/FrontController.php: class FrontController extends FrontControllerCore { // Can't use parent::initContent in IndexController override protected $addHomeHooks = false; public function initContent() { parent::initContent(); if ($this -> addHomeHooks) { $this -> context -> smarty -> assign(array( 'currentController' => get_class($this), 'HOOK_HOME_BANNER' => Hook::exec('displayHomeBanner'), 'HOOK_HOME_TEXT' => Hook::exec('displayHomeText'), )); } } } and /override/controllers/front/IndexController.php: class IndexController extends IndexControllerCore { protected $addHomeHooks = true; } Now I want to be able to add a function to the editorial module: public function hookDisplayHomeBanner(){ //... } Except themes/<themename>/modules/editorial/editorial.php does not seem to be included.. How can I do this? Edited November 16, 2012 by rubenvincenten (see edit history) Link to comment Share on other sites More sharing options...
rubenvincenten Posted November 27, 2012 Author Share Posted November 27, 2012 Bump Link to comment Share on other sites More sharing options...
Recommended Posts