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

Add-PnPPublishingPageLayout

Bert Jansen|Last Updated: 2/16/2017

Adds a publishing page layout

Syntax

Add-PnPPublishingPageLayout -SourceFilePath <String>
                            -Title <String>
                            -Description <String>
                            -AssociatedContentTypeID <String>
                            [-DestinationFolderHierarchy <String>]
                            [-Web <WebPipeBind>]

Parameters

ParameterTypeRequiredDescription
AssociatedContentTypeIDStringTrueAssociated content type ID
DescriptionStringTrueDescription for the page layout
SourceFilePathStringTruePath to the file which will be uploaded
TitleStringTrueTitle for the page layout
DestinationFolderHierarchyStringFalseFolder hierarchy where the html page layouts will be deployed
WebWebPipeBindFalseThe web to apply the command to. Omit this parameter to use the current web.

Examples

Example 1

PS:> Add-PnPPublishingPageLayout -Title 'Our custom page layout' -SourceFilePath 'customlayout.aspx' -Description 'A custom page layout' -AssociatedContentTypeID 0x01010901

Uploads the pagelayout 'customlayout.aspx' to the current site as a 'web part page' pagelayout

© 2017 Microsoft