[Zope-CMF] Calling portal_catalog.indexObject from Zope ?

Gitte Wange gitte@mmmanager.org
29 Oct 2001 14:59:36 +0100


man, 2001-10-29 kl. 13:26 skrev Tres Seaver:
> Gitte Wange wrote:
> 
> > man, 2001-10-29 kl. 13:18 skrev Tres Seaver:
> > 
> >>Gitte Wange wrote:
> >>
> >>
> >>>I have created a method where I need to call the indexObject method of
> >>>portal_catalog, because the object isn't being inxeded automatically.
> >>>
> >>>But calling the method from a dtml method raises an unauthorized error
> >>>:-((
> >>>
> >>>Anyone who knows how to "fix" this (some sort of work around) ...
> >>>
> >>
> >>You should be able to ask the object to index itself:
> >>
> >>    context.reindexObject()
> > 
> > Unfortunately I don't know if this is possible - the object I want to
> > index is a CMF Site :-(
> 
> 
> I can't envision why you would do that, given that the CMFSite
> object isn't "content" at all (the only reason it has metadata
> is to allow it to provide default values by acquisition).
> 
> Could you please back up a step and explain what made you want
> to index the site object?

Off course ...
We have a customer that have 1 main portal and a number of sub portals
for each project they are running. Right now we are manually making a
copy of a "default" CMF Site for them each time they want a new project.
Instead I wanted to give them the possibility to do this themselves and
therefor I have created a portal_admin page that lists the sites they
have now and a little form they will fill out with info for the new sub
portal they want to create.
But the only way I can find and list these sub portals is through
portal_catalog.
Unless anyone have a better idea? :-)

-- 
Gitte Wange Jensen

Sys Admin, Developer and a lot more
MMmanager.org Aps, Denmark

Phone: +45 29 72 79 72
Email: gitte@mmmanager.org
Web: www.mmmanager.org

Quote of the day:
In short, go away until you can behave.

    - Linus Torvalds