Why do some modules only work when hooked to certain hooks?
Is there a way to change this?
Welcome to the PrestaShop Forum! We hope you'll share your comments and suggestions with us. We ask that you please post in English to the main sections of the PrestaShop Forum. If you want to write in another language, please post in the corresponding PrestaShop Community section below.
Please note that PrestaShop Community sections are largely self-moderated. PrestaShop team members may or may not participate in non-English sections. To improve the chances of receiving feedback to your question or comment, please post it in English to the main sections of our Forum.

Vous parlez français ? par ici !
Please note that PrestaShop Community sections are largely self-moderated. PrestaShop team members may or may not participate in non-English sections. To improve the chances of receiving feedback to your question or comment, please post it in English to the main sections of our Forum.

Vous parlez français ? par ici !
Hooks and Positions
Started by Guest_Mogul_*, Jul 04 2009 10:58 PM
Hooks and Positions
#1 Guest_Mogul_*
Posted 04 July 2009 - 10:58 PM
#2 Guest__*
Posted 04 July 2009 - 11:32 PM
I have since located code inside the PHP file of each module which I think identifies different hooks. I don't know exactly how it works yet, but I believe it identifies hooks on which certain modules may or may not exist.
Anyone else figured this out?
Anyone else figured this out?
#3 Guest__*
Posted 05 July 2009 - 03:05 AM
Yes, each module has hook functions that define how the module should be displayed in different positions. If there is no hook for a position, then the module will not display if you put the module in that position. You can add a hook and simply have it display the same as another hook by using code like the following:
This code will display the module in the right column the same way as in the left column. You can do the same with other hooks.
I hope this helps.
function hookRightColumn($params)
{
return $this->hookLeftColumn($params);
}
This code will display the module in the right column the same way as in the left column. You can do the same with other hooks.
I hope this helps.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











