Hook not pulling in for index.tpl

Hey All,

This has been driving me crazy for far too long so I thought I would finally ask for some help.

I have this line in my /skins//customer/index.tpl file just above the closing body tag

[HTML]{hook name=“index:footer”}{/hook}[/HTML]

Then I have a file containing some javascript tracking code in /skins//customer/addons/my_changes/hooks/index/footer.tpl

I cannot figure out how to get this hook to pull in! I’ve tried both footer.tpl and footer.post.tpl with no success. I clear the template cache each time before testing but nothing ever works. This has plagued me through the last 4 upgrades. I usually just give up and drop the javascript straight into the index.tpl file. Of course whenever I run an upgrade then, I have to remember to go put it back in which, of course, I usually forget.

I’m sure it is something simple I am overlooking but I can’t seem to track down the problem. Please help me from going crazy(ier).


A couple of things maybe.

First, since the hook is empty, maybe you have to do something like footer.override.tpl

Also, are you putting the JS in {literal}{/literal} tags?


Renaming the file to footer.override.tpl did the trick.


Don’t use override unless you really need to. Use post or pre instead. Like hitting the tack with a sledge hammer.

For some reason I can’t get post or pre to work. Override does. It’s not really overriding anything as there is no other footer.tpl so I’m sticking with what works.

If pre or post is not working then an addon with a higher priority is doing an override. I’m guessing your override is of equal or higher priority that the previous so it negates whatever that addon was trying to do.

Override is very over-used. It should only be used when necessar and where exclusive use is desired.