[Zope-CMF] PortalFolder, SkinnedFolder, and CatalogAware

Tres Seaver tseaver@zope.com
12 Aug 2002 11:43:33 -0400


On Sun, 2002-08-11 at 14:30, Carl Rendell wrote:
> I was just looking at the implementations of PortalFolder and 
> SkinnedFolder this morning to check out how CatalogAware is 
> implemented within those.
> 
> There was some discussion or debate on the question of should 
> Folders of any type be added to the catalog by default or not, and 
> there is evidence of that discussion in PortalFolder as 
> indexObject(), unidexObject(), and reindexObject() have been 
> stubbed out in the class.

They aren't really "stubbed out";  the are no-ops by intent.

> Thinking about this a little more it strikes me that we might 
> consider implementing catalog awareness for folderish types - 
> derived from PortalFolder or SkinnedFolder - in much the same way 
> as 'filter_content_types'.
> 
> In other words, create a boolean 'toggle' where the default catalog 
> awareness is set to 0 (not cataloged), yet can be set to 1 
> (cataloged) either by implementation (products sub-classing either 
> PortalFolder or SkinnedFolder) or skins (dtml or zpt).
> 
> This leaves a lot of flexibility for the designer, and follows the 
> implementation path already established for the filtering of 
> allowed types.
> 
> Any thoughts?

SkinnedFolder provides essentially two extra features over PortalFolder:

  - It catalogs itself automagically.

  - It indirects its "default view" through its type object lookup.

I don't really see a need to add the first feature to PortalFolder, even
as an option;  site managers who want that can just use SkinnedFolder.

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