[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Archetypes-users] Creating a folder type that is initialized with contents
Ken Winter skrev:
> I think I have found a solution. Simply add the following import line and
> method to the module that defines the HomeFolder content type:
>
> def addHomeFolder( self, id='', title='', description='', REQUEST=None ):
> """
> """
> this_ob = HomeFolder(id)
> self._setObject(id, this_ob)
> this_ob = self._getOb(id)
> this_ob.invokeFactory(type_name="MyContent", id="my-content")
>
> This also works recursively. That is, if MyContent is also a folderish type
> and you want it to have auto-generated contents, put the same method (with
> names suitably changed) into the MyContent content module.
there is also this:
http://plone.org/products/populator-tool
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Archetypes-users mailing list
Archetypes-users@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/archetypes-users
This mailing list archive is a service of Copilot Consulting.