[Zope] aborting DTML parsing

Sam Gendler sgendler@teknolojix.com
Sun, 05 Dec 1999 19:20:16 -0800


I hope I don't get flamed off this list, but here goes...  I have recently had
to delve into ColdFusion for a customer, and there are some tags that would
certiainly be useful.  <CFABORT> for example, stops execution of a template.
They have some nice constructs in the <CFLOOP> tag as well, allowing loops
equivalent to while, for, and <dtml-in> loops.  There is a
<CFSWITCH><CFCASE></CFCASE></CFSWITCH> construct that I would certainly find
useful, too.  Don't worry, I have no intention of abandonning zope in favour of
CF, which is far superiour in SO many ways, but there is no reason not to use
their good ideas...

Didn't I see some reference to a <dtml-return> tag in version 2.1.  I haven't
checked the docs for new tags, but I thought I saw some email that mentioned
such a tag.  I might mention that there was no mention whatsoever of new dtml
tags in the CHANGES.TXT file.

--sam

chas wrote:

>
> >> Just raise an error way down deep, and catch it at the higher method
> >> with <dtml-try> and <dtml-except>.  I think these tags were added in
> >> 2.0.0
> >
> >This is a solution, but i have to modify all my DTML documents. All
> >documents are beginning with "<dtml-var standard_html_header>" and i COULD
> >change all documents to "<dtml-try><dtml-var
> >standard_html_header>....<dtml-except>...", but this is not my preferred
> >solution.
>
> This is a problem I've also encountered and, as you mention,
> the try/except requires modifying all pages. I'd also like to
> find a better solution.
>
> Is there no equivalent of Python's sys.exit(0) ?
>
> chas
>
> _______________________________________________
> 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 )