a problem about section

Author Message

xiao jc

Thursday 20 May 2004 8:49:36 pm

juset like:
<section loop=$loop>
$i++;
</sction>

how can i do this?
thanks very much

Ole Morten Halvorsen

Friday 21 May 2004 12:20:31 am

Hi,

From the doc:
Each time the section iterates it sets four template variables in the new namespace. The variables are index, number, key and item.

index - is a number which starts at 0 and increases for each iteration.

Try this:

{section loop=$loop}
    {$:index}
{/section}

More info here: http://ez.no/ez_publish/documentation/reference/template_functions/program_flow/section

Senior Software Engineer - Vision with Technology

http://www.visionwt.com
http://www.omh.cc
http://www.twitter.com/omh

eZ Certified Developer
http://ez.no/certification/verify/358441
http://ez.no/certification/verify/272578

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 21:03:18
Script start
Timing: Jan 18 2025 21:03:18
Module start 'layout'
Timing: Jan 18 2025 21:03:18
Module start 'content'
Timing: Jan 18 2025 21:03:20
Module end 'content'
Timing: Jan 18 2025 21:03:20
Script end

Main resources:

Total runtime1.3117 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0051 587.9063152.6250
Module start 'layout' 0.00510.0032 740.531339.4453
Module start 'content' 0.00831.3018 779.9766489.8203
Module end 'content' 1.31020.0015 1,269.79698.1719
Script end 1.3117  1,277.9688 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.2394160.0002
Check MTime0.00130.0976160.0001
Mysql Total
Database connection0.00070.052110.0007
Mysqli_queries1.270996.8858540.0235
Looping result0.00050.0393520.0000
Template Total1.282997.820.6415
Template load0.00230.172820.0011
Template processing1.280797.631320.6403
Template load and register function0.00030.021410.0003
states
state_id_array0.00130.095510.0013
state_identifier_array0.00140.110220.0007
Override
Cache load0.00170.1299170.0001
Sytem overhead
Fetch class attribute can translate value0.00080.063120.0004
Fetch class attribute name0.00120.090420.0006
XML
Image XML parsing0.00020.014020.0001
class_abstraction
Instantiating content class attribute0.00000.000420.0000
General
dbfile0.00070.0516100.0001
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/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 13
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs