pnp / pnpcore

The PnP Core SDK is a modern .NET SDK designed to work for Microsoft 365. It provides a unified object model for working with SharePoint Online and Teams which is agnostic to the underlying API's being called
https://aka.ms/pnp/coresdk/docs
MIT License
296 stars 190 forks source link

Unable to create a Quick Launch LABEL #1513

Closed metkhoo closed 5 days ago

metkhoo commented 2 weeks ago

Category

Cannot create a quick launch "LABEL" item when passing in an empty Url. The method ALWAYS creates a Quick Launch LINK.

Steps to reproduce

After getting a context ... newQlNode = await context.Web.Navigation.QuickLaunch.AddAsync(new NavigationNodeOptions { Title = "My Label", Url = string.Empty, });

Expected behavior

Expect this code to create a Quick Launch "LABEL" instead of a Quick Launch "LINK"

Environment details (development & target environment)

Additional context

metkhoo commented 1 week ago

Found a workaround... Set the url to http://linkless.header/ This wil then set the navigator item as a "LABEL" instead of creating a "LiNK"