[Zope] Checking for a boolean property value in DTML
Randall F. Kern
randy@spoke.net
Fri, 15 Jun 2001 16:25:19 -0700
A boolean property either has the value '', or 'on'.
<dtml-if prop_name>
set
<dtml-else>
clear
</dtml-if>
This worked fine in Zope 2.3.1
-Randy
> -----Original Message-----
> From: marc lindahl [mailto:marc@bowery.com]
> Sent: Friday, June 15, 2001 3:51 PM
> To: complaw@hal-pc.org; zope@zope.org
> Subject: Re: [Zope] Checking for a boolean property value in DTML
>=20
>=20
>=20
>=20
> > From: complaw@hal-pc.org
> > Date: Fri, 15 Jun 2001 22:32:18 GMT
> > To: Dieter Maurer <dieter@handshake.de>,=20
> complaw@hal-pc.org, zope@zope.org
> > Subject: Re: [Zope] Checking for a boolean property value in DTML
> >=20
> >> complaw@hal-pc.org writes:
> >>> I have a boolean property in a DTML Document. The=20
> boolean property is
> > called=20
> >>> "mental_steps_doctrine". I want to list those documents that have
> >>> mental_steps_doctrine set to "TRUE"....
> >>> <dtml-if expr=3D"mental_steps_doctrine =3D=3D 1">
> >> Try:
> >> <dtml-if mental_steps_doctrine>
> >=20
> > I had tried that. It didn't work (much to my surprise).
> >=20
>=20
> Wouldn't that be a check if the variable itself exists?
>=20
> I would think:
>=20
> <dtml-if expr=3D"mental_steps_doctrine">
>=20
>=20
>=20
> _______________________________________________
> Zope maillist - Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -=20
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )
>=20