Template override conditions

Author Message

Fabien Scantamburlo

Wednesday 23 April 2008 1:14:57 am

Hi,

I need to override a template by mean of a condition.

My template is a node/view/*. I read in documentation the availability of "persistent_variable".

I tried to apply this override to call a node/view/product/news.tpl as following :

rule:

[news_product]
Source=node/view/full.tpl
MatchFile=product/news.tpl
Subdir=templates
Match[class_identifier]=news
Match[persistent_variable]=product

and set the <i>persistent_variable</i>
call:

{set scope=global persistent_variable='product'}

However, the full used is always the node/view/full/news.tpl

Thanks,

Fab.

André R.

Wednesday 23 April 2008 1:33:48 am

Read the comment(s) on the doc page:
http://ez.no/doc/ez_publish/technical_manual/4_0/reference/template_override_conditions#comment17895

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

Main resources:

Total runtime0.8070 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0057 589.0469152.6250
Module start 'layout' 0.00570.0026 741.671939.4453
Module start 'content' 0.00840.7972 781.1172533.7891
Module end 'content' 0.80560.0014 1,314.90638.1641
Script end 0.8070  1,323.0703 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.4281160.0002
Check MTime0.00180.2186160.0001
Mysql Total
Database connection0.00100.122410.0010
Mysqli_queries0.756293.7041540.0140
Looping result0.00060.0731520.0000
Template Total0.774496.020.3872
Template load0.00200.244220.0010
Template processing0.772495.711220.3862
Template load and register function0.00010.014010.0001
states
state_id_array0.00070.088210.0007
state_identifier_array0.00140.171420.0007
Override
Cache load0.00160.2010200.0001
Sytem overhead
Fetch class attribute can translate value0.00050.059920.0002
Fetch class attribute name0.00260.326140.0007
XML
Image XML parsing0.00310.380420.0015
class_abstraction
Instantiating content class attribute0.00000.000940.0000
General
dbfile0.00290.3576230.0001
String conversion0.00000.001040.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
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 14
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs