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

PublishingExtensions.AddPublishingPage Method

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

Adds the publishing page.

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

Syntax

public static void AddPublishingPage(this Web web, String pageName, String pageTemplateName, String title, Boolean publish = False, Folder folder, Nullable<DateTime> startDate, Nullable<DateTime> endDate, Boolean schedule = False)

Parameters

web

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

pageName

  Type: System.String
  Name of the page.

pageTemplateName

  Type: System.String
  Name of the page template/layout excluded the .aspx file extension.

(optional) title

  Type: System.String
  The title of the target publishing page.

(optional) publish

  Type: System.Boolean
  Should the page be published or not?

(optional) folder

  Type: Microsoft.SharePoint.Client.Folder
  The target folder for the page, within the Pages library.

(optional) startDate

  Type: System.Nullable<System.DateTime>
  Start date for scheduled publishing.

(optional) endDate

  Type: System.Nullable<System.DateTime>
  End date for scheduled publishing.

(optional) schedule

  Type: System.Boolean
  Defines whether to define a schedule or not.

Return Value

Type: void

See also

© 2018 Microsoft