[Zope] simple iteration question
Tres Seaver
tseaver@palladion.com
Thu, 16 Mar 2000 20:40:33 -0600
Graham Chiu <anon_emouse@hotmail.com> wrote:
> In article <00ed01bf8eb9$15790590$eb0217ac@dev.prognet.com>, Jonothan
> Farr <jfarr@real.com> writes
> ><dtml-in "_.range(x)">
> ><option><dtml-var "_['sequence-item'] + 1"></option><br>
> ></dtml-in>
> >
> >-jfarr
> >
>
> Thanks.
There is a special piece of syntactic sugar for one-based numbering::
<dtml-in "_.range(x)">
<option><dtml-var sequence-number></option><br>
</dtml-in>
(See $ZOPE_HOME/lib/python/DocumentTemplate/DT_InSV.py for more grubby details).
Tres.
--
=========================================================
Tres Seaver tseaver@palladion.com 713-523-6582
Palladion Software http://www.palladion.com