Set-PnPClientSidePage

Sets parameters of a Client-Side Page

Syntax

Set-PnPClientSidePage
   -Identity <ClientSidePagePipeBind>
                        [-ServerRelativeImageUrl <String>]
                        [-TranslateX <Double>]
                        [-TranslateY <Double>]
                        [-Name <String>]
                        [-Title <String>]
                        [-LayoutType <ClientSidePageLayoutType>]
                        [-PromoteAs <ClientSidePagePromoteType>]
                        [-CommentsEnabled [<SwitchParameter>]]
                        [-Publish [<SwitchParameter>]]
                        [-HeaderType <ClientSidePageHeaderType>]
                        [-ContentType <ContentTypePipeBind>]
                        [-Web <WebPipeBind>]
                        [-Connection <SPOnlineConnection>]

Examples

------------------EXAMPLE 1------------------

Set-PnPClientSidePage -Identity "MyPage" -LayoutType Home -Title "My Page"

Updates the properties of the Client-Side page named 'MyPage'

------------------EXAMPLE 2------------------

Set-PnPClientSidePage -Identity "MyPage" -CommentsEnabled

Enables the comments on the Client-Side page named 'MyPage'

------------------EXAMPLE 3------------------

Set-PnPClientSidePage -Identity "MyPage" -CommentsEnabled:$false

Disables the comments on the Client-Side page named 'MyPage'

------------------EXAMPLE 4------------------

Set-PnPClientSidePage -Identity "MyPage" -HeaderType Default

Sets the header of the page to the default header

------------------EXAMPLE 5------------------

Set-PnPClientSidePage -Identity "MyPage" -HeaderType None

Removes the header of the page

------------------EXAMPLE 6------------------

Set-PnPClientSidePage -Identity "MyPage" -HeaderType Custom -ServerRelativeImageUrl "/sites/demo1/assets/myimage.png" -TranslateX 10.5 -TranslateY 11.0

Sets the header of the page to custom header, using the specified image and translates the location of the image in the header given the values specified

Parameters

-CommentsEnabled

Enables or Disables the comments on the page

Only applicable to: SharePoint Online, SharePoint Server 2019

Type:SwitchParameter
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-Connection

Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Only applicable to: SharePoint Online, SharePoint Server 2019

Type:SPOnlineConnection
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-ContentType

Specify either the name, ID or an actual content type.

Only applicable to: SharePoint Online

Type:ContentTypePipeBind
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-HeaderType

Sets the page header type

Only applicable to: SharePoint Online, SharePoint Server 2019

Type:ClientSidePageHeaderType
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-Identity

The name/identity of the page

Only applicable to: SharePoint Online, SharePoint Server 2019

Type:ClientSidePagePipeBind
Position:0
Accept pipeline input:True
Accept wildcard characters:False
-LayoutType

Sets the layout type of the page. (Default = Article)

Only applicable to: SharePoint Online, SharePoint Server 2019

Type:ClientSidePageLayoutType
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-Name

Sets the name of the page.

Only applicable to: SharePoint Online, SharePoint Server 2019

Type:String
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-PromoteAs

Allows to promote the page for a specific purpose (HomePage | NewsPage)

Only applicable to: SharePoint Online, SharePoint Server 2019

Type:ClientSidePagePromoteType
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-Publish

Publishes the page once it is saved.

Only applicable to: SharePoint Online, SharePoint Server 2019

Type:SwitchParameter
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-ServerRelativeImageUrl

The URL of the image to show in the header

Only applicable to: SharePoint Online, SharePoint Server 2019

Type:String
Position:0
Accept pipeline input:False
Accept wildcard characters:False
-Title

Sets the title of the page.

Only applicable to: SharePoint Online, SharePoint Server 2019

Type:String
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-TranslateX

A value defining how to translate the image on the x-axis

Only applicable to: SharePoint Online, SharePoint Server 2019

Type:Double
Position:0
Accept pipeline input:False
Accept wildcard characters:False
-TranslateY

A value defining how to translate the image on the y-axis

Only applicable to: SharePoint Online, SharePoint Server 2019

Type:Double
Position:0
Accept pipeline input:False
Accept wildcard characters:False
-Web

This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead. Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit this parameter to use the current web.

Only applicable to: SharePoint Online, SharePoint Server 2019

Type:WebPipeBind
Position:Named
Accept pipeline input:False
Accept wildcard characters:False