This can be done in DTML, but you can try this python script: ## Script (Python) "list_with_attr" ##bind container=container ##bind context=context ##bind namespace= ##bind script=script ##bind subpath=traverse_subpath ##parameters=the_attr="menu" ##title= ## the_list = [] for f in container.objectValues(): if hasattr(f, the_attr): the_list.append(f) return the_list Now that you have the objects list you can use DTML to present them. ----- Original Message ----- From: "Ismet Dere" <ismet_dere@yahoo.com> To: <zope@zope.org> Sent: Tuesday, July 10, 2001 8:06 AM Subject: [Zope] listing objects based on their property?
Hi,
is there any way to list contents of a directory in DTML Method based on the objects property?
for example, a DTML code that will look at a certain ditectory(dtml-folder) and lists the objects that has "menu" property.
ismet
_______________________________________________ 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 )