[Seaside] Best way to keep a site look consistent
Andres Fortier
andres at lifia.info.unlp.edu.ar
Thu May 29 20:12:39 UTC 2008
Thanks for the quick response Philippe! I'll try it in a few moments.
Cheers,
Andrés
Philippe Marschall escribió:
> 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
>> like:
>>
>> renderContentOn: html
>> 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
>> performs:
>>
>> initialize
>>
>> 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.
>
> Cheers
> Philippe
>
More information about the seaside
mailing list