[Grok-dev] RFC: Masterpage implementation without macros

Lennart Regebro regebro at gmail.com
Sat Apr 14 11:25:40 EDT 2007


On 4/12/07, Kevin Smith <kevin at mcweekly.com> wrote:
> We're using grok for the base of the relaunch of our newspaper website.
> I'm not fond of macros, so here is an alternate masterpage
> implementation that I think is fairly easy to grok.  This sort of
> strategy might also apply in a template neutral environment. Please let
> me know what you think.

This strategy works. It only has one drawback as a generic strategy,
and that is that your object needs to implement all the methods used
to fill in the master template, especially the things in the header,
such a title() and a method for adding extra css, and one for extra
javascript. For a generic system this ends up as being quite a lot of
methods.

I still haven't had the time (or, well, the energy, rather) to mock up
what I and Martijn discussed before which would make a better generic
strategy, but don't let that worry you. The two would be quite
compatible. :-)

-- 
Lennart Regebro: Zope and Plone consulting.
http://www.colliberty.com/
+33 661 58 14 64


More information about the Grok-dev mailing list