If a publishing site collection has managed or structural navigation set as the source for the top navigation, how do you work with these settings programmatically? The SPWeb.Navigation.TopNavigationBar
property returns an entirely different set of navigation nodes (the Top Link Bar on non-publishing sites).
Here are some UI screenshots where the settings I'm talking about are located:
Not-Publishing (Top Link Bar Settings):
Publishing (Global Navigation Settings):
How can you programmatically detect whether a site is using the SPNavigation.TopNavigationBar
, Managed Navigation, or Structural Navigation for its Global Navigation / top navigation settings?