Forums / Setup & design / ezFlow: How to get node properties..!?
Michael Fürst
Wednesday 06 August 2008 6:41:25 am
Hi there,
Short question:Is there a way to access the node properties from a ezFlow Block? The only variable that is awailable is $block. $node or $module_result are unavailable in the block template.
Does anyone have an idea? I'd like to display the "name" attribut of the actual node in a block placed on this node / site.
Tanks a lot & bye,Mike
Marvix Marx
Thursday 07 August 2008 12:08:59 am
I have the same problem ... http://ez.no/developer/forum/developer/ezflow_bug_can_t_view_passed_vars_how_please
But try $#node ...
Bin LIU
Thursday 07 August 2008 2:26:15 pm
Hi,
You can override the frontpage.tplthe line :
{attribute_view_gui attribute=$node.object.data_map.page}
By :
{attribute_view_gui attribute=$node.object.data_map.page node=$node view_parameters=$view_parameters [and all you want ... ...]}
Then you have the $node in zone.
=== Lagardère Active === Fetch random http://projects.ez.no/la_fetch_random LA Static Cache http://projects.ez.no/lastaticcache LA Bookmarks (jquery) http://projects.ez.no/labookmark LA Calendar (jquery) http://projects.ez.no/lacalendar My site ez http://lingping.info
Wednesday 03 September 2008 5:25:33 am
Thanks for this idea, but it seems not to work.I've created a new override tpl for frontpage.tpl. Override works.
I used node as parameter in this frontpage.tpl:
<div class="content-view-full"> <div class="class-frontpage"> <div class="attribute-page" {attribute_view_gui attribute=$node.object.data_map.page node=$node} </div> </div> </div>
And in my eZFlow Block on a "frontpage" i try to get the $node parameter:
{$node|attribute(show,1)}
But it seems that $node is null... Do you have any other idea??
Thanks a lot & regards,Michael
Sebastiaan van der Vliet
Wednesday 03 September 2008 5:32:13 am
Did you try this one already?
In pagelayout.tpl, add:
{def $this_node=fetch('content','node', hash( 'node_id', $module_result.node_id))} {set scope='global' $var='this_node'}
$this_node is then available in the block templates as $#this_node.
Certified eZ publish developer with over 9 years of eZ publish experience. Available for challenging eZ publish projects as a technical consultant, project manager, trouble shooter or strategic advisor.
Wednesday 03 September 2008 5:50:22 am
I just found out that i need to pass $node also throug the zone layout:
<b>frontpage.tpl:</b>
{attribute_view_gui attribute=$node.object.data_map.page node=$node}
<b>2zoneslayout1.tpl: (your zone file)</b>
{block_view_gui block=$block node=$node}
<b>myezflowblock.tpl (Block Template where node ID is required)</b>
{$node.node_id} -> WORKS!
Thanks for your inputs! Ciao,Mike