Join Simon Allardice for an in-depth discussion in this video Starting off with a minimal master page, part of SharePoint Designer 2007: Branding SharePoint Sites.
We've seen that the easiest way to create your own master page is to copy an existing one, because that gives all the placeholder elements that SharePoint is going to look for along the way. And if you have a MOSS publishing site, you've got quite a few master pages you could copy from. But the problem is that these master pages, let's say, for example, default.master, is so ugly and so full of convoluted code that the process of trying to rip out what you don't need, so you can put in your own design, well that's really painful. It's possible, but it's painful.
But what else could you do? Well, you might be tempted to start from scratch, and you kind of can. You could go to the File menu, create a new piece of SharePoint Content or a New Page, because one of the options will be a Master Page. But this, unfortunately, is a problem too, because this master page is a master page for a generic ASP.NET site. It's not a master page for SharePoint site. So it doesn't have all the necessary content placeholders that you need, and it will be quite a procedure to start going through some of the other master pages and plucking out of the ones that you think it needs and dropping them in here.
Well, what can we do? We do have one option that's kind of close to this blank slate idea. It's called a Minimal Master Page. It doesn't actually exist in SharePoint out-of the-box and neither does it exist in SharePoint Designer. You have to go out to the Web and search for it. So I am going to search for the phrase minimal master page, and the first link here is a How to: Create a Minimal Master Page at msdn.microsoft.com. It sounds tempting.
The idea of a minimal master page and in this very long article, they are also giving you this whole block of code, is you want a master page with all the placeholders you need with the minimum of design. This is exactly what this is. In fact, I am going to copy all this code. There is quite a lot of it that we need. You can just select it and copy it. Oh, there is a little link here called Copy Code. I am going to grab that, Allow access. Go back over here into SharePoint Designer. Make sure that I've selected everything in this page.
It could be just an empty page here and paste it in. This is a minimal master page. It's basically a bunch of the required tags that SharePoint needs. And then, several content placeholders, in fact, a whole bunch of them written there ready to be kind of grabbed and dropped into your own design. So I am going to save this. Yes, I want to save some changes, and it's going to ask me where? Well, it needs to be in the master page gallery, which is under _catalogs/masterpage.
I am going to call this minimal.master. Click Save. I should be able to see it. It's actually down the bottom right now of my masterpage gallery. I could also, should be able to see it, if I go back to my Portal and go into my master page gallery through the browser. I kind of need to do this anyway. I am going to my Site Settings and going to my master pages gallery, which is at the bottom of my Galleries level.
I have minimal.master. This is edited by me. It's counted as a Draft. Well, that means it's not going to be usable until you check it in and publish it and approve it. So I am going to mouse over, check it in. It's going to ask what kind of version do you want. I am going to say the 1.0 published version. It's reminding me up here: Items on this list require content approval. This will not appear in public until approved by someone with proper permissions. Luckily, I have proper permissions. So after checking it in, I can come back down, find minimal.master, select the Approve/reject option. Call it Approved.
Click OK. Now, what? Well, that just means that minimal.master is selected as an approved and checked in master page file in the master page gallery. So, what? Well, we are still not using it. For that, I need to go back to my Site Settings. Go to my Master page option under Look and Feel, and we were in the Master page option under Galleries. We now want to say which one do we actually use, select that one. From the dropdown box, we should have minimal.master and click OK.
Now, go back to the home page. We've got a error here saying there a Duplicate ContentPlaceHolder "head". You can occasionally run into this. It's a little bit of an issue. I am going to find that minimal.master page and open it up. You'll occasionally find that SharePoint Designer itself will kind of drop in this unneeded tag right up at the top. We've got another content placeholder here for head, which we really didn't need at all. I am going to save that. So it is not checked out. Unfortunately, we are going to have to check it out here. Depending on how your authentication is set up, you may have to authenticate.
So I am going to right- click it and select Check Out. It's got the little checkmark saying it's checked out. Now, I should be able to save this. Check it back in, publish a major version. Again, these things that I am doing here could be done in SharePoint Designer or could be done in the browser. It requires content approval. I am going to say no, I don't want to modify it, although I do have to approve it. I am going to switch back to the Web site. It looks like we are actually working with our master page right now.
But just to make sure I've got it all approved, select my minimal.master, approve it, click OK. Back to the Portal. This, right now, is a minimal master page. You may think well, there is obviously a lot of design going on here. And that's absolutely true. But it's about as sparing as you could possibly get. A lot of the actual layout, and it's obvious there is some layout going on, because we've got this area over here of Web Parts, and we've got this kind of 70% area here.
So what? Well, we've actually got - this panel has a attribute of visible = "false". What does that mean? Any of these placeholders exist, as far as SharePoint is concerned, but anything that SharePoint does to fill them will not be seen. The minimal master page may be a better solution and a better starting point for what you want to do as it will allow you to take the necessary placeholders and move them around into your own design.
- Setting site permissions
- Customizing existing CSS files
- Implementing the WCM (Web Content Management) features in SharePoint
- Using master pages
- Designing accessible pages
- Creating a Page Layout template
- Editing and copying themes
- Building out the Publishing Portal
- Customizing navigation