Share via


PublishingSite.CreatePageLayout method

Creates a new page layout design that is based on an instance of the PageLayoutCreationInformation object.

Namespace:  Microsoft.SharePoint.Publishing
Assembly:  Microsoft.SharePoint.Publishing (in Microsoft.SharePoint.Publishing.dll)

Syntax

'Declaration
Public Shared Sub CreatePageLayout ( _
    parameters As PageLayoutCreationInformation _
)
'Usage
Dim parameters As PageLayoutCreationInformationPublishingSite.CreatePageLayout(parameters)
public static void CreatePageLayout(
    PageLayoutCreationInformation parameters
)

Parameters

Exceptions

Exception Condition
System.ArgumentNullException

The parameters, properties, or both that are required to create a new page layout are null.

Remarks

Use the CreatePageLayout(PageLayoutCreationInformation) method create a new page layout in a web that is based on the master page and content type. The Web property, MasterPageUrl property, NewPageLayoutEditablePath property, NewPageLayoutNameWithoutExtension property, and AssociatedContentTypeId property should not be null in the page layout information parameter that is passed to the method.

See also

Reference

PublishingSite class

PublishingSite members

Microsoft.SharePoint.Publishing namespace