Forums / Setup & design / Template Override Question

Template Override Question

Author Message

David Wirth

Friday 29 January 2010 11:36:42 am

I modified advancedsearch.tpl (did some ugly array manipulation to get classes to be listed alphabetically in the select) and want to implement the revised version with a template override. I put the following in my override.ini for the admin siteaccess...

[revised_advancedsearch]
Source=content/advancedsearch.tpl
MatchFile=content/advancedsearch.tpl
Subdir=templates

This should work but it doesn't. I have double- and triple-checked and the paths are correct. I cleared the template, ini, and content caches. I have done several overrides successfully before so I know there is no general system issue. I thought this one might be tricky because there are no matching conditions but the eZ documentation tells me that's fine (using no match conditions means the override will always be applied).

Why isn't this working?

David Wirth

Friday 29 January 2010 12:28:44 pm

Nevermind, I guess. I got it working. I'm unclear on what the deal is with the 'admin' siteaccess vs. our 'admin_X' siteaccess but apparently I had to put the override in the 'admin_X' siteaccess. The original advancedsearch.tpl is in the admin siteaccess and there are other overrides over there. Go figure.

Peter Keung

Friday 29 January 2010 2:34:58 pm

If you're overriding a template that doesn't actually make use of an override condition (in other words, if you're overriding all uses of that template) then the best practice is to not use an override rule. Simply place your custom template in extension/yourextension/design/yourdesign/templates/content/advancedsearch.tpl (instead of yourdesign/override/...) in a design used in your siteaccess.

http://www.mugo.ca
Mugo Web, eZ Partner in Vancouver, Canada

David Wirth

Monday 01 February 2010 8:13:08 am

Thanks.