[Zope-CMF] Searching objects in specific folder
Tres Seaver
tseaver@zope.com
Tue, 27 Nov 2001 06:17:07 -0500
Carsten Burghardt wrote:
> is there a simple way to restrict the search (via portaLcatalog) to a
> specific (in this case the curent) folder? The returned object do not have a
> folder-key so I don't know how to do this.
Zope 2.4 added a new index type, "PathIndex", which is designed to
filter search results by "place". Use would be something like::
results = self.portal_catalog( path=self.getPhysicalPath() )
(Of course, you could add other query parameters, in addition to
'path').
Tres.
--
===============================================================
Tres Seaver tseaver@zope.com
Zope Corporation "Zope Dealers" http://www.zope.com