SharePoint GlobalNavSiteMapProvider get visible items - hidden page issue

Hi all,

If you happen to grab structured navigation items from GlobalNavSiteMapProvider in the code when it has 'show all pages' enabled, you would find that it will return all pages including the ones that are hidden.

I debugged the code and interestingly the IsVisible property of the PortalSiteMapNode always returns true. 

One workaround is to not show pages in the global navigation, and manually add/remove links in the navigation.

The other workaround (easier) is to check if the page description has 'hidden' in it, if so then you exclude it:


Post a Comment