Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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

  1. About Us
  2. Contact Us
  3. Should Be Hidden (Hidden)
  4. Should Be Hidden (Hidden)
  5. 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?

share|improve this question
    
Did you ever get this working? –  Steve Lineberry Feb 14 '13 at 19:53
    
Hi Steve, to a degree yes. –  JadedEric Feb 15 '13 at 11:55
    
Ok, good. Did my answer help you or not? If so, please accept my answer, if not, please post the appropriate answer. Thanks. –  Steve Lineberry Feb 15 '13 at 13:47
add comment

1 Answer 1

up vote 1 down vote accepted

According to this:

http://msdn.microsoft.com/en-us/library/aa661621.aspx

the second nodetypes parameter is what type of hidden nodes should be included (includedHiddenTypes). So shouldn't the second parameter where you have NodeTypes.All be NodeTypes.None?

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.