From: Aaron Held <aaron@MetroNY.com> - 2003-01-14 14:56:11
> The sub-templates are instantiated within a servlet's constructor, so I get
> dynamic compilation. They use #extends to inherit their base layout from
> the master template. For this to work, the master template must be
> precompiled, as must any intermediate subsite template. I've found that
> generally, I only use up to about 2 levels of inheritance: master template
> <-- context template <-- many page templates.
I built a similar system but it is not as clean an I would like it to be:
My idea is to create a master template w/ a function call in the content
t = self.pagetemplate
t.data = self.data
There is a lot of extra plumbing initally, but you get the advantage of
dynamic recomp the whole way through and the ability to theme the site
The bad is the fact that you lose the nice inheritance of templates
features and the fact that you have to hold each template instance per
thread in memory. That kind of limits the overall theming scalability.
Get latest updates about Open Source Projects, Conferences and News.