DTML Loop, is there a 'continue'?
Hi Zope Fans, I'm about searched out trying to find any discussion about calling a normal "continue" statement, as in Python, from DTML. Any ideas? I just want to short circuit a dtml-in loop for one pass, and then finish the rest of the loop, based on a parameter. Thanks, Jerry S.
I hope there is a dtml-continue, I also have not been able to find it though. What I have done is resorted to an dtml-if (or some times an dtml-unless) that catches the condition I want to short circuit and wrapped the code in the dtml-else. The dtml-unless probably the better choice. dtml-in SomeLoop dtml-if "Something==SomethingElse" dtml-else The code that normally executes /dtml-if /dtml-in It ain't pretty but it works.... Dan "Spicklemire, Jerry" wrote:
Hi Zope Fans,
I'm about searched out trying to find any discussion about calling a normal "continue" statement, as in Python, from DTML. Any ideas?
I just want to short circuit a dtml-in loop for one pass, and then finish the rest of the loop, based on a parameter.
Thanks, Jerry S.
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
On Fri, Sep 22, 2000 at 12:39:52PM -0500, Spicklemire, Jerry wrote:
Hi Zope Fans,
I'm about searched out trying to find any discussion about calling a normal "continue" statement, as in Python, from DTML. Any ideas?
I just want to short circuit a dtml-in loop for one pass, and then finish the rest of the loop, based on a parameter.
There isn't, other than using a nested <dtml-if>. You could also use a <dtml-try><dtml-except> and <dtml-raise> combo, where raising an exception would take you to the except clause and then out. -- Martijn Pieters | Software Engineer mailto:mj@digicool.com | Digital Creations http://www.digicool.com/ | Creators of Zope http://www.zope.org/ ---------------------------------------------
participants (3)
-
Daniel Rusch -
Martijn Pieters -
Spicklemire, Jerry