[Zope-CMF] Change invokeFactory !
Tres Seaver
tseaver@zope.com
Tue, 12 Feb 2002 17:56:24 -0500 (EST)
On Tue, 12 Feb 2002, Dieter Maurer wrote:
> sidnews@netcourrier.com writes:
> > ...
> > I would like to make an e-learning site with Zope in the spirit of WebCT (A commercial product) ! I would like to use CMF and have started to make my portal !
> >
> > So, I need to specify one folder by member which represents a private area where he can stock private documents ! (a sort of schoolbag)
> > Then, I have created a folder in "Members" folder of my CMF Site with the name of each member. So, I can access this folder using "My Stuff" in the actions box and choose to add elements.
> >
> > But, when I add an element, the invokeFactory put the new element in "Members" folder and not in member's private folder. So every members see my documents.
> Hm, strange...
>
> Did you create a "Folder" or a "PortalFolder" inside "Members"?
> If it is a standard Zope folder, acquisition may be responsible
> that the document is created where the acquired method comes from.
>
> Not very likely, though...
Because 'invokeFactory' is an instance method of PortalFolder
objects, it doesn't get acquired with quite the same binding
semantics as it would if it were a PythonScript; in particular,
its 'self' is going to be the PortalFolder, and not the nested
Folder.
In general, I avoid using "stock" Zope folders in the "content
space" of a CMF site (they are fine inside "software space", e.g.
within the skins tool).
Tres.
--
===============================================================
Tres Seaver tseaver@zope.com
Zope Corporation "Zope Dealers" http://www.zope.com