[Zope] Selecting which objects to loop over
Rafael Cordones Marcos
rcm@sasaska.net
Mon, 16 Jun 2003 19:14:35 +0200
Hi,
This is a newbie question but I haven't been able to find an aswer either at
the ZopeBook nor querying Google.
How do I filter objects in the <dtml-in> tag based on some object property?
For instance, I want to loop over a set of objects in current directory, like,
say all DTML Document objects that have an id (name) that begins with "tab-".
I have tried with:
<dtml-in expr="objectValues('DTML Document')">
<dtml-if expr="_.string.find(id, 'tab-') == 0">
<p>Object title: &dtml-title;</p>
</dtml-if>
</dtml-in>
But I get a
Error Type: AttributeError
Error Value: namefind
error.
Help or pointers to docs appreciated.
Thanks for your time!!
/Rafa
--
Rafael Cordones Marcos
rcm@sasaska.net
http://www.sasaska.net