osit Posted October 14, 2010 Share Posted October 14, 2010 Hi, I have some problem with undarstanding prestashop structure.index.tpl in theme’s directory by default contains only {$HOOK_HOME}so where is this hook actually defined? Link to comment Share on other sites More sharing options...
razaro Posted October 14, 2010 Share Posted October 14, 2010 It is defined in index.php in root folder. $smarty->assign('HOOK_HOME', Module::hookExec('home')); Some links about hookshttp://ardianys.com/64_how-to-add-new-hook-prestashop-engine-modification-tutorial-series.htmlhttp://www.nethercottconstructions.com/content/27-prestashop-hookshttp://www.smaizys.com/prestashop/how-to-create-custom-prestashop-hook/ Link to comment Share on other sites More sharing options...
osit Posted October 22, 2010 Author Share Posted October 22, 2010 ok, but i still cant find this code for HOME.My question is where I can find html/php code for HOMEor elements of HOME. I saw where it's defined but no information what it contains and where to look for it. Can u help me with that? Link to comment Share on other sites More sharing options...
razaro Posted October 22, 2010 Share Posted October 22, 2010 In second link home Homepage content Allows you to add code to the center column on the homepage only. It is called in index.php and then displayed in index.tpl. And go to Back Office >> Modules >> Positions and under Homepage content you see list of modules that are "hooked" to HOME.So any module that you want to be displayed on homepage must have this function in modules php code function hookHome($params) { // here is called modules tpl file like return $this->display(__FILE__, 'editorial.tpl'); } 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