Thursday 31 July 2008 10:40:10 am - 7 replies
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
Saturday 02 August 2008 11:51:48 am
Oh I see ... thanks!
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 ???
Thursday 07 August 2008 12:09:29 am
its work with $#node ... is this normal ?
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.
You must be logged in to post messages in this topic!