Forums / Setup & design / $module_result and splitting up content

$module_result and splitting up content

Author Message

Emma Williams

Monday 16 April 2007 10:25:33 pm

I'm editing a template file which is currently outputting all the content using:

{$module_result.content}

I want to output the attributes within the folder (ie."name", "short_description" etc) separately however. I've tried using:

{def $pagelayout_node=fetch(content,node,hash(node_id,$module_result.node_id))}
and then
{$pagelayout_node.name}
and
{$pagelayout_node.short_description}

But I am just getting the name of the folder as it's called in the tree menu. I want the attributes "name", "short_description" etc from the folder itself instead. I guess I am missing a step, I'm just not sure what it is.

Piotrek Karaƛ

Monday 16 April 2007 10:47:47 pm

The values you're looking for are not directly available in the fetch result variable, but a bit deeper in the data_map array:

$pagelayout_node.data_map.*

I recommend using inspection:
http://ez.no/doc/ez_publish/technical_manual/3_8/templates/the_template_language/array_and_object_inspection

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu

Emma Williams

Tuesday 17 April 2007 3:14:14 am

Great, I have it working now. Thanks for pointing me in the right direction.