SharePoint Online: Create a New Page from Template

Requirement: Create a new page from an existing page template in SharePoint Online.

SharePoint Online: How to Create a new page from the template?

A page template in SharePoint Online provides a consistent look and feel and reusability for any child pages created from it. This can save you time and effort when creating new pages, as you can use a predefined layout and content as a starting point. In this post, we will go over the steps to create a page in SharePoint Online from a template.

To clone an existing page, Just navigate to your SharePoint Online page to copy, click on “New”, and choose “Copy of this news post” from the menu.

create a page from existing page in sharepoint online

Similarly, If you have a page saved as a template, You can create a new page from it by picking the custom template you had created.

  1. From the Home page of your SharePoint Online site, click on “New” >> Page.
  2. Under “Templates”, select the page template we created.
  3. Click on “Create post”.
create page from template sharepoint online

PowerShell to Create a Page from Template in SharePoint Online

Using templates to create pages in SharePoint Online is a simple and efficient way to manage your content and ensure that your site maintains a consistent look and feel. We can use PowerShell to make new pages from the existing page template.

#Parameters
$SiteURL = "https://Crescent.sharepoint.com/sites/Marketing"
$TemplateURL = "Templates/Bio.aspx"
$PageNames = @("Bio-Salaudeen.aspx","Bio-Sam.aspx","Bio-Mark.aspx","Bio-David.aspx")

#Connect to the Site
Connect-PnPOnline -Url $SiteURL -Interactive

#Get the Page template
$Template = Get-PnPClientSidePage $TemplateURL
   
#Create each page from Template
ForEach($Page in $PageNames)
{
    $Template.Save($Page)
}

You can further manipulate the pages, like setting the page title, adding content to the page, adding the page to navigation, etc. To add the page to the navigation, use the following:

#Parameters
$SiteURL = "https://crescent.sharepoint.com/sites/retail"
$PageURL = "/sites/Retail/SitePages/Team-Documents.aspx"
$PageTitle = "Team Documents"

#Connect to PnP Online
Connect-PnPOnline -Url $SiteURL -Interactive
 
#Add page to the left navigation
Add-PnPNavigationNode -Title $PageTitle -Url $PageURL -Location "QuickLaunch"

Conclusion

In conclusion, creating pages from templates in SharePoint Online is a useful way to save time and effort when creating new pages. By following the steps outlined in this tutorial, you can easily create a page in SharePoint Online using a predefined layout and content as a starting point. This can be especially useful when you need to create multiple pages that have a similar structure and content, or when you want to ensure that all pages on your site follow a consistent design.

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!

2 thoughts on “SharePoint Online: Create a New Page from Template

Leave a Reply

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