Access Variable Within Several Sections

Author Message

Alex Jones

Friday 08 August 2003 12:39:11 pm

Okay, I am probably missing something very obvious, but I'm stumped at this point. I have the following code:

{let matrix=$attribute.content matrixcount=0}
{set matrixcount=1}
*{$matrixcount}* <br />
{section name=Rows loop=$matrix.rows.sequential}
{set matrixcount=2}
**{$matrixcount}** <br />
{section show=$Rows:item.columns.1} {* Show the field's value *}
{set matrixcount=3}
***{$matrixcount}***
{section-else} {* Display if field is empty - leave blank to display nothing *}
{/section}
{/section}
{/let}

Which should print out
*1*
**2**
***3***

But prints out
*1*
**1**
***1***

I can't find a way to alter the variable 'matrixcount' within the sections. What am I doing wrong?

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

Paul Forsyth

Saturday 09 August 2003 2:33:36 am

Alex,

Have a look at this thread. I had this problem and setting a namespace seems to fix it.

http://ez.no/developer/ez_publish_3/forum/developer/using_letset_within_namespaces

Paul

Alex Jones

Monday 11 August 2003 7:06:25 am

Thanks Paul, I'll give that a whirl. :)

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

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