[Zope3-dev] Re: Macro vs. Pagelet

Jean-Marc Orliaguet jmo at ita.chalmers.se
Mon Dec 13 17:31:51 EST 2004


Tonico Strasser wrote:

> Jean-Marc Orliaguet wrote:
>
>> RENDERERS
>> render the page elements (HTML renderer, XML, ESI) and the Style 
>> elements
>
>
> Interesting, I'd rather try to render the whole page instead of 
> individual elements. I've written a pseudo page renderer with Python 
> scripts in Z2 (don't laugh, I'm not an application developer).
>
> Here an example of a view:
>
> ---
> page = container.Page()
>
> names_ud = container.names_for_this_page()
> macros_ud = {'content_body': ('template_name', 'macro_name')}
>
> page['updateNames'](names_ud)
> page['updateMacros'](macros_ud)
>
> return page['render']()
> ---
>
> Tonico


Hi,

There are some reasons why you'd want to render portions of a page for 
instance a left column or a header to put that fragment behind a squid 
w/ ESI. Page elements usually of have their own update frequencies too 
(from a few seconds to a few days).

Besides there is not such notion as one single page to do a rendering of.
There is an area of the screen in which various page contents are 
aggregated giving an impression of unity in space and time. In 
document-centric portals it is the document that is a factor of unity. 
In news sites it is time that is a factor of unity (what has happened a 
few minutes ago), in topic sites it is a given topic that is a factor of 
unity, ... You may want a view that renders all content that took place 
yesterday, or all content that is pending, not just in one box but in 
one page.

/JM



More information about the Zope3-dev mailing list