[Seaside] Links and Components doubts

Sebastian Van Lacke svanlacke at caesarsystems.com
Thu Oct 23 17:38:18 UTC 2008


I'm from Argentina and I am working on a Seaside project. I don't speak English very well, so I hope you understand...

I need to recreate an old site using Seaside, and I and I'm having problems with the structure of the site.

My page has a header, menu, and a footer (which are repeated throughout the site) and a body that changes for each page of the site, 
depending on the option chosen on the menu.

CSRootComponent>>renderContentOn: html
 html div
   html render: header.
   html render: menu.
   self renderBodyOn: html.
   html render: footer.

The component menu, displays a horizontal menu with links to different pages on the site.

CSMenuComponent>>renderContentOn: html
 html div
  id: 'menu';
  with: [
   html unorderedList: [
    self  renderMenuItemsOn: html.
CSMenuComponent>>renderMenuItemsOn: html

 menuItems do: [:item |
  html listItem with: [
   html anchor 
    callback: item value;
    with: item key.

 super initialize.
 menuItems := OrderedCollection new.
 self addMenuItem: 'Company Info' withBlock: [ self companyInfo].
 self addMenuItem: 'Products' withBlock: [ self products ].
 self addMenuItem: 'Downloads' withBlock: [ self downloads ].
 self addMenuItem: 'Resources' withBlock: [ self resources ].
 self addMenuItem: 'Support' withBlock: [ self support ].
 self addMenuItem: 'Contact Us' withBlock: [ self contactUs ].


where each of the links should display a new page with the same structure as before, but with a different body.

It is right to create a component for each link ? For example, CSCompanyInfoComponent for companyInfo link.
How I call that component, from CSMenuComponent>>companyInfo method, to render in a new page??
I am confused by the fact that I don't have a renderCanvas to speak in that context.



Sebastian Van Lacke | Developer |  caesar systems | see clearly. decide smarter.

svanlacke at caesarsystems.com  | t: +1.281.598.8790 | t: +54.11.4389.0126 | www.caesarsystems.com 


This message and any attached documents contain information from Caesar Systems LLC that may be confidential/trade secret and/or privileged.  If you are not the intended recipient, you may not read, copy, distribute or use this information.  If you have received this transmission in error, please notify the sender immediately by telephone or by reply e-mail and then delete this message.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20081023/b90a17c4/attachment.htm

More information about the seaside mailing list