Hooks Not Working

Hi guys I created this hook:



top_quick_links.override.tpl

{hook name=“index:top_links”}

test

{/hook}



in skin/customer/addons/my_changes/hooks/top_quick_links.override.tpl, tried hooks/index/top_quick_links.override.tpl and it still will not override. I have set compile to false in the smarty class, and also I have added ?cc/&cc onto my urls. What am I doing wrong? I also tried hook name=“index:top_quick)_links”.

You should also try clearing your Browser Cache (or completely disable it while changing template code)

For {hook name-“index:top_links”} for the my_changes addon your path should be:

skins//customer/addons/my_changes/hooks/index/top_links.override.tpl



Not sure what you’re trying to do but what you originally wrote makes no sense… You have a hook named index:top_links but you are referring to a top_quick_links.override.tpl file? Not sure where you’re deriving that name.

Hi, so something doesn’t have to be a hook to override it with a hook?

In order to override the data within the skin/customer/top_quick_links.tpl file, you should notice within that file the hook is called index:top_links, thus the file you must create to override this would be:



skin/customer/addons/my_changes/hooks/index/top_links.override.tpl



You could also name the file with “pre” or “post” instead of “override”; thus causing the additional data you supply in the new file to be before or after the existing block of data, instead of just purely overriding it, this is a preferred method typically.



Hope this helps!

Thank you. That explains it.

You might try reading: http:://www.ez-ms.com/docs/customizing_your_store.pdf



It describes template hooks in general and how they work. This was written before the my_changes addon was released so it uses a free addon created to demonstrate and provide structure called ‘local’. But it is NOT a requirement to doing what’s described in the document.