Portlet settings from a GS profile?

Raphael Ritz r.ritz at biologie.hu-berlin.de
Tue Oct 2 12:44:45 UTC 2007


Martin Aspeli wrote:
> Hi Maurits,
> 

Hi Martin, hi Maurits, hi Geir, and all others,

first thanks for updating me (and the crowd out there)
on the current state of affairs here.

Obviously, this is going to be somewhat involved but
we better come up with a solution to (at least parts of)
GS support for portlet configuration rather soon or we
are making a fool of ourselves.

>> Let me think out loud here.
>>
>>   <?xml version="1.0"?>
>>   <portlet-assignments>
>>     <portlet
>>         type="contenttype"
>>         name="portlets.rss"
>>         condition="Folder"
> 
> I don't like the name "condition", but something like it may work.
> 

how about "target"?

> You'd also need to specify which portlet manager (e.g. plone.leftcolumn) 
> this was in.
> 

Yup.

> However, you're missing something here: plone.portlet.RSS (the name of 
> the RSS portlet) takes config parameters. 

Right.

So in general there is the assignment as handled by the portlet
manager(s) as well as the configuration of the individual portlets.

Lets compare this to the way the more complex CMF tools like the
types tool or the workflow tool are handled. There you have a
configuration of the tool itself (types.xml, workflows.xml) as well
as folders (types, workflows) which hold the configuration of the
individual objects managed by the tool (the FTIs or the individual
workflows respectively). Now whether you introduce a folder hierarchy
or not is not the point (GS can do either way; for the parsers and
renderes of the bibliography tool in CMFBib I've chosen to use
just one file) but the situation here is at least similar in as
much as we have (configuration) managing objects (the portlet managers)
as well as configurable objects (the portlets).

Providing an xml representation for those settings and having handlers
dealing with that shouldn't be too hard (BTW: is there any build-in
support for zope 3 schemata in GS like there is for the classical
Zope 2 object and property manager functionality? that could make
life *much* easier).

Except for one thing (as Martin points out correctly):
location-dependent assignments (and I think Martin is also right
in pointing out that GS doesn't provide support for this when it
comes to plain Zope properties on portal content objects either
- I simply don't know at the moment).

This is a tricky issue as this mixes site configuration and content
(structure) which we are generally trying to keep as separate as
possible. It reminds me in some way of the problem that Archetypes
- or more generally the content handlers - has/have when it comes
to supporting references between content objects on import/export.
Maybe there are some lessons to be learned (or code to be "stolen"?)
from XMLForrest or gsxml???


Just some thoughts,

	Raphael





More information about the Product-Developers mailing list