[Zope] For loops in dtml

Jim Washington jwashin@vt.edu
Wed, 23 Feb 2000 11:51:51 -0500


Hi, Chris

Something like the following should get you going:

<dtml-call "REQUEST.set('count',10)">
<dtml-in "_.range(count)">
<dtml-var sequence-item>
</dtml-in>

Regards,

-- Jim Washington

Chris Withers wrote:
> 
> Anyone know how I can do the equivalent of the following in dtml:
> 
> for (int i=0; i<count; i++)
> {
>   ...stuff...
> }
> 
> or even
> 
> int i=0;
> while (i<count)
> {
>   ..stuff..
>  i++;
> }
> 
> cheers,
> 
> Chris