[prev in list] [next in list] [prev in thread] [next in thread] 

List:       zope-cmf
Subject:    Re: [Zope-CMF] listFolderContents
From:       Tres Seaver <tseaver () zope ! com>
Date:       2002-06-30 20:53:23
[Download RAW message or body]

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




[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic