Article and templates

Author Message

Glenn MacGregor

Tuesday 02 December 2003 12:34:01 pm

Hi all,

I am having some trouble with articles and template files. I am using ezp3.2 on linux. I have overridden the article class under the full template and that works great, all articles are as I want them. Now I have created a new section "techsupport" and added a directory to that section "test". In that dir I added an article, which comes up as expected.

I want all articles in that section to look a bit different so I added a new template under 'full.tpl' with a class of 2 and section of 9 (which is techsupport). I have cleared the cache and the article still comes up with the class wide overridden template.

Is there a way to have a class wide override and then a more specific override for that class?

Thanks

Alex Jones

Tuesday 02 December 2003 12:49:58 pm

Yes, it is possible. Make sure that the more specific override (section + class) is above the less specific override (just the class) in your override.append.ini file. eZ publish will use the first override it reads that applies to the template, by placing the more specific one first you ensure that it is used for section 9, but not for other sections.

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

Marco Stipek

Thursday 15 January 2004 4:53:27 am

No it isn't! A specific override, e.g.:

[link_line_topnav]
Source=node/view/line.tpl
MatchFile=link_line_topnav.tpl
Subdir=templates
Match[class]=11
Match[section]=4

[generalview_link]
Source=node/view/line.tpl
MatchFile=node/view/line.tpl
Subdir=templates
Match[class]=11

Will result in an override of all Links with the more specific one. (I'm using ezpublish 3.3-1). If you change order, the more specific is completely ignored (as expected).

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

Main resources:

Total runtime0.7065 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.0071 589.0078152.6094
Module start 'layout' 0.00710.0038 741.617239.4141
Module start 'content' 0.01090.6940 781.0313565.1484
Module end 'content' 0.70500.0015 1,346.179712.1875
Script end 0.7065  1,358.3672 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00360.5157160.0002
Check MTime0.00140.1993160.0001
Mysql Total
Database connection0.00090.126110.0009
Mysqli_queries0.649891.9649590.0110
Looping result0.00070.0955570.0000
Template Total0.671595.020.3357
Template load0.00240.344420.0012
Template processing0.669094.691220.3345
Template load and register function0.00030.037510.0003
states
state_id_array0.00090.132810.0009
state_identifier_array0.00070.105620.0004
Override
Cache load0.00200.2858260.0001
Sytem overhead
Fetch class attribute can translate value0.00080.108830.0003
Fetch class attribute name0.00170.246540.0004
XML
Image XML parsing0.00070.101730.0002
class_abstraction
Instantiating content class attribute0.00000.001340.0000
General
dbfile0.00070.1046160.0000
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
3content/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/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.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: 13
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs