How to Change the Page Layout of a Modern SharePoint Online Page?

Requirement: Change the page layout in modern SharePoint Online sites.

How to change the page layout in SharePoint Online?

In SharePoint Online, a page layout is a predefined design for a page that determines the overall look and feel of the page, including the layout of the content, the location of web parts and other page elements, and the styles and formatting applied to the page. Page layouts are used to create a consistent look and feel for the pages in a SharePoint site, and can be customized by site administrators to meet the specific needs of the site.

By default, SharePoint Online includes a number of predefined page layouts that are available for use, depending on the site template that was used to create the site. Site administrators can also create custom page layouts if the default layouts do not meet the needs of the site.

The modern SharePoint Online supports 3-page layouts in total:

  • Home Page Layout – Used by the landing page, comes with no banner on the top.
  • Article Page Layout – Default page layout for modern pages comes with a top banner.
  • Single Part App Page Layout – To host a single web part

If you want to change the page layout, there are no UI ways to do it today! However, PowerShell can help:

PnP PowerShell to Change the Page Layout in SharePoint Online:

We wanted a top banner to appear on the Home page! So, here is the PowerShell to set the page layout for a modern SharePoint Online page.

$SiteURL = ""
$PageName = "Home.aspx"
$PageLayout = "Article" #Home, Article, SingleWebPartApp

#Connect to PnP Online
Connect-PnPOnline -Url $SiteURL -Interactive

#Set the Page Layout
Set-PnPPage -Identity $PageName -LayoutType $PageLayout

If you are using the Legacy PnP PowerShell module, use “Set-PnPClientSidePage” instead of the Set-PnPPage cmdlet in the above script. My home page layout changed to an Article page with a banner:

change page layout in sharepoint online

Here is a related post to change the page layout from Home to Article: How to Remove the Top Banner from SharePoint Online Modern Pages?

Salaudeen Rajack

Salaudeen Rajack - Information Technology Expert with Two-decades of hands-on experience, specializing in SharePoint, PowerShell, Microsoft 365, and related products. He has held various positions including SharePoint Architect, Administrator, Developer and consultant, has helped many organizations to implement and optimize SharePoint solutions. Known for his deep technical expertise, He's passionate about sharing the knowledge and insights to help others, through the real-world articles!

One thought on “How to Change the Page Layout of a Modern SharePoint Online Page?

  • I can not seem to get this to work for me, as the Connect-PnPOnline seems to not be recognized as a cmdlet.


Leave a Reply

Your email address will not be published. Required fields are marked *