Ezflow bug, can`t view passed vars ?! How please!

Author Message

Marvix Marx

Thursday 31 July 2008 10:40:10 am

Hi,

Am using ezflow to develop a site, in the blocks can`t show the default templates vars such $site,$current_user ... why ?

So, I tried to pass via vie :

 {attribute_view_gui attribute=$article_sidebar_object.data_map.page $user=$current_user}

didn`t work also .. how please .. could be a bug ?

THX

Gabriel Finkelstein

Thursday 31 July 2008 11:02:10 am

I think those variables are not defined everywhere. Maybe they only exist in the pagelayout.
Use:

{def $current_user=fetch( 'user', 'current_user' )}

Or pass variables without the $ sign:

{attribute_view_gui attribute=$article_sidebar_object.data_map.page user=$current_user}

Marvix Marx

Thursday 31 July 2008 11:47:49 am

tested .. didn`t work, and those vars should be available in all templates.

André R.

Thursday 31 July 2008 12:08:51 pm

> tested .. didn`t work, and those vars should be available in all templates.

Nope, only in pagelayout and included templates, you need to use the fetch as showed earlier here.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Marvix Marx

Saturday 02 August 2008 11:51:48 am

Oh I see ... thanks!

Marvix Marx

Wednesday 06 August 2008 2:15:15 pm

Maybe not a bug ,,, maybe I can`t figure it out ... mmaybe am ^!#$^#@

\templates\parts\extra.tpl

{def $current_userx=fetch( 'user', 'current_user' )}
{def $center_sidebar_class = fetch( 'content', 'class', hash( 'class_id', 'center_sidebar' ) )
      $center_sidebar_object = $center_sidebar_class.object_list[0]}
{attribute_view_gui attribute=$center_sidebar_object.data_map.page userx=$current_userx}

\override\templates\block\center_block_1.tpl

[{$userx|attribute(show)}]

Did`t work !

I can`t fetch $node from "center_block_1.tpl" ... as I know just in the pagelayout.tpl no more $node ..

Any idea ???

Marvix Marx

Thursday 07 August 2008 12:09:29 am

its work with $#node ... is this normal ?

André R.

Thursday 07 August 2008 12:33:33 am

Yes, cause the block template is in a different namespace then the node/view/full template where the variable is set, so by using # your accessing the global variable node.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

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