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.

eZ debug

Timing: Jan 18 2025 19:24:08
Script start
Timing: Jan 18 2025 19:24:08
Module start 'layout'
Timing: Jan 18 2025 19:24:08
Module start 'content'
Timing: Jan 18 2025 19:24:09
Module end 'content'
Timing: Jan 18 2025 19:24:09
Script end

Main resources:

Total runtime1.4014 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0061 589.1484152.6406
Module start 'layout' 0.00610.0036 741.789139.4766
Module start 'content' 0.00981.3901 781.2656533.3359
Module end 'content' 1.39980.0015 1,314.601612.1406
Script end 1.4013  1,326.7422 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00390.2798160.0002
Check MTime0.00140.1030160.0001
Mysql Total
Database connection0.00100.070110.0010
Mysqli_queries1.341395.7106570.0235
Looping result0.00090.0662550.0000
Template Total1.361797.220.6808
Template load0.00240.174220.0012
Template processing1.359296.989620.6796
Template load and register function0.00030.023310.0003
states
state_id_array0.00150.105210.0015
state_identifier_array0.00170.119820.0008
Override
Cache load0.00200.1462370.0001
Sytem overhead
Fetch class attribute can translate value0.00100.072920.0005
Fetch class attribute name0.00140.100540.0004
XML
Image XML parsing0.00060.044820.0003
class_abstraction
Instantiating content class attribute0.00000.000950.0000
General
dbfile0.00080.0545160.0000
String conversion0.00000.000640.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 16
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs