How to bypass the URL check when adding the Navigation Node pnp.core - C# #1330
Unanswered
fischkoder
asked this question in
Q&A
Replies: 1 comment 1 reply
-
@fischkoder : PnP Core SDK is not making the URL relative, it's SharePoint that does that. Can you try with specifying a more complete URL (e.g. https://contoso.sharepoint.com/sites/testsite/SitePages/Home.aspx) to see if that makes a difference? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all,
I am currently working on Adding Navigations(TopNavigationBar, QuickLaunch) of SharePoint Site by using PnP.Core C#.
I try to use
context.Web.Navigation.QuickLaunch.AddAsync(new NavigationNodeOptions { Title = displayName, Url = itemUrl, ParentNode = parentNode );
to add new Navigation node to the root site.
But I found that this API will remove the root domain in the Url then only apply the rest part of Url to Navigation node, which will cause 500 error 'no such file or folder'
For example, if I pass the itemUrl = "https://contoso.sharepoint.com/sites/testsite", the response will show me "/sites/testsite " instead.
I know there is a way to set the Navigation node url as External, but in PnP.Core library, IsExternal it's a read only property now.
So how can I configure the complete/full Url to the navigation node without any removal of root domain?
Beta Was this translation helpful? Give feedback.
All reactions