Accessing section_id

Author Message

Mike Cohen

Wednesday 26 February 2003 10:09:42 am

Is is possible to access the section_id in the pagelayout.tpl or any of the templates?

I've tried {$node.section_id} and {$section.section_id} to no avail.

Bruce Morrison

Wednesday 26 February 2003 3:07:52 pm

> Is is possible to access the section_id in the
> pagelayout.tpl or any of the templates?
>
> I've tried {$node.section_id} and {$section.section_id} to
> no avail.

$DesignKeys:used.section

is what you are looking for.
Bruce

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

Mike Cohen

Wednesday 26 February 2003 8:16:34 pm

> > Is is possible to access the section_id in the
> > pagelayout.tpl or any of the templates?
> >
> > I've tried {$node.section_id} and {$section.section_id}
> to
> > no avail.
>
> $DesignKeys:used.section
>
> is what you are looking for.
> Bruce

That is it, thanks Bruce,

Mike

Volker Lenz

Thursday 27 February 2003 2:09:28 am

> > > Is is possible to access the section_id in the
> > > pagelayout.tpl or any of the templates?
> > >
> > > I've tried {$node.section_id} and
> {$section.section_id}
> > to
> > > no avail.
> >
> > $DesignKeys:used.section
> >
> > is what you are looking for.
> > Bruce
>
> That is it, thanks Bruce,
>
> Mike

$DesignKeys is a way to know the section you are actually in. In order to retrieve a section assigned to a current content object you may issue:

let sectionID=cond(is_unset($node),'0',$node.object.section_id)

Jan Borsodi

Thursday 27 February 2003 7:00:30 am

> > > > Is is possible to access the section_id in the
> > > > pagelayout.tpl or any of the templates?
> > > >
> > > > I've tried {$node.section_id} and
> > {$section.section_id}
> > > to
> > > > no avail.
> > >
> > > $DesignKeys:used.section
> > >
> > > is what you are looking for.
> > > Bruce
> >
> > That is it, thanks Bruce,
> >
> > Mike
>
> $DesignKeys is a way to know the section you are actually
> in. In order to retrieve a section assigned to a current
> content object you may issue:
>
> let
> sectionID=cond(is_unset($node),'0',$node.object.section_id)

An easier way:
let sectionID=first_set($node.object.section_id,0)

--
Amos

Documentation: http://ez.no/ez_publish/documentation
FAQ: http://ez.no/ez_publish/documentation/faq

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

Main resources:

Total runtime0.8276 sec
Peak memory usage4,096.0000 KB
Database Queries67

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0063 587.9141152.6250
Module start 'layout' 0.00630.0029 740.539139.4453
Module start 'content' 0.00930.8172 779.9844642.9063
Module end 'content' 0.82650.0011 1,422.890616.1719
Script end 0.8275  1,439.0625 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.4070160.0002
Check MTime0.00150.1868160.0001
Mysql Total
Database connection0.00080.101410.0008
Mysqli_queries0.766192.5684670.0114
Looping result0.00060.0751650.0000
Template Total0.791395.620.3956
Template load0.00210.255120.0011
Template processing0.789195.355520.3946
Template load and register function0.00020.026010.0002
states
state_id_array0.00210.259510.0021
state_identifier_array0.00110.130320.0005
Override
Cache load0.00190.2304760.0000
Sytem overhead
Fetch class attribute can translate value0.00120.148840.0003
Fetch class attribute name0.00100.123880.0001
XML
Image XML parsing0.00150.176240.0004
class_abstraction
Instantiating content class attribute0.00000.001680.0000
General
dbfile0.00100.1151290.0000
String conversion0.00000.000840.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
5content/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
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
6content/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: 23
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs