I have come up with the following code but the problem is, there will be duplication of the anchor tag for each menu item.Is there a better way to do this?
ul.nav
- if(menu="Home")
li.active
a(href="#") Dashboard
else
li
a(href="#") Dashboard
li
a(href="#") About
li
a(href="#") Contact
This has a little less duplication.
Adding the
activeclass might be better just done in javascript or perhaps you can get the presentation you need with the straight CSSa:activeselector.