Please help me with sections...

Author Message

enigmista enigmista

Thursday 24 July 2003 6:17:25 am

In ez2 there is a powerfool tools: section. With it i will can change the global pagelayout... with ez3?

Alex Jones

Thursday 24 July 2003 7:23:12 am

If you define a section you can then change the templates in override.ini.append for that entire section. So you can easilymake a section look totally different than other parts of the site.

Once a section is created you simply add an entry like the following to /settings/siteaccess/YOURSITE/override.ini.append to tell it to use a different template:

[pagelayout_different]
Source=pagelayout.tpl
MatchFile=pagelayout_different.tpl
Subdir=templates
Match[section]=10

Notes:
Change 'different' to whatever you want it to be - probably the section name would be best.
Make sure the number on the last line is the ID of the section as shown on the Sections page in setup.

I hope this answers your question. :)

Alex

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

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

laurent le cadet

Thursday 24 July 2003 7:28:07 am

Hi,

It's rather different now with eZ 3.1

You don't need any more to declare the section ID in the tpl name, e.g in the demo install pagelayout_mysite.tpl.
- Just name the pagelayout like you want and apply the design you want
- in settings/siteaccess/[your folder e.g demo]/override.ini.append

write few lines for each sections :

[pagelayout_yoursectionname]
Source=pagelayout.tpl
MatchFile=pagelayout_yoursectionname.tpl
Subdir=templates
Match[section]=13

13 (e.g) is the number of the section (yournamesection) you have create in admin.

Clear caches.

It works.

laurent

enigmista enigmista

Thursday 24 July 2003 7:51:04 am

ohh :))) i need this help tnx a lot. It works :))

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

Main resources:

Total runtime0.6124 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.0063 592.4609152.6250
Module start 'layout' 0.00630.0034 745.085939.4453
Module start 'content' 0.00970.6011 784.5313583.8516
Module end 'content' 0.61090.0015 1,368.382812.1641
Script end 0.6124  1,380.5469 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.5782160.0002
Check MTime0.00130.2198160.0001
Mysql Total
Database connection0.00120.188610.0012
Mysqli_queries0.547389.3725620.0088
Looping result0.00060.0949600.0000
Template Total0.582195.020.2910
Template load0.00250.407120.0012
Template processing0.579694.631420.2898
Template load and register function0.00040.063210.0004
states
state_id_array0.00030.054310.0003
state_identifier_array0.00150.244120.0007
Override
Cache load0.00210.3397370.0001
Sytem overhead
Fetch class attribute can translate value0.00060.099830.0002
Fetch class attribute name0.00130.205660.0002
XML
Image XML parsing0.00150.241130.0005
class_abstraction
Instantiating content class attribute0.00000.002160.0000
General
dbfile0.00120.1978220.0001
String conversion0.00000.001340.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/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
8content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
4content/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: 20
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs