[Zope-CMF] searching 'subportals'

seb bacon seb@jamkit.com
Mon, 9 Jul 2001 14:09:31 +0100


* Grégoire Weber <gregoire.weber@switzerland.org> [010709 12:51]:
> I didn't understand every detail. I would dive in deeper when I am at the
> point where I have to use *real* subportals.
> 
> Nevertheless there remain some (big picture) questions:
> 1) You have *real* CMF instances as subportals in a main/top CMF portal?
> Correct?

No, though you could do something like this.  In my system, each
'subportal' is actually a member's home folder.  So the root of a
'subportal' in this example is, in fact, a modified PortalFolder which
defines a 'getSite()' method.  

> 2) You have one portal_catalog only? The one in the main/top portal with
> your extension?

That's right.  I've done the same thing using multiple catalogs, but
you need to change a bit of code which expects to find catalogs in the
portal root, and anyway this approach means you don't have the ability
for site-wide searches.  

> 3) So the subportals do not have their own portal_catalog tool?

Yes.  

Off the top of my head, if you wanted 'real' portals as sub-portals,
you'd want to delete most of their tools after they've been created,
especially the catalog_tool.  You may have problems with getting the
CMF to find a catalog in an enclosing portal - have a look at the
getToolByName method to find out.

Then you could stick a python script in each subportal root which
returns a subportal identifier (like getSite in my example) for
indexing. 

seb