MvcSiteMapProvider visibility doesn't work

1.5k views Asked by At

I have a asp.net mvc 4 web application. and I use MvcSiteMapProvider to make my menu. I set visibility attribute at mvcSiteMapNode. like :

 <mvcSiteMapNode title="Verify Email" action="Verify" visibility="SiteMapPathHelper,!*" visiable="SiteMapPathHelper,!*"></mvcSiteMapNode>

Advanced Node Visibility with ISiteMapNodeVisibilityProvider

but I found it doesn't work.

Then I added FilteredSiteMapNodeVisibilityProvider to my project for testing. I set a breakpoint to "node.Attributes.ContainsKey("visibility")" and found ISiteMapNode can't get attribute "visibility". but I tried to set a custom attribute (ex. visiable), It can be get.

How can I do for the visibility attribute ??

1

There are 1 answers

1
NightOwl888 On BEST ANSWER

This was a bug in v4.4.7 that was fixed in v4.4.8 (see issue #262).

If you upgrade, the problem should go away. However, if you are still having problems, please open a new issue @ Github.