Closed Aviel2000 closed 10 years ago
As of now there is no easy way to do it. However, I can see how that would be useful. I'll make sure this is in the next release. It will have something like the following syntax:
@using (var nav = Html.Bootstrap().Begin(new Nav().Stacked().SetLinksActiveByControllerAndAction())) {
@nav.ActionLink("Home", "Index", "Home")
using(var innav = nav.SubNav("Colors").Action("Workflow/Index/").SetActiveByController())
{
@innav.ActionLink("Red", "Index", "Red")
@innav.ActionLink("Blue", "Index", "Red")
@innav.ActionLink("Green", "Index", "Red")
}
}
Let me know if you see any potential issues with this.
Excellent, the syntax is fairly intuitive. Assuming that nav.SubNav(.....)
returns a type Nav
, it will allow to have multiple nested Navs
.
Thanks
this is done. Syntax a bit differs from what I wrote above. See docs
Hello,
Is there a way to generate the following output with BMVC?
I tried the code below but then
SetLinksActiveByControllerAndAction
doesn't set "Colors"active