$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.

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 31 2025 06:18:04
Script start
Timing: Jan 31 2025 06:18:04
Module start 'layout'
Timing: Jan 31 2025 06:18:04
Module start 'content'
Timing: Jan 31 2025 06:18:04
Module end 'content'
Timing: Jan 31 2025 06:18:04
Script end

Main resources:

Total runtime0.0143 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0051 588.2500151.2266
Module start 'layout' 0.00520.0022 739.476636.6797
Module start 'content' 0.00740.0057 776.156390.2813
Module end 'content' 0.01310.0013 866.437533.9922
Script end 0.0143  900.4297 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002316.3884140.0002
Check MTime0.00118.0055140.0001
Mysql Total
Database connection0.00064.037610.0006
Mysqli_queries0.002517.444430.0008
Looping result0.00000.076510.0000
Template Total0.00106.710.0010
Template load0.00085.279910.0008
Template processing0.00021.381910.0002
Override
Cache load0.00053.738310.0005
General
dbfile0.002013.692880.0002
String conversion0.00000.046640.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_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