So I have a navigation template (/common/_navigation.gsp) that is getting rendered in the Grails projects main Layout file (/layouts/main.gsp). How do I pass some kind of variable/parameter/arg from the individual view files to layout and eventually into the navigation template? I just want the right tab to be highlighted when I'm on a page.
(We've already tried using the Grails Navigation Plugin. Since we have different tabs that point to the same controllers (same view, different filter) it breaks down.)
Based on my readings, I think its not a good practice to pass variables to your layout. Model variables are accessible in your view. I think layouts should be used only to specify the structure of the page while views can be used to fill in the content.