In the standard library for site pages I would like to configure a template for the content type "site pages".

In the settings menu under library settings -> list content type -> advanced settings there is a option "Template: Specify the document template for this content type.".

By default the path "/_layouts/15/CreateSitePage.aspx" is in there.

Is it possible to use a different site page template there?

On the start page there is a template that I have created. But I only get this for selection if I open the "new menu" from the start page and select page. Then a mask opens and I can choose my own template. If I'm in the standard page library for site pages, I can choose the content type:

  • Site page <----Here I would like to set my template.
  • New provisioning page
  • Wiki page
  • Web page

Users should simply get this template open when they click on "Site page" in the library.

My failed attempt: I simply uploaded as a document template the template (.ASPX page) I created in my website library and which is selectable on the start page. After I uploaded it and updated the page, the file name of my template is now in this textbox:


But when I now try to create a new "Websiteseite" via the "New menu", I get the following error:

Object reference not set to an instance of an object.

Korrelations-ID: c2cf319f-1086-9000-7bf6-32992696fc1b

When I click on "Edit Template", I get the following message: "Edit Document requires a Microsoft SharePoint Foundation compatible application and Microsoft Internet Explorer 7.0 or higher".


I’m afraid it is not possible.

I tried to use a URL to a modern site page template under “Enter the URL of an existing document template”, but instead of using the template, it just open the page or the template when clicking New > Site Page.

My guess is that to change the default template, we will need to replace the CreateSitePage.aspx with a custom template in the 15 Hive folder. However, the folder is not accessible for SharePoint Online.

If we upload a custom page or a page template, it leads to the error “Object reference not set to an instance of an object.”


This is because the Site Pages library still uses Content Types. The other 'New' menus on the start page and from other pages don't, they use the new page templates functionality. Reading between the lines, if MS haven't implemented a consistent 'New' menu option for pages in the Site Pages library it's maybe because content types for site pages are going to go away or change dramatically in how they are managed via the new Content Service admin center.

This is likely to be the best option in the short term for deploying page templates: https://mattipaukkonen.com/2020/07/02/distribute-sharepoint-page-templates-with-pnp-powershell-and-provisioning-templates/, then inform your users to not create pages from the library menu.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.