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?
This has a little less duplication.
ul.nav
each name in ["Dashboard", "About", "Contact"]
if (menu=="Home")
li.active
a(href="#")= name
else
li
a(href="#")= name
Adding the active
class might be better just done in javascript or perhaps you can get the presentation you need with the straight CSS a:active
selector.