ICmsUrlContext.GetSiteMapNode returns only nodes that Navigable
I'm using SF 3.7.
I have a method that returns the CmsSiteMapNode of the given url, but when traversing the children of this node only nodes marked as Navigable are returned in the collection of children. How can I pull all children, Navigable and non-Navigable, of a CmsSiteMapNode?
ICmsUrlContext context = UrlHelper.GetUrl(UrlPath.ResolveUrl(url), true);
var node = context.GetSiteMapNode() as CmsSiteMapNode;
var childrenNodes = node.ChildNodes;
bump
I figured it out. When trying to get the children from a CmsSiteMapNode I call GetChildNodes from the provider of the CmsSiteMapNode, passing SiteMapDisplayMode.All as the second argument.
var provider = (CmsSiteMapProvider)cmsNode.Provider;
foreach
(CmsSiteMapNode child
in
provider.GetChildNodes(cmsNode, SiteMapDisplayMode.All))
....