Esnyper Posted December 10, 2012 Share Posted December 10, 2012 Hi, I now developing testimonials module. I have one small problem - in testimonials page (separate module page) not showing other modules which are hooked at custom hooks (header.tpl). What I am doing wrong? Link to comment Share on other sites More sharing options...
Alex Simonchik BelVG Posted December 10, 2012 Share Posted December 10, 2012 Hi, seem as you are not execute hooks at your custom controller. I meen Hook::exec() function. Regards Link to comment Share on other sites More sharing options...
Esnyper Posted December 20, 2012 Author Share Posted December 20, 2012 I added some lines at FrontController.php: class FrontController extends FrontControllerCore { public function initContent() { $this->process(); if (!isset($this->context->cart)) $this->context->cart = new Cart(); $this->context->smarty->assign(array( 'HOOK_HEADER' => Hook::exec('displayHeader'), 'HOOK_TOP' => Hook::exec('displayTop'), // Pridėti Hook'ai: 'HOOK_CART' => Hook::exec('displayCart'), 'HOOK_TOP_MENU' => Hook::exec('displayMeniu'), 'HOOK_FB_LIKE' => Hook::exec ('displayFB_LIKE'), // Iki čia... 'HOOK_LEFT_COLUMN' => ($this->display_column_left ? Hook::exec('displayLeftColumn') : ''), 'HOOK_RIGHT_COLUMN' => ($this->display_column_right ? Hook::exec('displayRightColumn', array('cart' => $this->context->cart)) : '') )); } } HOOK_TOP, HOOK_HEADER, HOOK_LEFT_COLUMN are working and showing everything correctly. HOOK_CART and HOOK_TOP_MENIU not working only in my custom module page... Link to comment Share on other sites More sharing options...
Alex Simonchik BelVG Posted December 21, 2012 Share Posted December 21, 2012 But why you override FrontController, do your module have own controller? Link to comment Share on other sites More sharing options...
Esnyper Posted December 23, 2012 Author Share Posted December 23, 2012 I think you don't understand me. I have testimonials module. In testimonials module page (where is all testimonials) - no meniu and cart modules showing. In index and all others pages meniu and cart modules are showing correctly. Sorry for my bad english... Link to comment Share on other sites More sharing options...
Recommended Posts