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

zopist zopist" <zopist@rediffmail.com
28 Nov 2001 13:00:31 -0000


Thanks Andreas for the feedbacf.=0D=0ABut i am getting an error.=0D=0A=0D=
=0AError type : Attribute error=0D=0AError Value: getProperty=0D=0A=0D=0Are=
gards,=0D=0AZopist.=0D=0A=0D=0AOn Wed, 28 Nov 2001 Andreas Jung wrote :=0D=
=0A> <dtml-if expr=3D"objectname.getProperty('width')>640">=0D=0A> Big imag=
e=0D=0A> <dtml-else>=0D=0A> Small image=0D=0A> </dtml-if>=0D=0A> =0D=0A> An=
dreas=0D=0A> ----- Original Message ----- =0D=0A> From: "zopist" <zopist@re=
diffmail.com>=0D=0A> To: <zope@zope.org>=0D=0A> Sent: Wednesday, November 2=
8, 2001 06:26=0D=0A> Subject: [Zope] how to check attribute or property of =
a =0D=0A> object ??=0D=0A> =0D=0A> =0D=0A> =0D=0A> hello,=0D=0A> Every dtml=
-image object has width and height as a =0D=0A> default property.=0D=0A> I =
want to check if a dtml image object has =0D=0A> width (attribute or proper=
ty) > 1=0D=0A> something like=0D=0A> <dtml-if expr=3D"objectname.len('width=
')>1">=0D=0A> do something=0D=0A> <dtml-else> do something else=0D=0A> </dt=
ml-if>=0D=0A> can anybody please tell me the exact syntax ??=0D=0A> can i u=
se len ??=0D=0A> thanks for the help. =0D=0A> =0D=0A> =0D=0A> _____________=
__________________________________=0D=0A> Zope maillist  -  Zope@zope.org=
=0D=0A> http://lists.zope.org/mailman/listinfo/zope=0D=0A> **   No cross po=
sts or HTML encoding!  **=0D=0A> (Related lists - =0D=0A>  http://lists.zop=
e.org/mailman/listinfo/zope-announce=0D=0A>  http://lists.zope.org/mailman/=
listinfo/zope-dev )=0D=0A> =0D=0A> =0D=0A> =0D=0A =0A