Forums / Install & configuration / sidemenu crashed after code before - closed

sidemenu crashed after code before - closed

Author Message

scrieler _

Friday 28 March 2008 12:52:07 am

hello, after written my code before the sidemenu in pagelayout.tpl
my sidemenu cant view...

{* Billboard *}
{def $pagelayout_node=fetch(content,node,hash(node_id,$module_result.node_id))}
{if $pagelayout_node.object.data_map.billboard.has_content}
<div class="attribute-billboard">
{content_view_gui view=billboard content_object=$pagelayout_node.object.data_map.billboard.content}
</div>
{/if}
{undef}
{* Billboard end *}

-----------------------

{* Billboard *}
{let $pagelayout_node=fetch(content,node,hash(node_id,$module_result.node_id))}
{if $pagelayout_node.object.data_map.billboard.has_content}
<div id="billboard">
{content_view_gui view=billboard content_object=$pagelayout_node.object.data_map.billboard.content}
</div>
{/if}
{/let}
{* Billboard end *}

it runs, dont know my mistake..

André R.

Friday 28 March 2008 3:21:25 am

I guess everything under -------- is the update to your post (next time, just reply instead).
You mistake is probably {undef}, witch undefines every variable in the current/same namespace (basically all variables earlier set with def).
So you should have written : {undef $pagelayout_node}

http://ez.no/doc/ez_publish/technical_manual/4_0/reference/template_functions/variables/undef

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

scrieler _

Friday 28 March 2008 4:56:46 am

ok, thanks to u, havent see it, that the variable needed in other functions.