I wish I could do the following: @Html.MvcSiteMap().PageMenu()
instead of @Html.MvcSiteMap().Menu("MenuBtnGroup")
.
Mainly because of the filters.
I wish that a certain link to appear only on the page or sitemap and not in the main application menu
<mvcSiteMapNode title="Usuários" controller="Usuarios" action="Index">
<mvcSiteMapNode title="Novo Usuário" action="Novo" visibility="SiteMapPathHelper,PAGEMENU-ONLY,!*" />
<mvcSiteMapNode title="Detalhes" action="Detalhes" visibility="SiteMapPathHelper,!*" dynamicNodeProvider="UsuarioDynamicNodeProvider, Web">
<mvcSiteMapNode title="Editar" action="Editar" inheritedRouteParameters="id" />
</mvcSiteMapNode>
</mvcSiteMapNode>
This functionality isn't built-in (yet), but there is a way to make it happen by building your own visibility provider and using the SourceMetaData to pass the name of the menu into the visibility logic.
Then you can just name each of your menus by giving them a "name" SourceMetadata attribute.
And then use the CustomFilteredSiteMapVisibilityProvider instead of the FilteredVisibilityProvider in your configuration. See this answer for a complete example.