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.

eZ debug

Timing: Jan 18 2025 03:00:02
Script start
Timing: Jan 18 2025 03:00:02
Module start 'content'
Timing: Jan 18 2025 03:00:03
Module end 'content'
Timing: Jan 18 2025 03:00:03
Script end

Main resources:

Total runtime1.3418 sec
Peak memory usage4,096.0000 KB
Database Queries197

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0090 589.1406180.8359
Module start 'content' 0.00901.1988 769.9766559.7891
Module end 'content' 1.20780.1339 1,329.7656336.7500
Script end 1.3417  1,666.5156 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00430.3242210.0002
Check MTime0.00160.1157210.0001
Mysql Total
Database connection0.00140.103210.0014
Mysqli_queries1.262894.11211970.0064
Looping result0.00230.16921950.0000
Template Total1.289096.120.6445
Template load0.00230.168420.0011
Template processing1.286795.895220.6434
Template load and register function0.00010.007410.0001
states
state_id_array0.00190.142110.0019
state_identifier_array0.00120.089720.0006
Override
Cache load0.00190.1405170.0001
Sytem overhead
Fetch class attribute can translate value0.00180.132630.0006
Fetch class attribute name0.00110.082860.0002
XML
Image XML parsing0.00110.085530.0004
class_abstraction
Instantiating content class attribute0.00000.001280.0000
General
dbfile0.00170.1288340.0001
String conversion0.00000.000530.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/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