You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@khinklenj: I've just committed a change that enables you to specify the needed audiences when creating or updating navigation nodes. This code will appear in the next nightly build (version 1.8.66 or higher), docs will come but in the meantime check below code to learn how to use this new feature:
// Ensure audience targeting is enabled for navigation nodescontext.Web.EnsureProperties(w =>w.NavAudienceTargetingEnabled);context.Web.NavAudienceTargetingEnabled=true;context.Web.Update();parentNode=awaitcontext.Web.Navigation.QuickLaunch.AddAsync(newNavigationNodeOptions{Title="Parent Node",Url=context.Uri.AbsoluteUri,AudienceIds=newSystem.Collections.Generic.List<Guid>{context.Site.GroupId}});
I'll close this issue, feel free to open a new one in case you can't get things to work. Thanks for using PnP Core SDK!
Discussed in #1064
Originally posted by khinklenj December 21, 2022
How do I set Audiences to target on Navigation Link in code.
The text was updated successfully, but these errors were encountered: