[Zope-PTK] user property sheet status

Steve Alexander steve@cat-box.net
Sun, 14 May 2000 10:22:45 +0100


Adrian Esteban Madrid wrote:
> 
> On Tue, 09 May 2000, you wrote:
> > Timothy Wilson wrote:
> > >
> > > This approach makes sense to me. I'd love to have people be able to provide
> > > a picture of themselves, curriculum vitae, etc., on a consistently formatted
> > > page. Couldn't this "bio" information be stored in a property sheet that
> > > could be attached to each user?
> >
> > You could make a new type of PortalContent that is a "BiogDocument".
> > Allow PTK users to create a BiogDocument in their "my stuff" user
> > directory. The BiogDocument constructor puts the document in at a
> > standardised ID (for example, "biogpage_html").
> >
> > The BiogDocument holds all the data you suggested for the property
> > sheet, with defaults coming from the user's own propertysheet (if any).
> 
> Can you elaborate more on that? How can you add that type of document?

Take a look at the source of the following files in
/lib/python/Products/PTKBase

  Document.py  Link.py  NewsItem.py

These all subclass the class in PortalContent.py.

You can make your own product, and define a BiogDocument that is a type
of PortalContent and stores attributes that are appropriate to a
biographical page.

Also, define biogDocumentView.dtml and biodDocumentEdit.dtml DTML method
files. You'll find examples of these for other PortalContent types in
the PTKBase/dtml subdirectory.

Also, look at how the __init__.py file in PTKBase to see how the portal
content types are registered with their Portal.


The procedure I've just described is a little more messy than it could
(and should) be. Various things are hard-coded into PTKBase that should
be configurable. This is because PTK is a work in progress, and is
currently in transition from being a Digital Creations run project to
being a community run project. See the archives of the Zope-PTK list for
further details on this.

I expect the PTK to be improving in terms of tidyness and ease of
customisation over the next couple of months. Again, there are resources
such as ZWikis springing up where developers are talking about how to
move forward with PTK development.

--
Steve Alexander
Software Engineer
Cat-Box limited