eZ Community » Forums » Setup & design » Setting root namespace variable...
expandshrink

Setting root namespace variable inside a section???

Setting root namespace variable inside a section???

Friday 04 April 2003 4:21:34 pm - 2 replies

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?

Friday 04 April 2003 4:35:53 pm

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}

Monday 07 April 2003 2:54:04 pm

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

Modified on Monday 07 April 2003 2:56:23 pm by Zoltan Szappanos

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from