Jump to content

Hook names seem different than documentation


Recommended Posts

I am looking at the footer.tpl of the default theme. and the footer content hook is called as follows:

 

{$HOOK_FOOTER}

 

When looking at the documentation it is shown as: 

 

displayFooter

 

So how am I supposed to find the correct way to call the hook? The documentation only shows displayFooter (the old way?)

 

maybe I am just confused? 

Link to comment
Share on other sites

So how do I know where to look for where the smarty variable is binded to the hook name?

 

I ask because I want to know where to look for all the other hooks that are binded to the a smarty variable in the future. 

 

Are they all binded in the same file? Or is there some structure I should follow?

Link to comment
Share on other sites

It seems like a bunch of the smarty hooks are binded in  classes\controller\FrontController.php

 

I assume they are the front office hooks due to the file name. 

 

But it still seems a bit hard to find the smarty hook variable name. Is the normal way to just search through this file for what I need? 

 

Eventually I assume you just become more familiar with the names? 

Link to comment
Share on other sites

Well, i don't think there is a list with hook_name -> smarty_variable. Those names are pretty self-explaining though. When you see in footer.tpl variable called $HOOK_FOOTER it's pretty obvious what hook it's related to.

I search specific hook call or variable in source files when I need it. If I need hook related to product page I search it in product templates/controller just like you. In most cases just search for "hook" phrase in file and you get list of occurences.

Link to comment
Share on other sites

×
×
  • Create New...