Help Needed with getting a template over ride to work.

Author Message

Adam Butler

Thursday 02 April 2009 5:42:34 am

Hi

I've been trying to over ride a template for a folder - but no matter what i try nothing works - I have used the gui to create an over ride for a template - this is the current layout and I want to replace

extension/ezwebin/design/ezwebin/override/templates/full/folder.tpl

with my own scheduled_air_carriers_full_listing_ezflow.tpl

This is what I have after creating the folder with some test content

Requested template
node/view/full.tpl

Template
full/folder.tpl

Template loaded
extension/ezwebin/design/ezwebin/override/templates/full/folder.tpl

I have added the following over ride using the wizard

Overrides for </full/folder.tpl> template in <eng> siteaccess [5]
Default template resource:
extension/oagextension/design/ezflow/override/templates

Under the url

I have this over ride in ezpublish\settings\siteaccess\eng\override.ini.append.php

[scheduled_air_carriers_full_listing_webin]
Source=full/folder.tpl
MatchFile=scheduled_air_carriers_full_listing_webin.tpl
Subdir=templates

with template

ezpublish\extension\ezwebin\design\ezflow\override\templates\scheduled_air_carriers_full_listing_webin.tpl

However when I go to http://testserver/ezpublish/index.php/eng/Scheduled-Air-Carrier-Directory

I still get extension/ezwebin/design/ezwebin/override/templates/full/folder.tpl being displayed and not my over ride. The list of templates used to render the page gives no mention of my over ride and lists start template as node/view/full.tpl which then over riden by full/folder.tpl

if any one can help It would be much apprecaited as I've looked through the documentation and tried various things to try and get this to work and after a day I'm no further forward.
As you can guess I'm new user of ez publish.

Thanks

Adam

Neo Pixel

Friday 03 April 2009 1:39:55 am

I've had the same problem and as a last resort I've edited the actual tpl file within ezwebin and abandoned using the override template.

That's obviously not the way to do things within ezp but needs must.

Can anyone shed some light on this problem?

Thanks in advance :-)

Asking stupid questions so you don't have to!

André R.

Friday 03 April 2009 6:09:43 am

extension/ezwebin/design/ezwebin/override/templates/full/folder.tpl is already an override, you can not override an override using override.ini rules.

There are two choices:
1. placement override, override the above template in all conditions it is used (full view off all folder objects) by copying the template to your own design that has higher priority(see settings/siteaccess/*/site.ini Design settings) AND/OR same design name 'ezwebin' in your own extension that has higher priority(see setting/override/site.ini extension settings).

2. override.ini override, if you want just a specific node(or some other specific rule) to use another template then folder template, then add an override rule that looks like this:

[full_frontpage]
Source=node/view/full.tpl
MatchFile=full/root_node_2.tpl
Subdir=templates
Match[node]=2

Notice the Source, if you enable debug output and [TemplateSettings]ShowUsedTemplates=enabled (both in site.ini) it will be a lot easier to understand and debug.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

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 11:35:14
Script start
Timing: Jan 18 2025 11:35:14
Module start 'layout'
Timing: Jan 18 2025 11:35:14
Module start 'content'
Timing: Jan 18 2025 11:35:14
Module end 'content'
Timing: Jan 18 2025 11:35:14
Script end

Main resources:

Total runtime0.6754 sec
Peak memory usage4,096.0000 KB
Database Queries59

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0057 588.0547152.6406
Module start 'layout' 0.00570.0038 740.695339.4766
Module start 'content' 0.00940.6642 780.1719592.3359
Module end 'content' 0.67360.0017 1,372.507812.1250
Script end 0.6754  1,384.6328 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00390.5733160.0002
Check MTime0.00170.2510160.0001
Mysql Total
Database connection0.00080.113010.0008
Mysqli_queries0.609190.1775590.0103
Looping result0.00060.0961570.0000
Template Total0.634093.920.3170
Template load0.00250.365120.0012
Template processing0.631593.497520.3157
Template load and register function0.00020.028110.0002
states
state_id_array0.00610.909510.0061
state_identifier_array0.00130.189820.0006
Override
Cache load0.00220.3221500.0000
Sytem overhead
Fetch class attribute can translate value0.00080.120730.0003
Fetch class attribute name0.00120.183350.0002
XML
Image XML parsing0.00120.172930.0004
class_abstraction
Instantiating content class attribute0.00000.001850.0000
General
dbfile0.00100.1462240.0000
String conversion0.00000.001640.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
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
11content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
8content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 26
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs