sackling Posted April 10, 2014 Share Posted April 10, 2014 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 More sharing options...
deuterit Posted April 10, 2014 Share Posted April 10, 2014 (edited) {$HOOK_FOOTER} is variable in Smarty not hook name. So when hook "displayFooter" is called its result (html code) is binded in Smarty template to variable named {$HOOK_FOOTER}. Edited April 10, 2014 by deuterit (see edit history) Link to comment Share on other sites More sharing options...
sackling Posted April 10, 2014 Author Share Posted April 10, 2014 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 More sharing options...
sackling Posted April 10, 2014 Author Share Posted April 10, 2014 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 More sharing options...
deuterit Posted April 11, 2014 Share Posted April 11, 2014 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 More sharing options...
Recommended Posts