GlobalNavigationNodes return null

I make this code

SPWeb web = properties.Feature.Parent as SPWeb;
web.Navigation.UseShared = false;
PublishingWeb pWeb = PublishingWeb.GetPublishingWeb(web);          
PortalNavigation portalNav = pWeb.Navigation;

portalNav.GlobalNavigationNodes.AddAsLast(new SPNavigationNode(" XX ",SPUrlUtility.CombineUrl(web.Url, "Pages/About.aspx"));

this return Null


  • Edited by mcsuareza 13 hours 52 minutes ago
June 22nd, 2015 1:46pm

Hi,

Can you provide the complete code for a further research? It would make others easier to find a solution for you.

Anyway, you can follow the demo below to make another test:

http://www.roberthiskey.com/2013/02/updating-global-navigation-menu.html

Thanks 

Patrick Liang

Free Windows Admin Tool Kit Click here and download it now
June 22nd, 2015 10:01pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics