On 2/10/06, Martin Aspeli <[EMAIL PROTECTED]> wrote:
> Just trying to get an overview - are there any plans or code (CMF 2?) to
> make it possible to use Z3 content types as first-class citizens in CMF?
Well, depends on what you mean with "Z3 content types" and "First
class citizen". :-)
> That is, make them available in add menus, make actions/tabs appear on
> them, let them use method aliases, make them catalog aware and so on,
> without necessarily inheriting from PortalContent.
Well... that's a pretty tall order. Especially since the easist
solution to all that is to write a wrapper-class that inherits from
PortalContent, CMFCatalogWare et al.
> Alec Mitchell's plone_schemas product lets you use such types in Plone,
> though he derives from CMF's PortalContent (as I recall) and manually
> constructs an FTI.
I tried to make a ZCML statement that replaced the FTI, since much of
the information already exist as other ZCML statements but failed. We
need to change things in portal types for that to work I think.
> I can see some great advantages to leveraging Z3's content type system,
> not at least before they encourage easier re-use. That's not to say that
> we can't start to write content types using CMF (or Archetypes as the case
> may be in the Plone world) but presenting Z3 interfaces and offering
> adapters and get many of the same benefits, but I'd really like to settle
> on one content type system in the long run, and I think Z3 schemas are a
> nice approach.
Well these you can use, now.
> Who has experience with this? What holes are there to be plugged before
> this stops being a slightly awkward marriage between old and new code?
Well, I think the FTI-thingy should be fixed first. It is possible to
auto-generate classes out of base-classes with ZCML statements, the
browser:page-statetemnt does this, but I honestly think it's to
magical and of no particular use.
Lennart Regebro, Nuxeo http://www.nuxeo.com/
CPS Content Management http://www.cps-project.org/
Zope-CMF maillist - Zope-CMF@lists.zope.org
See http://collector.zope.org/CMF for bug reports and feature requests