I am using this lib: https://github.com/maartenba/MvcSiteMapProvider
I want to have a menu structure like this:
<ul>
<li><a href="/">Home</a></li>
<li>
<a href="#">Stuff</a>
<ul>
<li><a href="/Stuff/"<li>
<li><a href="/Stuff/Add"<li>
</ul>
</li>
</ul>
I am using MvcSiteMapNode without xml; just with the decorator's way.
So I have this Controller:
[MvcSiteMapNode(Title = "Stuff", ParentKey = "root", Key = "stuff-key", Url = "#", ImageUrl = "fa-stuff")]
public class StuffController : Controller {
[MvcSiteMapNode(Title = "List", ParentKey = "stuff-key", Key = "stuff-list")]
public ActionResult Index(){}
[MvcSiteMapNode(Title = "Add", ParentKey = "stuff-key", Key = "stuff-add")]
public ActionResult Add(){}
}
My problem is that when I GET the url /Stuff/ the index node is not selected and is only selected the parent node(stuff-key). Even when I GET /Stuff/Index happens the same.