Setting root namespace variable inside a section???

Author Message

Zoltan Szappanos

Friday 04 April 2003 6:21:34 am

Hi,

I have a simple question. I would like to summarize a root variable inside a section, but it works only outside the section:

{let sum_count=0}
{set sum_count=sum(1,$#sum_count)}
{$#sum_count}
{/let}

It works fine, but if i put it inside a section:

{let sum_count=0}
{section name=Folder loop=fetch(content,list_count,...}
{set sum_count=sum(1,$#sum_count)}
{$#sum_count}
{/section}
{/let}

It doesn't work. How can i setting root namespace variable?

Jan Borsodi

Friday 04 April 2003 6:35:53 am

Setting variables in other namespaces than the current is not supported yet.

You can however move the namespace from the section to the let to achieve the same effect.

{let name=Folder sum_count=0}
{section loop=fetch(content,list_count,...}
{set sum_count=sum(1,$#sum_count)}
{$#sum_count}
{/section}
{/let}

--
Amos

Documentation: http://ez.no/ez_publish/documentation
FAQ: http://ez.no/ez_publish/documentation/faq

Zoltan Szappanos

Monday 07 April 2003 5:54:04 am

Thanks, It worked (however i had to change $#sum_count to $:sum_count).

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