[Zope-CMF] listFolderContents

Tres Seaver tseaver@zope.com
30 Jun 2002 16:53:23 -0400


On Fri, 2002-06-28 at 18:38, Florent Guillaume wrote:
> I now believe that the bug described in
> http://www.zope.org/Products/PTK/Tracker/483
> isn't a bug, but a case of poor understanding (maybe due to poor
> documentation) of the use of the contentValues, contentIds, contentItems
> and listFolderContents methods, and of the Type Information.
> 
> The methods have this interface:
>   def contentIds(self, spec=None, filter=None)
>   def contentValues(self, spec=None, filter=None)
>   def contentItems(self, spec=None, filter=None)
>   def listFolderContents(self, spec=None, contentFilter=None)
> 
> The spec optional argument is a list of meta_types to filter on.
> 
> Note that this filtering relies on the "Meta Type" (content_meta_type)
> parameter of a Type Information in the Types Tool to be correctly set,
> namely to be equal to the meta_type of the underlying object.
> 
> In the PortalType code, _morphSpec only deals with meta_types.
> 
> 
> The filter or contentFilter optional argument is a dictionnary with a
> key 'Type' (among others) and for value a string or a list representing
> the Types upon which filtering is desired.
> 
> One could call for instance:
>   listFolderContents(contentFilter={'Type': ['MyDocumentType', 'MyOtherType']})
> 
> 
> I suggest that #483 be closed (I didn't find how to do it myself --
> should I be added as a supporter to the whole Tracker ?)

I just added you this afternoon.

Tres.
-- 
===============================================================
Tres Seaver                                tseaver@zope.com
Zope Corporation      "Zope Dealers"       http://www.zope.com