Table of contents
TOC
Collapse the table of content
Expand the table of content

PageExtensions.AddNavigationFriendlyUrl Method

SharePoint Dev Documents|Last Updated: 5/20/2017
|
1 Contributor

Adds a user-friendly URL for a PublishingPage object.

Namespace:Microsoft.SharePoint.Client
Assembly: OfficeDevPnP.Core.dll

Syntax

public static string AddNavigationFriendlyUrl(this PublishingPage page, Web web, String navigationTitle, String friendlyUrlSegment, NavigationTermSetItem editableParent, Boolean showInGlobalNavigation = True, Boolean showInCurrentNavigation = True)

Parameters

page

  Type: Microsoft.SharePoint.Client.Publishing.PublishingPage
  The target page to add to managed navigation.

web

  Type: Microsoft.SharePoint.Client.Web
  The target web.

  Type: System.String
  The title for the navigation item.

friendlyUrlSegment

  Type: System.String
  The user-friendly text to use as the URL segment.

editableParent

  Type: Microsoft.SharePoint.Client.Publishing.Navigation.NavigationTermSetItem
  The parent NavigationTermSetItem object below which this new friendly URL should be created.

(optional) showInGlobalNavigation

  Type: System.Boolean
  Defines whether the navigation item has to be shown in the Global Navigation, optional and default to true.

(optional) showInCurrentNavigation

  Type: System.Boolean
  Defines whether the navigation item has to be shown in the Current Navigation, optional and default to true.

Return Value

Type: string
The simple link URL just created.

See also

© 2018 Microsoft