In a project, i've implemented MvcSiteMapProvider that work great. This is a side menu generated with @Html.MvcSiteMap().Menu()
Here is a node of the menu (Mvc.sitemap file).
<mvcSiteMapNode title="Home" controller="Home" action="Index">
<mvcSiteMapNode title="About" controller="Home" action="About"/>
<mvcSiteMapNode title="Project" controller="Home" action="DummyAction">
<mvcSiteMapNode title="List" controller="Home" action="Project"/>
<mvcSiteMapNode title="Edit" controller="Home" action="Edit" preservedRouteParameters="id" visibility="SiteMapPathHelper,!*"/>
</mvcSiteMapNode>
When I load the "List" from "Project", it displays a page with all projects and I can select one of them to load the Edit action with the related ID of the project.
The problem is, when I'm in the Edit action page, the side menu is all collapsed, but I'm expecting to have the "Project" node opened. If I add the node "Edit" in the menu, it work (matching node action), but I don’t want this node because its useless for the user.
Also, I've tried the DefaultSiteMapNodeVisibiltyProvider, I can hide the "Edit" node if added, but when I'm in the "Edit" action page, the Project node is also closed.
I'll face the same problem for the "New/Add" operation that I don’t want to see in the side menu, but will be accessible from a link in the project list. However, for these operations, I want to let the user know that it is inside the "Project" section, with the "Project" node opened.
See this project on GitHub: Project on Github
Best regards,