Jump to content

To call HOME hook in all other template files in prestashop


Recommended Posts

Hi guyzz...

 

So i got the banner module to work in the home hook in the index.tpl file....

So what i need is that i need to add this hook to the cms.tpl or any other tpl files for this matter..

 

I dont want the banner to show in certain pages so is there any way i can do this...

 

I tried adding the {$HOOK_HOME} in the tpl files but it seems this hook works only in the index.tpl page.

 

Please help me out guyzz...

Edited by trsakhilk (see edit history)
Link to comment
Share on other sites

Hi,

 

You need to execute the HOME hook in controller:

//1.4.x
self::$smarty->assign('HOOK_HOME', Module::hookExec('home'));
//1.5.x
$this->context->smarty->assign('HOOK_HOME', Hook::exec('displayHome'));

 

Regards

 

Once again you came to my rescue...

 

Thanks a lot...works like a charm...

Link to comment
Share on other sites

I think that the best way in your case is creating your own hook, instead of hook Home, becose when hook execute it run all modules register in that hook.

For cusomize "My wishlist page" you need to edit modules/blockwishlist/mywishlist.php.

 

Regards

 

Thats ok..i am using only a single module in the home hook...

 

Where in mywishlist.php should i add it...is the code different for it??

 

I tried adding the same code that you mentioned but it did not work...

Link to comment
Share on other sites

  • 4 weeks later...
×
×
  • Create New...