[Zope] trying to use hasProperty()

Stoons stoons@headnet.dk
Fri, 22 Feb 2002 12:41:51 +0100


..or simply use the following:

<dtml-var standard_html_header>
<dtml-in "objectItems(['DTML Document'])" sort=id>
<dtml-if "_.string.find(_.str(propertyIds()),'active')<>-1"> = ) <dtml-else>
= ( </dtml-if><br>
</dtml-in>
<dtml-var standard_html_footer>

I know, it is not using hasProperty(), but = )

/Stoons

----- Original Message -----
From: "Roger Sillito" <w.r.sillito@ncl.ac.uk>
To: <zope@zope.org>
Sent: Friday, February 22, 2002 11:18 AM
Subject: RE: [Zope] trying to use hasProperty()


> > > <dtml-in "objectItems(['DTML Document'])">
> > >   <dtml-if "_['sequence-item'].hasProperty('active')">
> >
> > > This isn't working though, I get
> > >
> > > Error Type: AttributeError
> > > Error Value: hasProperty
> >
> > Does it work using objectValues instead of objectItems?
>
> Afraid not.  Dieter has suggested using _.getitem() instead as this
> returns the object rather than rendering it (as _['..'] does) - will
> have a go with this.
> Rog.
>
>
> _______________________________________________
> 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 )
>