Forums / Setup & design / Global vabiable lost
Lisa Pini
Monday 29 September 2008 1:47:16 am
Hi, I have a problem with global variable. In my pagelayout I set: {def $pinocchio=$module_result}{set scope='global' $pinocchio=$module_result}
At the end of my pagelayout I try to write the value: {$module_result.path.2.node_id} and{$#pinocchio.path.2.node_id}
I have clear all cache. I browse my site and both variables were visible at the end of my site, but sometime the value of variable pinocchio is lost. I can lost the value olso only with 3-4 F5 in the same page. By this moment pinocchio is always lost, in all the site pages.When I lost the value, I have to clean cache to reset it.
Can someone tell me what appened?
Thanks
Lisa
André R.
Monday 29 September 2008 3:21:16 am
I'll guess that the first code block is inside a cache-block and the next part is not inside the same cache-block, correct?
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
Monday 29 September 2008 4:00:20 am
You are right!I'll try to put the variable setting outside the cache block.