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 [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
2008/5/29, Andres Fortier <[hidden email]>:
> 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 _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
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 <[hidden email]>: >> 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 > seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Andres Fortier-2
>>>>> "Andres" == Andres Fortier <[hidden email]> writes:
Andres> renderContentOn: html Andres> html Andres> divNamed: 'outer-container' Andres> with: [html Andres> divNamed: 'inner-container' Andres> with: [self renderOwnerOn: html]]. OK, I'll bite. Why the two divs? -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 <[hidden email]> <URL:http://www.stonehenge.com/merlyn/> Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Andres Fortier-2
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 > [hidden email] > 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 _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
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 >> [hidden email] >> 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 > seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Andres Fortier schrieb:
> 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 >>> [hidden email] >>> 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 >> > Kind regards, Michael _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Free forum by Nabble | Edit this page |