Forums / Setup & design / pagelayout for different sections

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

eZ debug

Timing: Jan 18 2025 19:22:18
Script start
Timing: Jan 18 2025 19:22:18
Module start 'content'
Timing: Jan 18 2025 19:22:19
Module end 'content'
Timing: Jan 18 2025 19:22:19
Script end

Main resources:

Total runtime0.8931 sec
Peak memory usage4,096.0000 KB
Database Queries199

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0076 588.8516180.8281
Module start 'content' 0.00760.7200 769.6797603.4531
Module end 'content' 0.72750.1655 1,373.1328337.3984
Script end 0.8930  1,710.5313 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00420.4755210.0002
Check MTime0.00150.1711210.0001
Mysql Total
Database connection0.00100.110110.0010
Mysqli_queries0.807490.40191990.0041
Looping result0.00290.31951970.0000
Template Total0.849295.120.4246
Template load0.00220.248520.0011
Template processing0.847094.835120.4235
Template load and register function0.00010.012310.0001
states
state_id_array0.00180.204710.0018
state_identifier_array0.00210.237120.0011
Override
Cache load0.00190.2113290.0001
Sytem overhead
Fetch class attribute can translate value0.00300.334440.0007
Fetch class attribute name0.00130.148370.0002
XML
Image XML parsing0.00190.209640.0005
class_abstraction
Instantiating content class attribute0.00000.001580.0000
General
dbfile0.00440.4901370.0001
String conversion0.00000.000830.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 24
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs