[Zope] testing with dtml-if

Paul Winkler pw_lists at slinkp.com
Fri Sep 5 15:10:51 EDT 2003


On Fri, Sep 05, 2003 at 06:52:14PM +0100, garry saddington wrote:
> <dtml-if w>  does what it should do
> but what you suggest does not work nor do any of the other combinations i have 
> tried. I can demostrate that w=1 by displaying <dtml-var w>.

ah, but do you know whether it's 1 or "1"?

If you want to treat them as equivalent, convert w to
an integer.
<dtml-if "int(_.getitem(w))==1">
...


-- 

Paul Winkler
http://www.slinkp.com
Look! Up in the sky! It's LUDICROUS SPUTNIK FROM PLANET POOTOOT!
(random hero from isometric.spaceninja.com)



More information about the Zope mailing list