Mann Software
Mann Software > SharePoint and the Office System > Posts > Changing the MasterPage for Publishing Sites
Changing the MasterPage for Publishing Sites

I knew this at one time, but my Swiss cheese brain apparently forgot it at some point…

Simply changing <SPWeb>.MasterURL works perfect for WSS and Application pages, etc. However, it's only half of the answer when you toss publishing and layout pages into the mix. In that case, you also need to set <SPWeb>.CustomMasterURL:

site.MasterUrl = myNewMasterURL;

site.CustomMasterUrl = myNewMasterURL;

site.Update();

Dave

Comments

There are no comments yet for this post.
SharePoint Server MVP Community Kit for SharePoint Philly Office Geeks ISPA