Reputation: 124794
I am using MvcSiteMapProvider 3.3.3.0 and have a file MvcSiteMap.sitemap
which contains two nodes defined as follows:
<mvcSiteMapNode title="Node1" controller="MyController" action="MyAction" type="A" />
<mvcSiteMapNode title="Node2" controller="MyController" action="MyAction" type="B" />
My routes in global.asax.cs are configured "out of the box", so the URLs are:
Node 1: http://server/MyController/MyAction?type=A
Node 2: http://server/MyController/MyAction?type=B
Now if I navigate to Node 2, I find that MenuHelper.GetCurrentNode()
returns Node 1.
Why is this and is there a way to get MvcSiteMapProvider to recognize a current node based on the querystring parameter?
Upvotes: 1
Views: 828
Reputation: 689
I believe this is possible although I have not tested this. You should check out the wiki at their github repository. It has some usefull information but it still lacks some basic examples.
https://github.com/maartenba/MvcSiteMapProvider/wiki/Dynamic-sitemaps/
Upvotes: 1
Reputation: 2733
Unfortunately there is no way to do this. I got around this problem using a custom DynamicNodeProvider, but it doesn't seem to fit in your case.
Upvotes: 0