Managing the master pages for Publishing and nonpublishing sites

Jun 14, 2013 at 9:39 AM
I've ran into a couple of small issue's with this solution and wondered if anyone had a way round it.

When we are creating new project sites (subsite) the bootstrap branding is not being applied, i guess this is because its a non publishing site so I went through the process of applying the Master page manually through SPD which worked, however...
  1. Does this mean i now need to manage multiple master pages? I have them both pointing to the same CSS so that side of its fine but if i need to updated the same changes to two master pages it could be a pain long term for the client.
  2. My SP site is being used in a way whereby new projects site will be created on a regular I going to have to go through this manually process each time? I think my client would expect to see the branding applied automatically..
Be interested to hear anyone elses experience on this?

Jun 14, 2013 at 9:54 PM
Edited Jun 14, 2013 at 10:28 PM

The issue you are running into is common with Foundation sites, i.e. sites without publishing enabled. There is no easy way for a non-publishing based site to be told to inherit its Master Page from its parent. You will either need to use powershell, create an event receiver, or feature staple.

The following is an article on creating a solution and event receiver from SP2010. The path for 2013 is basically the same.

If you want to use powershell, you can try something similar to:
$site = Get-SPSite http://yourwebapplication
$site | Get-SPWeb -limit all | % {
     $_.CustomMasterUrl = "/_catalogs/masterpage/customsite.master" 
     $_.MasterUrl = "/_catalogs/masterpage/customsystem.master"  
The catch is this solution is that it will only update the current subsites, not any new ones.

I hope this helps.