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.

eZ debug

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

Main resources:

Total runtime0.0372 sec
Peak memory usage2,048.0000 KB
Database Queries4

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0057 587.8281180.8281
Module start 'content' 0.00570.0173 768.656394.0234
Module end 'content' 0.02310.0141 862.679770.7031
Script end 0.0372  933.3828 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00267.1043120.0002
Check MTime0.00133.3681120.0001
Mysql Total
Database connection0.00082.048310.0008
Mysqli_queries0.00267.017240.0007
Looping result0.00000.032620.0000
Template Total0.013235.510.0132
Template load0.00133.452610.0013
Template processing0.011932.009910.0119
Override
Cache load0.00082.115510.0008
General
dbfile0.00071.8786100.0001
String conversion0.00000.010930.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs