Closed voltechs closed 12 years ago
Check out the documentation for namespaces.
Hey weppos. Thanks for addressing this issue.
Either I don't understand the documentation, or you didn't quite understand my issue.
What I'm attempting to accomplish is displaying a unique sub navigation with respect to the current controller. From what I understand from reading and re-reading the documentation and searching extensively online for tutorials and whatnot, is that the only thing I could do is create another un-changing sub navigation that I could through namespacing, specify which tab to display as active.
This of course leaves me still with a mostly static sub-navigation, resulting in irrelevant links on inappropriate pages.
How could I display one set of sub-tabs on say, my groups_controller, and another on my projects_controller?
Keep in mind my navigation is rendered in the application.html.erb layout. The way my layout is configured, it does not suite me to place particular tab-drawing/rendering anywhere other than the layout.
Please advise! :)
Use an If/else to conditionally display only the tabs according to your controller.
My different main sections have the need for unique sub-navigation. I'd like to be able to define the array/hash for the subnav in the appropriate controller and have the layout render them. How could I do that?