[Seaside] Best way to keep a site look consistent
philippe.marschall at gmail.com
Thu May 29 20:03:31 UTC 2008
2008/5/29, Andres Fortier <andres at lifia.info.unlp.edu.ar>:
> Hi list,
> I guess this is a pretty basic question, but I just want to get
> it right. I would like to have a site with a consistent frame around the
> content (e.g. like the Hasso-Platter seaside tutorial site). So far the way
> I found to do this is:
> 1. Define a decoration (e.g. WAMyCustomDecoration) which does something
> renderContentOn: html
> divNamed: 'outer-container'
> with: [html
> divNamed: 'inner-container'
> with: [self renderOwnerOn: html]].
> 2. Define an abstract class for the site (e.g. WATemplateForMySite) that
> super initialize.
> self addDecoration: WAMyCustomDecoration new.
> 3. Make all the classes of my site subclass from WATemplateForMySite.
> What I don't like very much are steps 2 and 3. Is there a better way to do
> this? Maybe configuring something in the #updateRoot: message, so that I'm
> not forced to subclass from WATemplateForMySite?
Add the decoration simply to your root component, implement in the
decoration #isGlobal and return true.
More information about the seaside