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

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

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 as of 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 “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 - SharePoint Expert with Two decades of SharePoint Experience. Love to Share my knowledge and experience with the SharePoint community, through real-time articles!

Leave a Reply

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