Winterflood, Jonathan a écrit :
> Hi all,
>
> My product is designed as a profile to be imported onto a CPSDefault
> site, and I need to create some 'Folder's to hold some data it uses
> I'd like to create them when the import is done, but I can't figure out
> where, or which code to use for it
>
> So far the folders were created the first time they were needed (messy,
> needs a test for every use, breaks if the first user isn't admin etc.)
> with the following code:
> context.portal_url.getPortalObject().manage_addProduct['OFSP'].manage_addFolder('DBR_data')
>
> I'm guessing I should do it in the import method for the Tool (based on
> the vogon tool), but then the context isn't the same (obviously..)
> Any pointers would be appreceated :)
>
The following changeset http://svn.nuxeo.org/trac/pub/changeset/51312
describes how to create any objects at the root of a CPS site through
the XML profile files.
This is used to create the FckHTTPCache Accelerated HTTP Cache Manager
at the site root.
Creating Zope objects like this is only possible in the trunk since
this was a very recent addition.
--
Marc-Aurèle DARCHE
Open Source Enterprise Content Management (ECM) http://www.nuxeo.org/
NUXEO (Paris, France) http://nuxeo.com/
_______________________________________________
cps-devel mailing list
http://lists.nuxeo.com/mailman/listinfo/cps-devel