I have the following (simplified) layout:
<header>
... more stuff here
<nav id="nav">
<div class="content_wrapper">
<ul id="menu">
<li>dashboard</li>
</ul>
</div>
</nav>
</header>
<div id="main_content">
<div class="content_wrapper">
<g:layoutBody/>
</div>
</div>
My problem is that the "menu" nav is dependent on what is rendered in the layoutBody. Not only will the text "dashboard" change to "login", "support", etc but on some pages there are buttons, links, etc. Is there any way in Grails, without changing the layout of the page, to dynamically render this NAV element based on the layoutBody? I've read the docs including the content block section, but they don't solve the problem because they are still pre-determined in the main layout.
I have the same problem on my grails webapp. Here is the way I have solved it. In your layout:
Then in your main views (like home.gsp) requiring additional modules (like login module), you can include something like: