How to control visibility of node

Jul 7, 2010 at 3:36 PM
Edited Jul 7, 2010 at 3:46 PM
Hello, Since version 2.0.0 there is no more "visibility" attribute. How to control visibility of node? I would like to achive exact result as with visibility="InSiteMapPathOnly". It will be used to hide dynamically created nodes for site map menu but not for site map paths (breadcrumbs). I got something like this to retrive dynamic nodes from database:

<mvcSiteMapNode title="Products" controller="Product" action="Index">
     <mvcSiteMapNode title="replace me" controller="Product" action="Details"
    dynamicNodeProvider="HomeSite.Helpers.ProductDetailsDynamicNodeProvider, HomeSite" />

But it makes my sitemap page overloaded with all these dynamic nodes. How to avoid this? Should I modify my dynamicNodeProvider? But how?
Jul 8, 2010 at 7:08 PM

I have the same question. Visibility attribute was very useful in version 1 to control if the node display in the menu. Don't know why it was removed from version 2.


Jul 20, 2010 at 7:33 AM

Copied to a work item:

Oct 12, 2010 at 12:07 AM

The ISiteMapNodeVisibilityProvider interface only seems to fire when accessing the node. How can I hide a node from the SiteMapDataSource?

Oct 12, 2010 at 10:46 AM

There is no support to exclude nodes from the datasource as there is no reason then to add them in XML sitemap if they should not be in the data source.