[Zope] how to check attribute or property of a object ??

Andreas Jung andreas@andreas-jung.com
Wed, 28 Nov 2001 06:47:12 -0500


<dtml-if expr="objectname.getProperty('width')>640">
Big image
<dtml-else>
Small image
</dtml-if>

Andreas
----- Original Message ----- 
From: "zopist" <zopist@rediffmail.com>
To: <zope@zope.org>
Sent: Wednesday, November 28, 2001 06:26
Subject: [Zope] how to check attribute or property of a object ??



hello,
Every dtml-image object has width and height as a default property.
I want to check if a dtml image object has 
width (attribute or property) > 1
something like
<dtml-if expr="objectname.len('width')>1">
do something
<dtml-else> do something else
</dtml-if>
can anybody please tell me the exact syntax ??
can i use len ??
thanks for the help. 


_______________________________________________
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 )