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.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 05:17:17
Script start
Timing: Jan 18 2025 05:17:17
Module start 'layout'
Timing: Jan 18 2025 05:17:17
Module start 'content'
Timing: Jan 18 2025 05:17:18
Module end 'content'
Timing: Jan 18 2025 05:17:18
Script end

Main resources:

Total runtime0.9076 sec
Peak memory usage4,096.0000 KB
Database Queries60

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0048 587.9141152.6250
Module start 'layout' 0.00490.0024 740.539139.4453
Module start 'content' 0.00730.8987 779.9844554.7109
Module end 'content' 0.90600.0015 1,334.695312.1641
Script end 0.9075  1,346.8594 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00360.3918160.0002
Check MTime0.00130.1474160.0001
Mysql Total
Database connection0.00080.091710.0008
Mysqli_queries0.854894.1803600.0142
Looping result0.00060.0651580.0000
Template Total0.874196.320.4370
Template load0.00260.287020.0013
Template processing0.871596.018820.4357
Template load and register function0.00010.012610.0001
states
state_id_array0.00110.126510.0011
state_identifier_array0.00180.200520.0009
Override
Cache load0.00210.2345170.0001
Sytem overhead
Fetch class attribute can translate value0.00080.089620.0004
Fetch class attribute name0.00120.131660.0002
XML
Image XML parsing0.00110.121820.0006
class_abstraction
Instantiating content class attribute0.00010.007680.0000
General
dbfile0.00100.1150230.0000
String conversion0.00000.000940.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
4content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 16
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs