[Zope] dtml-if question

Dylan Reinhardt zope@dylanreinhardt.com
13 May 2003 08:03:18 -0700


On Tue, 2003-05-13 at 07:02, Erwin Ambrosch wrote:
> But how can I test of non existens of nol.

When the name is what's being evaluated, non-existence evaluates as a
false value.  Thus:

<dtml-unless nol>
  Stuff to do if nol is false, empty, or doesn't exist.
</dtml-unless>

or

<dtml-if nol>
  Stuff to do if nol exists and is true / non-empty
</dtml-if>

That's not exactly what you asked, but...

HTH

Dylan