Forums / Install & configuration / Accessing section_id
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
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