[Zope] dtml-var weirdness
Andreas Jung
andreas@andreas-jung.com
Sat, 16 Feb 2002 06:35:40 -0500
you mean <dtml-var xyz> or <dtml-var expr="_['xyz']"> ???
- aj
----- Original Message -----
From: "Joseph A Knapka" <jknapka@earthlink.net>
To: <zope@zope.org>
Sent: Friday, February 15, 2002 20:44
Subject: [Zope] dtml-var weirdness
> Hi everyone,
>
> Stupid question of the day:
>
> Why might the following code result in a KeyError? It does
> in some contexts under Zope 2.5.0.
>
> <dtml-if expr="REQUEST.has_key('xyz')">
> <dtml-else>
> <dtml-call expr="REQUEST.set('xyz','Hello world')">
> </dtml-if>
>
> Sometimes the next line results in a KeyError, value 'xyz':
>
> <dtml-var name="xyz">
>
> In such cases, this works fine:
>
> <dtml-with REQUEST only>
> <dtml-var name="xyz">
> </dtml-with>
>
> Huh?
>
> TIA,
>
> -- Joe
> "I should like to close this book by sticking out any part of my neck
> which is not yet exposed, and making a few predictions about how the
> problem of quantum gravity will in the end be solved."
> --- Physicist Lee Smolin, "Three Roads to Quantum Gravity"
>
> _______________________________________________
> 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 )
>