[Zope-CMF] What is the correct method for adding portal content programatically???
Florent Guillaume
fg@nuxeo.com
22 Aug 2001 14:03:12 GMT
> I think the approach should instead be
>
> getting a handle to the portal_types tool in an indirect manner.
>[...]
> then use the portal_types tool public method 'constructContent' to
> to create content which will use the factory method defined in
> portal_types be it a ZClass or Product.
I agree that it's the "Right" method. To use it, do something like:
context.portal_types.constructContent(type_name='Document',
container=where,
id=newid)
Bye,
Florent Guillaume
Nuxeo