[Zope] listing objects based on their property?

ender kthangavelu@earthlink.net
Sun, 8 Jul 2001 23:09:26 -0700


On Monday 09 July 2001 17:06, Ismet Dere wrote:
>>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.

how bout 

<dtml-in "myfolder.objectValues()">
<dtml-if "_.hasattr(_['sequence-item'], 'menu')">
<li><a href="<dtml-var absolute_url>"><dtml-var title_or_id></a></li>
</dtml-if>
</dtml-in>

kapil