[Seaside] How to Implement a Menu Component
philippe.marschall at gmail.com
Sun Jul 22 09:19:49 UTC 2007
2007/7/21, Michael Gorsuch <michael.gorsuch at gmail.com>:
> > My Seaside application have 3 components
> > 1.) main component with two instance variables for menu and content
> > and a children method (array with: menu with: content)
> > 2.) menu subcomponent
> > 3.) content subcomponent
> Here's how I do it, but your mileage may vary:
> I have an "Interface" component for each of my main sections. My
> Welcome page, which handles logins and new user creation is called
> "GHWelcomeInterface". Once you get beyond that, you are sent to the
> meat of the app, the GHUserInterface.
> GHUserInterface handles rendering the menu and has a content
> subcomponent. Since the menu is actually part of the GHUserInterface
> instance rather than a subcomponent, it just swaps out 'main' (or
> 'content' in your case) with the appropriate content instance.
> So, just to be clear, I don't have three components, I just have two:
> one that handles the general state of things (including the menu), and
> the other is the actual content.
You can also stay with tree components and connect the menu and the
content component with announcements:
More information about the Seaside