Jump to content

Where is $HOOK_TOP being built?


ignytrr

Recommended Posts

HOOK_TOP is filled with data in FrontController, which the rest use as parent..

FrontController.php
Line: ~442
public function initContent()
{
.......
$this->context->smarty->assign(array(
	.......
	'HOOK_TOP' => Hook::exec('displayTop'),

 

Though, you don't really need to make core file modification just to run that new hook.

You can just as well run it once in your module's header hook...

 

Example (about making new CMS-page-after-content hook):

http://codelab.tk/co...-in-prestashop/

Link to comment
Share on other sites

1. create new hooks

2. modify modules, you need to add function which will handle your hook (and registerhook in install function)

3. transplant modules to your new hooks (modules -> positions -> transplant hook)

4. remove modules from hook_top (modules -> positions)

5. add {$HOOK_YOUR_HOOK} into template files (for example header.tpl)

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...