[Zope-PTK] PTK Architecture (was Re: [Zope-PTK] ptk/zope newbie question- please read) read)

Dan L. Pierson dan@sol.control.com
Fri, 30 Jun 2000 15:07:33 -0400 (EDT)


Chris Withers writes:
 > "Dan L. Pierson" wrote:
 > > For example, there's widespread agreement
 > > that the previous PTK design to have the details of each document type
 > > wired into the base level of the PTK was wrong 
 > 
 > Can you give me examples of this? I'm still very new to PTK development
 > and would like to know something like this isn't going to bite when I'm
 > near finishing SquishdotPTK development :/

OK. The starting set of PTK document types (that can be created by
members) are: News Item, Document, Link, File and Image.  They all
inherit from PortalContent and are defined by the following files in
PTKBase: Document.py, File.py, Image.py, Link.py and NewsItem.py.
The way that each of them is displayed is controlled by one of the
following files in PTKBase/dtml: documentView.dtml, fileView.dtml,
imageView.dtml, linkView.dtml or newsView.dtml (there are also
similarly named *Edit.dtml files).

This all means that to something like change the way the title of a
news item is displayed, you have one of two choices: create a new
Chrome (essentially a CSS style sheet) and have all your members use
that (or edit the default chrome), or if you can't do what you need
with the predefined CSS choices, edit files in Products/PTKBase/dtml
directly.

Shane has said that he plans to make all of the base document types
ZClasses, which would be a huge improvement.  The main unclear
remaining area is how much it will be possible to configure these
ZClasses inside a Portal installation as opposed to editing the ZClass 
definition.  The later is a vast improvement over having to edit dtml
code in a subdirectory of a low level product, but is likely to cause
problems if you want to have two different portals on one site.  IMHO, 
the best solution in the later case may be to make two subclasses of
each relevant "master" ZClass.