rom56 Posted December 17, 2012 Share Posted December 17, 2012 Hi :) , I'm currently editing my prestashop template. I tried to edit the header.tpl but I was suprised to find a variable called "$HOOK_TOP" instead of HTML code. I'm not able to find the definition of this HOOK variable.. Where can I find it and edit it? FYI, I'm looking for that variable to delete some links of my header Many thanks! :) Romain NIO Link to comment Share on other sites More sharing options...
NemoPS Posted December 17, 2012 Share Posted December 17, 2012 Hi, You should not edit the variable directly, since that hook serves for modules to be positioned in the header. Instead, depending on which links you want to delete, you can try editing the various modules' .tpl files. Go to modules -> position. Locate the "top of pages" hook, and see which modules are there. Afterwards, go to a module's folder, copy the tpl file inside your theme's folder /modules/modulename, and edit that directly. For more info about hooks: http://nemops.com/a-deeper-look-at-prestashop-hooks/ And about modules/positions: http://nemops.com/prestashop-modules/ And lastly, prestashop doc about overriding tpls: http://doc.prestashop.com/display/PS15/Overriding+default+behaviors Cheers! 1 Link to comment Share on other sites More sharing options...
rom56 Posted December 21, 2012 Author Share Posted December 21, 2012 Hi Nemo, Perfect ! That what I was looking for Thank you ! Link to comment Share on other sites More sharing options...
karthik@it-connects. Posted August 4, 2014 Share Posted August 4, 2014 I have pasted HOOK_HOME into header.tpl file. This results in a undefined index: Hook_home error. Any advice? Link to comment Share on other sites More sharing options...
vekia Posted August 4, 2014 Share Posted August 4, 2014 hook_home variable is defined for index.tpl file, it's not defined in frontOffice contorller this is why you've got problems instead of variable, try to use: {Hook::exec('home')} 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