[Zope-CMF] portal types and skins

Dieter Maurer dieter@handshake.de
Fri, 25 Oct 2002 20:46:59 +0200


Mark McEahern writes:
 > [Dieter Maurer]
 > > What I do not understand is how you "register a filesystem directory view
 > > in a portal_type".
 > >
 > >    Usually, a "portal_type" does not register anything.
 > 
 > I have a Zope Product, modeled on NewsItem called PressRelease.  In it's
 > __init__.py, I have this:
 > 
 >   registerDirectory('skins', press_release_globals)
 >   registerDirectory('skins/PressRelease', press_release_globals)
 > 
 > Am I using the wrong terminology?
At least, I would say so.

   It is not your "portal_type" that registered a directory view
   but some Python product.

By the way, the second "registerDirectory" is redundant.

The effect of "registerDirectory" is to make the named directory
(and its subdirectories) available for the action "add Filesystem Directory View".

By itself, "registerDirectory" does not know anything about the SkinsTool,
neither its content nor its (skin) properties.

That's the reason why you need to put them there explicitly (when
you want them there).

 > I think someone else answered that I need to have an Install.py.
A very good idea, when you want to automate the installation of
your product in the CMF...


Dieter