I am trying to delete all the top navigation items from a console application, and add headers/sub items to the top navigation. I am also trying to uncheck the options to show subsites and show pages.
I found few articles talking about this, they suggest doing something like this:
using(var ctx = new ClientContext("url"))
var web = ctx.Web;
web.AllProperties["__GlobalNavigationIncludeTypes"] = "1";
This isn't working for me, I can't uncheck the show pages or show subsites option.
What I need to do is to clear the top navigation, then start adding links and headers. How do I achieve that from a console application?