Since objectItems is returning a list of objects, you don't need to look up sequence-item in the _ namspace. Try this instead: <dtml-if "sequence-item.hasProperty('active')"> I think what you were doing would work if you were using "objectIds" instead, which returns a list of object names. Roger Sillito wrote:
Hello, I'm trying to iterate through an list created with ObjectItems and test if each sequence item has a given property, something like:
<dtml-in "objectItems(['DTML Document'])"> <dtml-if "_['sequence-item'].hasProperty('active')"> <p>This document is "active"</p> </dtml-if> </dtml-in>
This isn't working though, I get
Error Type: AttributeError Error Value: hasProperty
any help with this greatly appreciated, Roger.
_____________________________________________________________ Roger Sillito (Web Assistant) Publications & Website Development Office 0191 222 3482 University of Newcastle upon Tyne naoyam.ncl.ac.uk NE1 7RU w.r.sillito@ncl.ac.uk ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
_______________________________________________ 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 )