My question: what is the current thinking on programmatic content
creation during product install?

First let me say I'm a great fan of Aspeli's repeatable site creation.
Anything I can do in code and configuration once is better than
re-doing it over and over through the ZMI.

I'm developing a base site framework for testing.  The framework is 
simple, and to my liking so that I don't have to go into the ZMI and 
change workflows, user options, etc.  I create a couple users with 
different privileges and populate the site with some content.  
That's the rub.

For example, I want a new front-page.  The current logic seems to be:

* Add a new-front-page object using
CMFCore.exportimport.content.importSiteStructure

* Modify the properties/state of new-front-page using a setuphandler

As I see it, a site/product creates content using one mechanism and 
then massages it using another.

There is also a GenericSetup/doc/SampleSite package that appears to 
create new entities.  But I couldn't get it to work.  All it seems to 
do is call Products.GenericSetup.utils.importObjects to build 
new XML structure, but nothing else seems to happen.

It looks like importSiteStructure is the mechanism to use and SampleSite 
is deprecated.  I most definitely could be wrong.

Soapbox: it seems to me a little awkward to use XML files everywhere and 
then CSV for content creation.  Why does
CMFCore.exportimport.content.importSiteStructure
use a CSV format instead of XML?

One idea is to call desired factories in my setuphandler and modify
the instances all in one place.

Dave


_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers

Reply via email to