html - Best way to manage a header navigation menu from within a template? -
i'm looking put navigation in gsp template, , set active
class on navigation elements each respective page. what's best way this? have several .gsp
views merging single template looks 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>
i armandino's suggestion, may have problems if you're accessing pages other means clicking menus (eg through bookmark or first page after login).
this solution if you're using sitemesh, not isolated menu template , hence not nice design-wise:
Comments
Post a Comment