[Zope] dtml-if var1 > var2
Dylan Reinhardt
zope@dylanreinhardt.com
Mon, 21 Oct 2002 09:55:23 -0700
The int() function probably won't work without a namespace. Try:
<dtml-if expr=3D"_.int(var1) > _.int(var2)">
HTH
Dylan
At 08:26 AM 10/21/2002 -0500, Troy Farrell wrote:
>That should do it. If you are comparing integers, it might not be a bad=20
>idea to make sure they are integers. OTOH, it could just be a waste of=20
>time for your application. Stuff that lives in REQUEST comes to you as=20
>strings.
>
><dtml-if expr=3D"int(REQUEST.var1) > int(REQUEST.var2)">
> <span style=3D"color: red; background-color: transparent;">This, that=
and=20
> the other...</span>
></dtml-if>
>
>Troy
>
>Miche=E1l Healy wrote:
>>Hi all,
>>
>>I want to compare the result of a query (var1) with a variable (var2) as=
=20
>>follows:
>>
>><dtml-if expr=3D"var1>var2">
>> <font =3D red>
>></dtml-if>
>>
>>Can anyone tell me the correct way of going about this?
>>
>>TIA,
>>
>>Miche=E1l Healy
>
>
>
>_______________________________________________
>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 )