1 layout for overriding several sections

Author Message

Tore Skobba

Tuesday 04 November 2003 10:03:26 am

Hi all

I have a need for a pagelayout to override severeal sections..

My site is organized as follows:

News (section 1)
News A (section 2)
News B (section 3)

Where news A and B are only available for certain users. However, all News are to have a similar layout being distinctive different from the rest of the site. Therefore I made a new section (section 4) and a layout for it. My plan was that all news sections should use that layout.

Example of override file:

[pagelayout_section_4]
Source=pagelayout.tpl
MatchFile=pagelayout_section_4.tpl
Subdir=templates
Match[section]=2
Match[section]=3

However, this does not work. Only section 3 is using the new layout.

Anyone have any tips on this?

Cheers
Tore

Alex Jones

Tuesday 04 November 2003 10:28:43 am

You need to break out the sections into separate overrides like so:

[pagelayout_section_2]
Source=pagelayout.tpl
MatchFile=pagelayout_section_4.tpl
Subdir=templates
Match[section]=2

[pagelayout_section_3]
Source=pagelayout.tpl
MatchFile=pagelayout_section_4.tpl
Subdir=templates
Match[section]=3

Alex

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

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

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

Main resources:

Total runtime0.6799 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.0055 589.2891152.6406
Module start 'layout' 0.00550.0034 741.929739.4766
Module start 'content' 0.00890.6696 781.4063525.7656
Module end 'content' 0.67850.0014 1,307.17198.4375
Script end 0.6799  1,315.6094 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.4762160.0002
Check MTime0.00130.1861160.0001
Mysql Total
Database connection0.00070.096310.0007
Mysqli_queries0.630892.7761540.0117
Looping result0.00060.0914520.0000
Template Total0.646295.020.3231
Template load0.00230.331220.0011
Template processing0.644094.706920.3220
Template load and register function0.00020.023810.0002
states
state_id_array0.00080.119710.0008
state_identifier_array0.00090.136820.0005
Override
Cache load0.00170.2571350.0000
Sytem overhead
Fetch class attribute can translate value0.00090.131620.0004
Fetch class attribute name0.00110.163930.0004
XML
Image XML parsing0.00060.091320.0003
class_abstraction
Instantiating content class attribute0.00000.001330.0000
General
dbfile0.00070.0998160.0000
String conversion0.00000.001540.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/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
7content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
5content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/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: 17
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs