[Seaside] Best way to keep a site look consistent

Andres Fortier andres at lifia.info.unlp.edu.ar
Fri May 30 12:25:57 UTC 2008


Thanks for the info Michael. Just to clarify, when you talk about 
inner chapters you are referring to the root component having a 
chapter as a child component, right?

Best Regards,
                      Andrés

Michael Perscheid escribió:
> Andres Fortier schrieb:
>> 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?
>>
>> Thanks in advance,
>>                                Andrés
>> _______________________________________________
>> seaside mailing list
>> seaside at lists.squeakfoundation.org
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>
> 
> Hi ---,
> 
> in our tutorial we have a start (root) component which renders the inner 
> chapters of each tutorial part. Additionally the root component consists 
> of the menu, the prev/print/next links and the outer design template. So 
> we have implemented the navigation task in an own component independent 
> of each chapter. It is easy to add or remove a chapter on the fly. 
> Perhaps it is possiple to shift some parts of the implementation in a 
> decoration. But we have decided to do it this way.
> 
> Kind regards,
> Michael
> 


More information about the seaside mailing list