Template hook top.pre/post.tpl (admin area) issue?


I’m unable to hook into the index:top with post or pre in the admin area. This is an addon that should hook in with some link in top.tpl. Tried the following:



“Basic” is the main skin and it’s the only one available.

Only top.override.tpl works.

The tpl content is something like: (eg: top.post.tpl)

```php {* $Id: top.post.tpl 6321 2011-01-26 11:02:12Z 2tl $ *}


Am I missing something here? Or is this a bug? Thank you. Have a nice day.

And yes, I've cleared the cache.

I figured it out. It seems that the “Statistics” addon overrided the index:top hook. Solution: rename




I actually recently submitted a bug report due to this very issue, and it is reported as “Confirmed” currently, and I would like to presume it’ll get fixed some time soon:

Bug ID#: 2395


Note that overrides behave quite differently than pre or post. The highest priority override wins and it throws away any previous pre or post hooks. I submitted this as a bug through helpdesk about a year ago but was told it would break too many things to be done correctly (and semantically the same as pre/post). I suggested that an override simply override the original content and if there were multiples that they be concatenated together in their priority order. Other pre/post hooks would remain… Just two cents.

Note that since statistics just does ajax requests there is no reason for it to override anything. My guess is that is the defect they plan to correct. I would rename their top.override.tpl as top.pre.tpl.

Yup, that is entirely correct, and is why the statistics addon should be a pre or post, and not an override, so multiple things may hook into the same spot.