We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When nesting TrimEmptyGroupingNodesVisibilityProvider it fails to trim the parent node.
<mvcSiteMapNode title="Catalog" visibilityProvider="MvcSiteMapProvider.TrimEmptyGroupingNodesVisibilityProvider, MvcSiteMapProvider" clickable="false"> <mvcSiteMapNode title="Parts" visibilityProvider="MvcSiteMapProvider.TrimEmptyGroupingNodesVisibilityProvider, MvcSiteMapProvider" clickable="false" > <mvcSiteMapNode title="Search" area="Materials" controller="Parts" action="Search" /> <mvcSiteMapNode title="Add" area="Materials" controller="Parts" action="Add" /> </mvcSiteMapNode> <mvcSiteMapNode title="Assets" area="Materials" controller="Asset" action="Search" /> </mvcSiteMapNode>
When it gets to the parent node the 2nd one is just hidden not trimmed so it has child nodes.
The text was updated successfully, but these errors were encountered:
I rolled my own visibility provider to fix it and overrode IsVisible as follows:
public override bool IsVisible(ISiteMapNode node, IDictionary<string, object> sourceMetadata) { var childNodes = node.ChildNodes; return childNodes == null || childNodes.Any(c => c.IsVisible(sourceMetadata)) || node.Clickable; }
I'll see if I can get set up to push a patch for it and add some tests to update the built in provider.
Sorry, something went wrong.
b0e3105
No branches or pull requests
When nesting TrimEmptyGroupingNodesVisibilityProvider it fails to trim the parent node.
When it gets to the parent node the 2nd one is just hidden not trimmed so it has child nodes.
The text was updated successfully, but these errors were encountered: