[Zope3-dev] Re: [Z3lab] Re: [DRAFT] local portlets and perspectives
Tonico Strasser
contact_tonico at yahoo.de
Tue Aug 30 08:01:46 EDT 2005
Jean-Marc Orliaguet schrieb:
> Tonico Strasser wrote:
>
>
>>Hi!
>>
>>Jean-Marc Orliaguet schrieb:
>>
>>
>>>Anyway, pagelets or portlets whatever they called and no matter what
>>>data they produce (structured data or raw HTML) must be "pipe-able"
>>>through the rendering engine, i.e. they must return some data, the more
>>>"ready HTML" the data is the less reusable it will be.
>>
>>
>>Pipe-able, hmm. I think, *if* we could do define-slot and fill-slot
>>stuff in Python code that would be very nice. We would have a "page"
>>object that can "pipe" page components together.
>>
>
>
> yes, this is what cpsskins does:
>
> - the "define-slot" is just a "cpsskins:slot" with a name identifier
> ('left', 'right', 'main' ...) which means that can be used on several pages.
>
> - the "fill-slot" part has been the subject of the discussion the past
> week in the "perspective" thread.
>
> Currently the plan is to support the "perspective" way of filling slots
> (1 perspective = 1 set of portlets) and the "local folder" way of
> filling a slot, i.e. traversing the site starting from the site root to
> the current folder, gathering all the portlets stored in each folder on
> the path and displaying them into the slot that they belong to.
>
> here is how the renderer works:
> http://www.z3lab.org/sections/front-page/white-papers/draft-renderer/downloadFile/attachedFile/renderer-architecture.png
>
> starting from the top node in the theme tree:
>
> A) is the node a leaf?
>
> => YES: then render the node according to B)
>
> => NO: get the list of child nodes in the correct order, for every
> node go to A)
>
>
> B) for every filter associated to the node:
>
> - is the filter is the first in the chain?
>
> => YES: then get the data from the leaf (getDisplayData())
> => NO: use the output of the previous filter in the chain and feed
> it into the current filter
>
> - if the filter is the last in the filter chain for that node, feed
> the filtered data into the next renderer.
>
> In this way, believe it or not, you can by changing a few lines in a
> zcml file render a "theme editor" with all the AJAX stuff
> http://svn.nuxeo.org/trac/pub/file/z3lab/cpsskins/branches/jmo-perspectives/configuration/engines/editor/configure.zcml
>
> or an HTML page ready to be displayed on a web page:
> http://svn.nuxeo.org/trac/pub/file/z3lab/cpsskins/branches/jmo-perspectives/configuration/engines/default/configure.zcml
>
> 90% of all the components are reused, simply they are wired together
> differently.
>
>
>
>>A simple example with boxes (sorry, Zope 2 script, don't kill me):
[...] snip example
> yes, this is the ZPT way of doing it :-)
Yes, I find ZPT is very suited for this stuff becuase it has that slot
thing. That wouldn't be possible with e.g. DMTL I think. Do CPSSkins
support other template languages than ZPT?
Tonico
More information about the Zope3-dev
mailing list