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 folder, WebPartEntity webPart, String page, Int32 row, Int32 col, Boolean addSpace)

Parameters

web

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

folder

  Type: System.String
  System name of the wiki page library - typically sitepages

webPart

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

page

  Type: System.String
  Page to add the web part on

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