[ZPT] how do I test the existence of a variable?

Florent Guillaume fg@nuxeo.com
Thu, 21 Mar 2002 16:15:06 +0000 (UTC)


Casey Duncan  <casey@zope.com> wrote:
> <p metal:define-macro="foo"
>     tal:define="bar bar | python:<some expression>">
>     ...use bar to construct wonderous things...
> </p>

Yes, I quite often use it as:

<p tal:define="foo options/foo | string:mydefault">
  ...
</p>

Or with request/foo.

Florent

-- 
Florent Guillaume, Nuxeo (Paris, France)
+33 1 40 33 79 10  http://nuxeo.com  mailto:fg@nuxeo.com