How can I increment a variable template?

Author Message

Adolfo Barragán

Friday 30 May 2003 12:22:52 am

I need use a variable template and increment it for composing a name, but I don't achieve it.

I try:

{let idx=0}
{section name=list loop:my_list}
...
{set idx= sum(idx,1)} OR {inc($idx)}
{concat("name",$idx)}
...
{/section}
{/let}

Paul Forsyth

Friday 30 May 2003 12:29:55 am

i had this problem. Look at:

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

for a way to get this working.

paul

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 30 2025 21:46:14
Script start
Timing: Jan 30 2025 21:46:14
Module start 'layout'
Timing: Jan 30 2025 21:46:14
Module start 'content'
Timing: Jan 30 2025 21:46:14
Module end 'content'
Timing: Jan 30 2025 21:46:14
Script end

Main resources:

Total runtime0.0246 sec
Peak memory usage6,144.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0051 588.2500151.2266
Module start 'layout' 0.00510.0041 739.4766220.7188
Module start 'content' 0.00920.0137 960.1953997.7266
Module end 'content' 0.02290.0017 1,957.921929.9922
Script end 0.0246  1,987.9141 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002911.7263140.0002
Check MTime0.00124.9147140.0001
Mysql Total
Database connection0.00062.634510.0006
Mysqli_queries0.00228.988330.0007
Looping result0.00000.048410.0000
Template Total0.00124.910.0012
Template load0.00093.709710.0009
Template processing0.00031.184610.0003
Override
Cache load0.00062.480610.0006
General
dbfile0.00145.578680.0002
String conversion0.00000.039740.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs