[Zope] simple iteration question

Jonothan Farr jfarr@real.com
Wed, 15 Mar 2000 12:00:14 -0800


> Can someone point me to how do a simple loop given a variable which
> indicates the top limit of the loop.
> 
> So, given x, I want to create...
> 
> <option>1</option>
> <option>2</option>
> ...
> <option>x</option>

(tested)

<dtml-in "_.range(x)">
<option><dtml-var "_['sequence-item'] + 1"></option><br>
</dtml-in>

-jfarr

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Hi! I'm a signature virus.
Copy me into your .sig to join the fun!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~