gg54 Posted December 3, 2014 Share Posted December 3, 2014 Hello, i'm trying to include the Homeslider (included in the prestahop base packaging) onto the cmd pages i created. In the install function of the homeslider.php module i registered my new hook : $this->registerHook('CMSslide') then i added my public function: public function hookCMSslide($params) { return $this->hookdisplayTopColumn($params); } Then added in my cms.tpl {hook h='CMSslide'} to display the slider So, i think i'm doing the things quite right, but i'm also missing something, but what? The main issue is my hook is displayed in the cms pages (if i return 'hello word' for example) but my slider is empty... Should anybody know why? Thanks a lot GD Link to comment Share on other sites More sharing options...
vekia Posted December 3, 2014 Share Posted December 3, 2014 you transplanted this module to your new hook? go to modules > positions and verify it, if module is not associated with your new hook - transplant it there Link to comment Share on other sites More sharing options...
gg54 Posted December 3, 2014 Author Share Posted December 3, 2014 Yes, in modules > positions my new hook is present. But the main issue is not the hook in fact, in home slider.tpl, there is this line: {if isset($homeslider_slides)} And that's why nothing is displayed, because the var $homeslider_slides is empty on the cms pages, but why?? Link to comment Share on other sites More sharing options...
gg54 Posted December 3, 2014 Author Share Posted December 3, 2014 The answer, in French: http://www.prestashop.com/forums/topic/339817-affichage-du-homeslider-sur-toutes-les-pages/?hl=%2Bhomeslider&do=findComment&comment=1880102 Comment following lines in homslider.php if (!isset($this->context->controller->php_self) || $this->context->controller->php_self != 'index') return; and in homeslider.tpl {if $page_name =='index'} I should have seeked a bit more the answer was just there! Thanks Vekia Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now