[Zope-CMF] PathIndex parameters

Kent Hoxsey khoxsey@caspiannetworks.com
Tue, 28 Aug 2001 17:36:40 -0700


Anyone know how to pass a 'level' parameter for a PathIndex search?

I've been trying to use the PathIndex ("path") in z240 and cmf1.1,
because it seems like the right way to handle certain problems ("give
me all the objects reporting to a folder called..."). However, it is
unclear to me how to use the optional parameters of the index type via
the portal_catalog.

If I issue DTML like the following:

	<dtml-in "portal_catalog.searchResults(path='/cmf/fldr')">
	   <dtml-var id>
	</dtml-in>

I get the desired results, all objects living somewhere within the
scope of the folder with id 'fldr' at the top level of the CMF site
'cmf'. However, when I change the search parameters to include the
'level' setting:

	<dtml-in "portal_catalog.searchResults(path='/fldr', level=1)">
	   <dtml-var id>
	</dtml-in>

I get no results. The help text says the API can handle a query string
as well as a level identifier, but I cannot find examples. Clearly I'm
not doing this quite right, but I can't quite get over the hump on
this one.

k1