[Zope] logical operator in dtml-if

Geir B Hansen Geir B Hansen <geirh@funcom.com>
Tue, 28 Mar 2000 09:06:37 +0200


on Tuesday, March 28, 2000 Matthew Parslow wrote :
MP> I am doing some error checking with <dtml-if>, simply to check that some
MP> variables exist, however I can't seem to find a syntax that ZOPE agrees with to
MP> use AND. 
MP> what I want to do:
MP> <dtml-if Var AND anothervar AND yetanothervar>
MP> render page
MP> <dtml-else>
MP> you have to enter details in all the fields
MP> </dtml-if>
MP> I know this is a messy way to do it, and I'd appreciate all suggestions.
MP> Thanks,
MP> Matthew Parslow

a Python expression can take booleans, as far as i know..

try this: (untested)

<dtml-if "spam AND eggs">
        ^^^           ^^^
        
note the quotes


--
Geir Bækholt Hansen
web-developer/designer
geirh@funcom.com
http://www.funcom.com