I'm trying to build a custom navigation entity off the existing SiteMapPortalProvider exposed through SharePoint 2010, however, I cannot seem to find the settings to replicate a particular sub-site's navigational settings.
Take the following into account:
-> Sub Site -> Current Navigation
- About Us
- Contact Us
- Should Be Hidden (Hidden)
- Should Be Hidden (Hidden)
- Corporate Info
I retrieve the current SiteMapPortalProvider from SharePoint and pass the following attributes:
- IncludeAuthoredLinks = true
- IncludeHeadings = true
- IncludePages = PerWeb
- IncludeSubSites = PerWeb
- NavigationType = Combined
As this replicated the navigational settings for the sub-site I'm trying to simulate.
I then do subsequent calls to the SiteMapPortalProvider to get the items, as listed above, and pass the following parameters through:
- NodeTypes.All,
- NodeTypes.All,
- OrderingMethod.Manual
- AutomaticSortingMethod.CreatedDate
However, the above code returns the (Hidden) items to be visible to the user.
Am I doing something wrong?