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.

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

eZ debug

Timing: Jan 31 2025 06:12:49
Script start
Timing: Jan 31 2025 06:12:49
Module start 'layout'
Timing: Jan 31 2025 06:12:49
Module start 'content'
Timing: Jan 31 2025 06:12:49
Module end 'content'
Timing: Jan 31 2025 06:12:49
Script end

Main resources:

Total runtime0.0190 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0099 588.3672151.2266
Module start 'layout' 0.00990.0033 739.593836.6797
Module start 'content' 0.01320.0045 776.273490.2188
Module end 'content' 0.01770.0013 866.492233.9922
Script end 0.0190  900.4844 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002512.9810140.0002
Check MTime0.00094.9075140.0001
Mysql Total
Database connection0.00178.697910.0017
Mysqli_queries0.004624.080030.0015
Looping result0.00000.084010.0000
Template Total0.00094.910.0009
Template load0.00073.518310.0007
Template processing0.00031.341610.0003
Override
Cache load0.00052.476310.0005
General
dbfile0.00031.520980.0000
String conversion0.00000.053940.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs