$module_result variable

Author Message

David Santiso

Monday 14 March 2011 3:39:57 am

Thanks,

I am printing

<span>{</span><span>$module_result</span>.<span>view_parameters</span><span>}</span>
...
<span>{</span><span>$module_result</span>.<span>node_id</span><span>}</span>
...

and others variables and it shows nothing.

Florin Daniel

Monday 14 March 2011 4:17:36 am

{$module_result} is an object i think.

By using the "attribute" template operator, it is possible to quickly inspect the contents of arrays and template objects. The operator creates an overview of available keys, attribute names and/or methods in an object or an array. By default, only the array keys and object attribute names (also called identifiers) are shown. By passing "show" as the first parameter, the operator will also display the values.

 

The second parameter can be used to control the number of levels/children that will be explored (the default setting is 2). The following example demonstrates how the operator can be used to inspect the contents of an "ezcontentobjecttreenode" object.

<span class="line">{$node|attribute( show, 1 )}</span>

Marko Žmak

Monday 14 March 2011 11:04:17 am

It also depends on the template in which you are trying to use the $module_result variable, It's available only in pagelayout.tpl.

So if you put this:

{$module_result|attribute(show)}

in your pagelayout.tpl it will output all the attributes (and their values) of the $module_result variable. But if you put this code in override templates, you'll get nothing.

Also note that not all modules have view parameters.

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

David Santiso

Monday 14 March 2011 12:22:27 pm

I'm using it in 2zoneslayout1.tpl. I want to display a unordered variable. I've seen that it appears in pagelayout.tpl.

How can I use that unordered variable in 2zoneslayout1.tpl?

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 30 2025 19:46:18
Script start
Timing: Jan 30 2025 19:46:18
Module start 'layout'
Timing: Jan 30 2025 19:46:18
Module start 'content'
Timing: Jan 30 2025 19:46:18
Module end 'content'
Timing: Jan 30 2025 19:46:18
Script end

Main resources:

Total runtime0.0253 sec
Peak memory usage6,144.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0059 588.1250151.2109
Module start 'layout' 0.00590.0039 739.3359220.6797
Module start 'content' 0.00980.0140 960.0156997.8984
Module end 'content' 0.02380.0016 1,957.914133.9766
Script end 0.0253  1,991.8906 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002710.6553140.0002
Check MTime0.00114.4570140.0001
Mysql Total
Database connection0.00072.805210.0007
Mysqli_queries0.003815.107630.0013
Looping result0.00000.050810.0000
Template Total0.00114.510.0011
Template load0.00093.515410.0009
Template processing0.00020.951010.0002
Override
Cache load0.00062.513510.0006
General
dbfile0.00197.434380.0002
String conversion0.00000.032940.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