how to access $module_result

Author Message

Oliver Dzierzon

Wednesday 04 March 2009 9:00:32 am

Hello,

its me once again.

How can I access $module_result from outside the pagelayout.tpl template.

I have a override template in which I have to switch between two views

My override template full/filedownload.tpl has the following code.

{if $module_result.section_id | eq("15")}
	<div>{attribute_view_gui attribute=$object.contentobject_attributes[1] view="ezbinaryfilelist"}</div>
{else}
	<div>{attribute_view_gui attribute=$object.contentobject_attributes[1] view="ezbinaryfile"}</div>
{/if}

or which other method is avaiable to fetch the current section_id

thank you.

Ivo Lukac

Wednesday 04 March 2009 11:05:02 am

Hello Oliver,

you can't use $module_result in full view.

for section use $node.object.section_id or $object.section_id depending on what view template using

http://www.linkedin.com/in/ivolukac
http://www.netgen.hr/eng/blog
http://twitter.com/ilukac

Piotrek Karaƛ

Wednesday 04 March 2009 9:16:38 pm

$module_result variable actually holds of what was generated in the full view of a node, or a custom view. Views are <b>generated before</b> the pagelayout is, so there's no way to pass variables from pagelayout to view, but it is possible the other way round using <b>persistent variables</b>.

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

Oliver Dzierzon

Thursday 05 March 2009 1:50:17 am

Thank You !

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.