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

The modern SharePoint Online supports Three page layouts:

  • 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.

#Parameters
$SiteURL = "https://crescent.sharepoint.com/sites/knowledgehub"
$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 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 is a SharePoint Architect with Two decades of SharePoint Experience. He loves sharing his knowledge and experiences with the SharePoint community, through his real-world articles!

Leave a Reply