Best way to manage a header navigation menu from within a template?

Posted by Stefan Kendall on Stack Overflow See other posts from Stack Overflow or by Stefan Kendall
Published on 2010-04-28T01:22:21Z Indexed on 2010/04/28 1:23 UTC
Read the original article Hit count: 283

Filed under:
|
|
|

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>

© Stack Overflow or respective owner

Related posts about grails

Related posts about html