I'm looking to put navigation in my GSP template, and I would like to set the active
class on the navigation elements for each respective page. What's the best way to do this? I have several .gsp
views merging with a single template that looks like this:
<div id="bd" role="main">
<div role="navigation" class="yui-g">
<ul id="nav"><a href="index.gsp"><li class="active">Home</li></a><a href = "products.gsp"><li>Products</li></a><a href = "contacts.gsp"><li>Contact</li></a></ul>
</div>
<g:layoutBody/>
</div>