[Zope] comparitive opperators
Chris McDonough
chrism@digicool.com
Sat, 4 Dec 1999 17:53:09 -0500
Read the DTML Reference (search for expressions or the "expr" tag).
It's at http://www.zope.org/Documentation/Guides/DTML-HTML/DTML.html
Here's an example:
<dtml-call "REQUEST.set('var1',0)">
<dtml-call "REQUEST.set('var2',1)">
<dtml if "var1 != var2">
<dtml-var var1> is not equal to <dtml-var var2>
</dtml-if>
Setting variables for use in DTML in the REQUEST namespace is a
convention. You can compare almost any two objects this way, though
(such as the field result of a SQL method to the title_or_id of a Zope
object).
Note that writing <dmtl-call "REQUEST.set('var1',0)"> is equivalent to
<dtml-call expr="REQUEST.set('var1',0)">. The former is shorthand for
the latter.
Chris McDonough mailto:chrism@digicool.com
Digital Creations http://www.digicool.com
Publishers of Zope http://www.zope.org
> -----Original Message-----
> From: Kyle Burnett [mailto:kburnett@ep.newtimes.com]
> Sent: Saturday, December 04, 1999 5:29 PM
> To: zope@zope.org
> Subject: [Zope] comparitive opperators
>
>
> does anyone know where i can find documentation of how to
> compare to vars?
>
> for example:
> dtml-var a=1
> dtml-var b=0
>
> i need to know that b is less than a.
>
> thanks,
> kyle
>
> _______________________________________________
> Zope maillist - Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> No cross posts or HTML encoding!
> (Related lists -
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )
>