Don’t Delete OOTB SharePoint Page Layouts

For years I have told students who were creating new page layouts for their SharePoint publishing or Enterprise Wiki (in the case of SP2013) sites that they can optionally delete the default page layouts that come with the site.  I am here to officially rescind that advice!

My new recommendation is to keep those page layouts around just in case your site has issues one day and you need to walk through applying or removing the application of a custom master page or other related files to debug a issue.  When a problem arrises in a site usually my first step is to make sure the issue is not stemming from any custom files and that the problem can be duplicated in an OOTB SharePoint site on the same server and/or within the same site collection.

Usually custom page layouts reference custom ContentPlaceHolders in the master page and once you pull that master page then things can get 10 kinds of hairy with testing your publishing pages.  You need to be able to have a fall back where you can create a subsite using OOTB branding and page layouts to test and debug.

What should be done on all sites whether there are custom page layouts or not, is restrict the available page layouts on a site by site basis (or subsite by subsite) through a simple modification in the Site Settings.   This option has been around for quite some time in SharePoint and is often underutilized.

  1. Go to Site Settings.
  2. Under “Look and Feel” select Page layouts and site templates.
  3. Modify the allowed site templates and page layouts for that site/subsite.  For example, if the subsite is for Human Resources, only allow page layouts that HR personnel need to be using for new publishing pages.
    1. Select Subsites can only use the following site templates AND/OR Pages in this site can only use the following layouts.
    2. Add/remove site templates and page layouts appropriately.
  4. Select OK.
  5. Go back into the Page layouts and site templates screen and go to the bottom, New page default settings.   Select the page layout most commonly used by the site/subsite.

Doing the above is a simple and quick task that can greatly improve the content owner/editor end user experience in your SharePoint publishing sites.

If you ever run into trouble you can:

  1. Create a subsite.
  2. Follow the steps above to reach the Page layouts and site templates screen for that subsite.
  3. Under Page Layouts select Pages in this site can use any layout.  Select OK.
  4. Go to your subsite home page or test page and change the page layout to something that SharePoint ships with, such as an Article Page or Welcome Page.
  5. Switch to the OOTB default branding (such as v4 or seattle) for that subsite.
  6. Test away.

If you have ditched your OOTB page layouts and find yourself in this predicament, then just add the page layout files back to the Master Page Gallery, making sure you set the content type to Page Layout for the file.