Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

Read Context.Web.Navigation.QuickLaunch with Audeince - Sharepoint Publishing Site

$
0
0

I am trying to recreate my master page in my Provider Hosted App. To do this I need to recreate the quick Launch bar. I have sucessfully recreated it, However I can not see a way to security trim it to the audience. In SharePoint, I just goto Settigns -Navigation and then Add the Audience I want to view the link, However I cant see how I can trim it in C#.

So far I have:

      

NavigationNodeCollection topNav = clientContext.Web.Navigation.QuickLaunch;
clientContext.Load(topNav);
clientContext.ExecuteQuery();                       
foreach (var nav in topNav)                       
{                                                          
clientContext.Load(nav.Children);                       
}                       
clientContext.ExecuteQuery();                       

return topNav;

THis code returns a NavigationNodeCollection but no way for me to trim it against the audience in Navigation


Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>