[Zope] dtml-while
Michel Pelletier
michel@digicool.com
Sun, 29 Oct 2000 12:37:46 -0800
Diego Rodrigo Neufert wrote:
>
> Why there isnt a dtml-while function in Zope?
DTML is not meant to be used for general purpose, logic programming.
It's a presentation and layout language. Additionally, a while
construct would allow you to create indeterminate loops:
<dtml-while 1>
...
</dtml-while>
and you're not allowed to loop indefinately in DTML. It's against the
rules. <dtml-in> does all the looping you need over a python sequence,
since DTML doesn't let you build infinite sequences, all loops
terminate.
The solution to your problem is to you Python Methods.
http://dev.zope.org/Members/4am/PythonMethod
Python does have a while construct and is indented for programming
logic.
-Michel