[Zope-PTK] Refactoring PTK, Redux

Steve Alexander steve@cat-box.net
Tue, 13 Jun 2000 22:12:15 +0100


Tres Seaver wrote:
> 
> 
> Not necessarily -- if you create your own Python product, you can certainly
> add Discussable to the content classes (base/concrete) it registers.  I
> merely want to avoid dictating that all portals *must* have the "stock"
> NewsItem/Document/File/Link/Image types available (which is forced by the
> current packaging).

Not just by the current packaging.

Each PortalContent type registers that they are available for use with
all Portal types globally, at present.

For example, the last few lines of NewsItem.py:

from Products.PTKBase.register import registerPortalContent
registerPortalContent(NewsItem,
                      constructors=(addNewsItem,),
                      action='Wizards/NewsItem',
                      icon="newsitem.gif")


I'd like a way of specifying on a per-portal-instance basis which
PortalContent types are available in that portal.

[ZPatterns bit...]

I see the portal-creation-wizard creating a PortalContent specialist in
the acquisition path of a portal as a way to do this.

You could even have a scheme where types common to many portals are in a
specialist located towards the root of the acquisition heirarchy, and
specific PortalContent specialists are contained within each particular
Portal.

--
Steve Alexander
Software Engineer
Cat-Box limited