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

zopist zopist" <zopist@rediffmail.com
28 Nov 2001 14:28:06 -0000


i want to use it in=0D=0A=0D=0A<dtml-if expr=3D"objectname in =0D=0APARENT[=
1].content.press.pics.objectIds()">=0D=0A=0D=0Anow should i say =0D=0A<dtml=
-if expr=3D"objectname.getProperty('width')>1 in =0D=0APARENT[1].content.pr=
ess.pics.objectIds()">=0D=0A=0D=0Aregards,=0D=0Azopist.=0D=0A=0D=0AOn Wed, =
28 Nov 2001 Andreas Jung wrote :=0D=0A> works for :=0D=0A> =0D=0A> - i crea=
ted an image object 'go.gif'=0D=0A> - zope created automatically properties=
 for 'width' and =0D=0A> 'height'=0D=0A> - <dtml-var "_['go.gif'].getProper=
ty('width')"> return =0D=0A> the right value=0D=0A>   of the width property=
=0D=0A> =0D=0A> Maybe you must use the underscore notation when your =0D=0A=
> object Id contains=0D=0A> special characters like a dot etc.=0D=0A> =0D=
=0A> Andreas=0D=0A> ----- Original Message ----- =0D=0A> From: "zopist" <zo=
pist@rediffmail.com>=0D=0A> To: "Andreas Jung" <andreas@andreas-jung.com>=
=0D=0A> Cc: <zope@zope.org>=0D=0A> Sent: Wednesday, November 28, 2001 08:00=
=0D=0A> Subject: Re: Re: [Zope] how to check attribute or =0D=0A> property =
of a object ??=0D=0A> =0D=0A> =0D=0A> =0D=0A> Thanks Andreas for the feedba=
cf.=0D=0A> But i am getting an error.=0D=0A> =0D=0A> Error type : Attribute=
 error=0D=0A> Error Value: getProperty=0D=0A> =0D=0A> regards,=0D=0A> Zopis=
t.=0D=0A> =0D=0A> On Wed, 28 Nov 2001 Andreas Jung wrote :=0D=0A> > <dtml-i=
f expr=3D"objectname.getProperty('width')>640">=0D=0A> > Big image=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" <zopis=
t@rediffmail.com>=0D=0A> > To: <zope@zope.org>=0D=0A> > Sent: Wednesday, No=
vember 28, 2001 06:26=0D=0A> > Subject: [Zope] how to check attribute or pr=
operty of =0D=0A> 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 ha=
s =0D=0A> > width (attribute or property) > 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> > </dtml-if>=0D=0A> > can anybo=
dy please tell me the exact syntax ??=0D=0A> > can i use len ??=0D=0A> > th=
anks for the help. =0D=0A> > =0D=0A> > =0D=0A> > __________________________=
_____________________=0D=0A> > Zope maillist  -  Zope@zope.org=0D=0A> > htt=
p://lists.zope.org/mailman/listinfo/zope=0D=0A> > **   No cross posts or HT=
ML encoding!  **=0D=0A> > (Related lists - =0D=0A> >  http://lists.zope.org=
/mailman/listinfo/zope-announce=0D=0A> >  http://lists.zope.org/mailman/lis=
tinfo/zope-dev )=0D=0A> > =0D=0A> > =0D=0A> > =0D=0A>  =0D=0A> =0D=0A> =0D=
=0A> =0D=0A =0A