pagelayout for different sections

Author Message

Ndjientcheu Patrick

Friday 03 November 2006 11:13:55 pm

hi!
I would like to know if it is possible to have multiple pagelayout (file pagelayout.tpl) which correspond to different sections. If it is possible, how may i assign these layouts to corresponding sections?
Thanks.

Siniša Šehović

Saturday 04 November 2006 12:33:29 pm

Hi Patrick,

You can create template override for specific section.

The main pagelayout template is pagelayout.tpl

Best regards,
S.

---
If at first you don't succeed, look in the trash for the instructions.

Ndjientcheu Patrick

Sunday 05 November 2006 6:34:46 am

But, how can I specify that such-and-such pagelayout corresponds to such-and-such section?
Thanks.

Mark Marsiglio

Sunday 05 November 2006 6:52:11 am

In your override.ini.append.php file:

[pagelayout_mynewsection]
Source=pagelayout.tpl
MatchFile=pagelayout_sectionname.tpl
Subdir=templates
Match[section]=my_section

Where a new pagelayout file is called "pagelayout_sectionname.tpl" and a new section name is "my_section"

Another thing that we often do is use one pagelayout with switches for sections.

Even more ingenious (I think) is setting div id names tagged with the section ID -

<div id="header-design-{$DesignKeys:used.section}">

Then in our CSS, we have rules called:

div#header-design-1 {background: url(image1.jpg)}
div#header-design-5 {background: url(image5.jpg)}
div#header-design-6 {background: url(image6.jpg)}

This way we can have separate designs without maintaining multiple pagelayouts (as long as they are all based on the same structure).

http://www.thinkcreative.com
Turning Ideas Into Strategic Solutions

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

Main resources:

Total runtime0.7080 sec
Peak memory usage4,096.0000 KB
Database Queries62

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0072 587.9375152.6250
Module start 'layout' 0.00720.0037 740.562539.4453
Module start 'content' 0.01090.6956 780.0078598.3750
Module end 'content' 0.70650.0015 1,378.382812.1563
Script end 0.7080  1,390.5391 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00420.5958160.0003
Check MTime0.00150.2073160.0001
Mysql Total
Database connection0.00130.189310.0013
Mysqli_queries0.643090.8094620.0104
Looping result0.00070.1003600.0000
Template Total0.667994.320.3340
Template load0.00210.293020.0010
Template processing0.665894.040120.3329
Template load and register function0.00020.027110.0002
states
state_id_array0.00090.131110.0009
state_identifier_array0.00240.337120.0012
Override
Cache load0.00180.2555290.0001
Sytem overhead
Fetch class attribute can translate value0.00090.131930.0003
Fetch class attribute name0.00200.280970.0003
XML
Image XML parsing0.00170.236930.0006
class_abstraction
Instantiating content class attribute0.00000.002080.0000
General
dbfile0.00110.1561260.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
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
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
8content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 24
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs