[Grok-dev] Re: Skinning/themeing

Martijn Faassen faassen at startifact.com
Sat May 19 16:33:47 EDT 2007


Lennart Regebro wrote:
> On 5/19/07, Martin Aspeli <optilude at gmx.net> wrote:
>>   o Designer wants the title to be a big fat box, writes in Python:
> 
> That would be bad. I assumed match templates was gonna work on the
> static HTML and put in the parts of the page that matched in the right
> place.

What I was thinking about is a design similar to XSLT templating (not 
rules-based XSLT).

You'd have theme.pt. Or theme.genshi, or whatever. All these templating 
languages need to be supplied with a way to get information from xpath 
expressions.

Then you write a match view that matches the whole dynamically rendered 
page. In the theme template, you use xpath expressions to fish out the 
bits from the dynamically rendered page and pull it into the layout.

This can be combined with smaller rules where bits of pages are 
manipulated. XSLT offers both ways as well - rule based transformation 
and template-based transformation, and combinations thereof. I am just 
trying to think of a way that allows this kind of pattern with other 
templating languages.

If I understand Martin correctly about deliverance, what deliverance 
offers beyond this is cleaner themes that just contain ids. Replicating 
this would require a different approach where the static HTML is being 
matched (on an id basis at least) as well, as Lennart describes.

Regards,

Martijn



More information about the Grok-dev mailing list