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

PageExtensions.AddWebPartToWikiPage Method

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

Add web part to a wiki style page

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

Syntax

public static WebPartDefinition AddWebPartToWikiPage(this Web web, String serverRelativePageUrl, WebPartEntity webPart, Int32 row, Int32 col, Boolean addSpace)

Parameters

web

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

serverRelativePageUrl

  Type: System.String
  Server relative url of the page to add the webpart to

webPart

  Type: OfficeDevPnP.Core.Entities.WebPartEntity
  Information about the web part to insert

row

  Type: System.Int32
  Row of the wiki table that should hold the inserted web part

col

  Type: System.Int32
  Column of the wiki table that should hold the inserted web part

addSpace

  Type: System.Boolean
  Does a blank line need to be added after the web part (to space web parts)

Return Value

Type: WebPartDefinition
Returns the added Microsoft.SharePoint.Client.WebParts.WebPartDefinition object

See also

© 2018 Microsoft