[Zope] For loops in dtml

J C Lawrence claw@kanga.nu
Wed, 23 Feb 2000 11:03:47 -0800


On Wed, 23 Feb 2000 13:50:37 -0500 (EST) 
Jeff K Hoffman <jeff.hoffman@goingv.com> wrote:

> On Wed, 23 Feb 2000, J C Lawrence wrote:
>> On Wed, 23 Feb 2000 16:18:20 +0000 Chris Withers
>> <chrisw@nipltd.com> wrote:
>> 
>> > Anyone know how I can do the equivalent of the following in
>> dtml: ...various looping constructs...
>> 
>> Basically you end up using an external method, not DTML.

> Ummm, why?

If you happen to know the compleat set of loop values prior to
entering the loop, then yes, you can use various sorts of range(),
or dtml-in over a list value to do it.  However, that's not the
general case of a loop (which contains a conditional as he showed),
and DTML just doesn't attempt to handle looping constructs where the
loop termination conditions are determined during the execution of
the loop.

-- 
J C Lawrence                                 Home: claw@kanga.nu
----------(*)                              Other: coder@kanga.nu
--=| A man is as sane as he is dangerous to his environment |=--