[Zope] testing with dtml-if

Dylan Reinhardt zope at dylanreinhardt.com
Fri Sep 5 00:25:54 EDT 2003


On Thu, 2003-09-04 at 16:19, Meilicke, Scott wrote:
> <dtml-if my_variable>
> do stuff
> </dtml-if>
> 
> I think...

The above will test the *truth* of my_variable.  That overlaps with
testing that it is equal to 1, but isn't quite the same.

What you really want is:

<dtml-if "my_variable==1">
   do stuff
</dtml-if>

HTH,

Dylan





More information about the Zope mailing list