Ok, so this may be super obvious to all you SharePointers out there, but it wasn't in any way obvious to me. This took me an afternoon to get all these pieces together, so I thought I would share.
I saw a dozen articles talking about how to get your subsites to inherit a custom master page from a site, but I couldn't find much that talked about setting a custom master page for a subsite that differs from the master page for the parent site. And much of what I found didn't really help me, because SharePoint security hides a lot of the Site Settings from you if you're not a Site Collection admin, even if you have full control and design privileges.
Note: I am not a SharePoint expert; quite the opposite, I am a novice. I may get a bunch of this wrong, so please feel free to leave comments and correct me.
Create your custom master page
For any of this to be relevant, you need to create a master page and get it into the master page library of the Site Collection. To do this, I mapped a drive via Windows Explorer to the SharePoint master page library directory. Once I had the drive mapped and opened in explorer, I took an existing master page and edited the corresponding .html file. That link above is a pretty good source of info on how to do this. As you save your .html file to that directory, SharePoint converts it over to a .master file.
One thing I didn't know about this mapped drive was that behind the scenes, because SharePoint is using WebDAV, it's keeping versions of the file as you save them, if the library is configured that way. We'd been trying to figure out source control for SharePoint, and this provided us with the mechanism.
Publish your master page
For the custom master page to appear in the list of pages that we'll get to later, you need to publish it. Go into the site collection Master Pages library, and find the file you just saved. Once you do that, you can publish that file. You are only able to publish the .html file, though. Trying to push the new master file fails.
Set the master page
Go to the subsite for your new custom master page. Go to the site settings and manage site features. Now, you might be able to see the "Manage Site Features" link if you have full control and design privileges, but no, even those don't allow you to do the next step. We had to give my account site collection administrator privs to activate Sharepoint Server Publishing. Why do you have to do that? Without that site feature activated, you can't see the link "Master Page" where you can change the master page for the subsite.
Go back to your site settings. Under Look and Feel, now you can see "Master Page". Click in there and set your master page to be your new custom master page (using the dropdown).
It's really that simple. I found a number of places that said "just click Master Page", but couldn't find the link. That's how to do it!
Go forth and SharePoint!
No comments:
Post a Comment