Archetypes in CMFDefault
What?
Trying to get Archetypes to work in a CMFDefault site, not a Plone site.
Why?
My employer has an existing CMFDefault site with over 1,000 existing documents. I really want to start moving toward Archetypes for content but I don't want to do something drastic like convert everything to Plone all at once.
When?
So far I've tried with Archetypes 1.2.4, CMF 1.4.2, Zope 2.6.4, and Plone 2.0 RC5. I will be trying again with AT from CVS, CMF 1.4.2, Zope 2.7.0, and Plone 2.0 RC5.
How?
Here's what I've done so far.
- Add CMFPlone to your Products directory.
- Add Archetypes and ArchExamp to your Products directory.
- Go into Archetypes/skins and do this:
mv archetypes/widgets .This makes the widgets customizable. In the future I would like to patch AT so that widgets are customizable out-of-the-box.
- Restart Zope.
- In your CMFDefault site, add a Quick Installer Tool.
- Go into the Quick Installer Tool and install Archetypes and ArchExamp.
- Add stuff from plone skins
You will get Unauthorized errors if you try to use the example now. This is due to things in the Plone skins not being found.
To fix this, go in the ZMI, go to your CMFDefault site's portal_skins, and add one Filesystem Directory View for each of the following:
plone_wysiwyg plone_scriptsThen go to the Properties tab of portal_skins and add the above to your skin path(s).
- Add a Portal Factory
Do this in the ZMI in the root of your portal. Add -> Plone Tool, then select Portal Factory from the list.
- Add a Form Controller Tool
Add -> Plone Tool, then select Form Controller Tool.
- Fix some Plonisms in AT widgets
Go into portal_skins/widgets/keyword and click "customize." Find these two lines:
site_props here/portal_properties/site_properties; allowRolesToAddKeywords site_props/allowRolesToAddKeywords;"and replace them with something like this line:
allowRolesToAddKeywords python:['Manager']"'Almost done. Things mostly work at this point.
- Make it look nice.
The archetypes forms look rather blah due to missing styles. You can fix this two ways. To customize the look, add these classes to your css:
.field .fieldRequired .formHelp .groupOr if you want it to look plone-ish, you can add the necessaries from plone:
add a FSDirectoryView for plone_styles add a FSDirectoryView for plone_images add the above FSDVs to your skin path(s) add a link to plone.css in your main_templateUnresolved Issues
- properties/metadata
There are errors i have not fixed yet.
- references
I get no errors when trying to create these, but I get no references either!
There may be other outstanding issues, I haven't done much with this yet.
Send me some mail slinkP home page ![]()