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

NavigationExtensions.AddNavigationNode Method

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

Add a node to quick launch, top navigation bar or search navigation. The node will be added as the last node in the collection.

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

Syntax

public static NavigationNode AddNavigationNode(this Web web, String nodeTitle, Uri nodeUri, String parentNodeTitle, NavigationType navigationType, Boolean isExternal = False, Boolean asLastNode = True)

Parameters

web

  Type: Microsoft.SharePoint.Client.Web
  Site to be processed - can be root web or sub site

nodeTitle

  Type: System.String
  the title of node to add

nodeUri

  Type: System.Uri
  the url of node to add

parentNodeTitle

  Type: System.String
  if string.Empty, then will add this node as top level node

  Type: OfficeDevPnP.Core.Enums.NavigationType
  the type of navigation, quick launch, top navigation or search navigation

(optional) isExternal

  Type: System.Boolean
  true if the link is an external link

(optional) asLastNode

  Type: System.Boolean
  true if the link should be added as the last node of the collection

Return Value

Type: NavigationNode
Newly added NavigationNode

See also

© 2018 Microsoft