[Zope-CMF] new portal_type

Dieter Maurer dieter@handshake.de
Tue, 9 Jul 2002 18:50:10 +0200


Jim Pharis writes:
 > What I am trying to do is currently over my head but its never stopped
 > me before. I would like to know if it is possible "theoretically" to
 > create a Zope Product that adds itself as a content type to CMF
 > portal_types without messing with the CMFCore or CMFDefault source. 
Sure, when it is able to locate the portal instances it should
modify.

I would not go this way, however:

  It must find each portal instance in order to update its
  "portal_types" (they are private attributes of the portal
  instances).

  It must be careful, to avoid duplicate entries.
  What, if there are changes both in the product and a
  portal instance?

  When you create a new portal instance, you must restart
  Zope that it gets the additional type informations.

 > I have successfully added a CMFmyOwnFolder that can create a regular
 > folder but I need to implement it by creating a new Factory-Based Type
 > Information which I don't want to do.
Make a script that instantiates your portal. Let it update
the newly created portal's "portal_types".


Dieter