[Zope-CMF] invokeFactory hook
Darryl Cousins
darryl at altcontrol.nl
Mon Apr 5 03:15:43 EDT 2004
Hi,
To continue the discussion, this is how I am using manage_afterAdd in a
subclass of PortalFolder.
<code>
def manage_afterAdd(self, item, container):
"""My parent has an afterAdd method"""
PortalContent.manage_afterAdd(self, item, container)
ov = item.objectIds()
# I do this so paste/rename doesn't spit an error at me
if not 'BodyImage' in ov:
PortalFolder.invokeFactory(self,'Image','BodyImage')
if not 'BodyLink' in ov:
PortalFolder.invokeFactory(self,'Link','BodyLink')
</code>
Sincere regards,
Darryl Cousins
On Thu, 2004-04-01 at 23:02, Chris Withers wrote:
> Darryl Cousins wrote:
>
> > In my PortalFolder subclass, for example, I want the new or copied
> > object to be registered with an ordering manager (a list) within my
> > product.
>
> So, do this work in the manage_afterAdd method of your PortalFolder subclass...
>
> Chris
More information about the Zope-CMF
mailing list