I'm trying to hide a node from my site menu, but display it in my breadcrumbs
I'm following the tutorial here: https://github.com/maartenba/MvcSiteMapProvider/wiki/Advanced-Node-Visibility
<mvcSiteMapNode title="Create Customer" controller="Customer" action="Create" area="Home" clickable="false" visibility="SiteMapPathHelper,!*"/>
The above doesn't seem to work. It shows up both in my site menu, and breadcrumbs.
You should use this guide on how to hide a node
https://github.com/maartenba/MvcSiteMapProvider/wiki/Advanced-Node-Visibility-with-ISiteMapNodeVisibilityProvider
Some settings you can set from the link above:
Once you have added the app settings, add the following to any node you want to see in the breadcrumbs but not the menu:
visibility="SiteMapPathHelper,!*"
(SiteMapPathHelper - the node is visible in the sitemappath, !* - it is invisible for all other controls)eg:
Other options available:
Type..........................What it Affects
CanonicalHelper.......The Canonical HTML Helper
MenuHelper..............The Menu HTML Helper
MetaRobotsHelper....The Meta Robots HTML Helper
SiteMapHelper..........The SiteMap HTML Helper
SiteMapPathHelper...The SiteMapPath HTML Helper
SiteMapTitleHelper...The Title HTML Helper
XmlSiteMapResult....The sitemaps XML output of the /sitemap.xml endpoint
We created an OnlyBreadCrumbMVCSiteMapNodeAttribute. We decorate any code we want the attribute
Also have a visibilty provider
Use like
Upload Documents will be breadcrumb title. AssetDocuments is the Parent Key
If you pass the 3rd parameter, that sets a key of the breadcrumb node itself
add this to your web.config