Starter Master Pages for SharePoint 2010 (Formerly Known as Minimal Master Pages) 30

In the tradition of those SharePoint branding folks that came before me, I have put together two minimal master pages that can be used to start a SharePoint 2010 Branding project. They contain only very minimal HTML styling in order to accommodate some of the specific needs of SharePoint 2010 and are commented throughout. I hope you find them useful as a good starting point for creating branded SharePoint sites. If you make improvements upon them that could be used to improve the Starter Master Page experience for others, please share the changes with me so that I can potentially roll them into the main distribution.

Note: With SharePoint 2010, Microsoft has actually included their own master page called minimal.master which has a specific use for pages that will have very minimal chrome. Because of this, I am using the term Starter Master Page for my Master Pages instead of the term Minimal Master Page.

 

Here is the link to download the CodePlex project:

Starter Master Pages for SharePoint 2010 

UPDATE: 2010 Starter Master Pages can be found here:  http://startermasterpages.codeplex.com/releases/view/41533

 

I have copied and pasted my notes from the CodePlex site here, please read them if you intend to use the Starter Master Pages:

  • I am placing them on CodePlex and will be releasing updated versions as time goes on
  • They are currently considered a beta release
  • Please send feedback (here or on my blog, http://blog.drisgill.com) on problems or changes that you think would help everyone
  • Use at your own risk!
  • There are two versions of my Starter Master Pages:
    • _starter.master – Specifically for use with SharePoint Server 2010
    • _foundation_starter.master – Specifically for use with SharePoint Foundation 2010
  • These two versions are extremely similar. The primary difference being the navigation and corresponding data sources
  • The Starter Master Pages should work with all out of the box SharePoint 2010 pages including Application pages (like Site Settings) and Lists and Documents
  • Replace the word “SiteName” throughout the code with your project site’s name and directory
  • There are some minimal styles included and are commented accordingly.
  • All styles and images are loaded from the Style Library with simple “/Style Library/sitename” references. This helps with viewing them in Design View in SharePoint Designer 2010. Some deployment instances may require a more robust path usage (such as branding that is deployed to Site Collections that are not at the root web site). In these cases you can either place your styles and images in the 14 folder on the server (_layouts) or use the $SPUrl variable (more info here: http://msdn.microsoft.com/en-us/library/ee354190.aspx#odcsp2007RealWorldBrand_CreatingBrandinSP)
  • The SharePoint 2010 standard Ribbon controls are being used. This is the same code as in v4.master and NightAndDay.master only with the addition of some comments
  • The Starter Master Pages employ the standard SharePoint 2010 technique of forcing the Ribbon to “stick” to the top of the page. This is why the ribbon and main body areas are wrapped in specific div classes
  • There are two div’s that have custom classes, “customLeftNavHolder” and “customBodyHolder”. These are required to handle the left navigation and main content areas with minimal HTML and also will allow for hiding of the left navigation when SharePoint 2010 Dialogs are in use
  • There are several div’s throughout that have a class of “s4-notdlg”. This is the standard SharePoint 2010 method of hiding branding (like logos and navigation) from the SharePoint 2010 Dialog windows
  • I have tried to identify most of the ContentPlaceHolder’s that actually contain content in the out of the box SharePoint 2010 pages and included them in the displayable areas of the Starter Master Pages. All other unneeded (but required) ContentPlaceHolder’s are relegated to the hidden asp:Panel at the bottom of the master page.

Other optional things I have included because I think they are helpful (you can remove as needed, the approximate line number in _starter.master is included):

  • Line 24 – Favicon code
  • Line 92 – JavaScript to address the ActiveX Name.DLL issue (See http://support.microsoft.com/default.aspx/kb/931509 for more info)
  • Line 388 – Class “s4-nosetwidth” is being used to allow for fixed width branding (See http://msdn.microsoft.com/en-us/library/ee539981(office.14).aspx for more info)
  • Line 393 – An area for a header logo that has a link back to the home (you can replace this with the site icon and title if you prefer. See lines 308-317 from v4.master)
  • Line 498 – A footer area for a copyright notice
  • Line 503 – The Developer Dashboard code (which is turned on from STSADM or Powershell).
  • Line 571 – WarnOnUnsupportedBrowsers is being used at the very bottom of the Starter Master Pages to alert IE6 users that the browsing experience is deprecated

30 thoughts on “Starter Master Pages for SharePoint 2010 (Formerly Known as Minimal Master Pages)

  1. Reply eric Nov 18, 2009 1:28 pm

    Your tips for 2010 have been great and I can’t wait to start planning for our upgrade. All your tips and these master pages are a great resource.

  2. Reply hank Dec 8, 2009 3:12 am

    Hello Randy and thanks for the great asset. I have only one problem so far – though a very humiliating one ;/ Now… I am´using a Visual Studio 2010 Beta 2 and I can’t figure out, how to add the master page to the solution in the most elegant way. I haven’t found any examples about how to implement master pages on 2010 in the web either. Can you help?

    rgrds. hank

  3. Reply Anonymous Dec 17, 2009 12:57 pm

    Hi Randy,

    Have you looked into how to remove the ribbon at all for unauthorised users? another problem, with the ribbon is its persistence at the top of the page and the affect it has on the background.

  4. Reply sbr0 Jan 12, 2010 11:28 am

    The Starter.master does not seem to have a breadcrumb.

  5. Reply Randy Drisgill Jan 12, 2010 12:11 pm

    Depends what you mean by breadcrumb the little icon in the top left is how breadcrumbs work in the 2010. The other stuff you see in the ootb master pages from what I can tell are not truly breadcrumbs. Where you referring to the big text that appears in the ribbon of v4.master when you aren’t editing the page?

  6. Reply nonsolosharepoint Jan 13, 2010 8:00 am

    Hi Randy, first of all thanks a lot for your books and your useful tips on the web. About the question on how to remove the ribbon “place” for the anonymous and/or unauthorized, I’ve used the SPSecurityTrimmedControl. Even if the PopoutMenu is the new breadcrump it can be that customers don’t want it. I’ve also write a post about that (ok, it’s in Italian :-( )
    Again, thanks a lot,
    Barbara

  7. Reply sbr0 Jan 13, 2010 10:23 am

    I am referring to what appears in the ribbon of the v4.master. On a previous site we configured that to show when the page was not in edit mode. I like how your starter.master hides this area so I have now pasted a traditional breadcrumb from another master page.

  8. Reply Randy Drisgill Jan 13, 2010 10:36 am

    Yeah, thats the breadcrumb I was referring to. I made a decision to leave that out of the starter for two reasons. 1. its not in nightandday.master so it must not be considered critical. 2. its not really a breadcrumb but just the site title pushed next to the page title with an arrow between them.

  9. Reply Dan Jan 15, 2010 10:51 pm

    Randy: Is there a way to bring the Starter master directly into SP or into SPD, without VS? If I upload the master to the Master Pages gallery, it doesn’t appear in SPD (even after “approval”). Sorry. My first time branding SP and it has to be SP2010 ;-)

  10. Reply Randy Drisgill Jan 15, 2010 11:17 pm

    Dan, try this. Open your SharePoint site in SPD2010. Click on Master Pages in the Site Objects menu on the left. Drag your master page into the list on the right. This should add it to the correct location in SharePoint. You can then open it and edit it. You will need to check-in / approve it before you can select it in the SharePoint UI.

  11. Reply Smriti Singh Feb 18, 2010 8:56 am

    Hi Randy,

    Wonderful post to start working on master page creation for MOSS 2010.

    I want to know if there is a default stylesheet available for _starter. master or we will have to make the CSS from scratch.It would be a lot of work creating own styles and copying default styles from core4.css
    In MOSS 2007 I used to customize BlueBand.master and its associated css to create customized master page.

  12. Reply Randy Drisgill Feb 18, 2010 12:28 pm

    Right now, I don’t have any plans for releasing any CSS to go with the starter master page. Its meant really to be a blank canvas. What I might do though is post a sample website that is created with it and all the CSS that goes with it.

    I think the most useful CSS right now, might be for styling the new simple rendered navigation.

  13. Reply Smriti Singh Feb 19, 2010 2:51 am

    Okay then I will create classes for the starter master.
    But there are certain classes defined in _starter.master like customBodyHolder, s4-notdlg, customLeftNavHolder, s4-status-s1.Where can I find the styles defined for these classes.

  14. Reply Randy Drisgill Feb 20, 2010 4:04 pm

    Anything starting with s4 is Microsoft’s CSS that can be found typically in corev4.css. You can override them if you’d like but in the case of s4-notdlg it is critical for hiding branding from the new 2010 dialog boxes. For the non s4 classes, I actually think I will phase those out in the final version of the _starter master page (to be uploaded soon) as there are s4 styles that could work better for them.

  15. Reply ollyandrews Feb 26, 2010 5:50 am

    Hi Randy,
    Firstly I just wanted to say thanks for these, they should be very useful.

    I am having problems however using them, both appear to give me a 404 file not found error when selecting them. Have you got any idea what I could be doing wrong?

    Thanks in advance :-)

  16. Reply ollyandrews Feb 26, 2010 6:11 am

    Hi Randy,
    Please ignore my last post. Fixed it now.

    FYI, it was the following lines which were causing me the issue:

    < %@ Register TagPrefix="wssuc" TagName="Welcome" src="~/_controltemplates/Welcome.ascx" %>
    < %@ Register TagPrefix="wssuc" TagName="DesignModeConsole" src="~/_controltemplates/DesignModeConsole.ascx" %>
    < %@ Register TagPrefix="wssuc" TagName="MUISelector" src="~/_controltemplates/MUISelector.ascx" %>

    The link to _controltemplates needed a ~/ (tilda forward slash) before it.

    Regards,

    Olly

  17. Reply Bilal Mar 3, 2010 6:16 pm

    when will your book Professional SharePoint 2010 Branding and User Interface Design be available to read?

  18. Reply Randy Drisgill Mar 3, 2010 7:54 pm

    The book will be out in the middle of the year. Still have to write a lot of it ;)

  19. Reply oman Mar 10, 2010 3:19 am

    hi randy…

    i’m new in sharepoint…

    i’ve download your masterpage from code plex…

    then i apply your masterpage in my website…

    unfortunately anonymous cannot access the website…

    showing unauthorized error…

    do u have any idea how to allow the anonymous??

    thanks…

  20. Reply Pasindu Apr 15, 2010 1:14 am

    Hi Randy,

    when I use Starter Master I got following message in setting page

    Warning: The selected master page has no approved version. This site may appear to be broken to users without the view versions right in the Master Page Gallery.

  21. Reply Randy Drisgill Apr 15, 2010 1:26 am

    Pasindu, publish a major verion and approve it. That should be all you need to do.

  22. Reply Jesse Jul 23, 2010 1:09 pm

    Hi Randy,

    These master pages have been a huge help – Thank you!

    You probably already know this, but I’ll mention it here anyways in an effort to add to the conversation. If you create a Publishing Site or Enterprise Search center, the starter.master isn’t working quite right for me. I’ll probably end up blending your starter master with v4.master to get things working for publishing sites, too. For search, I’ll compare the default minimal.master with your starter.master to try to get that functioning properly. If you’ve overcome these issues, I’d be interested in your solution.

  23. Reply Randy Drisgill Jul 23, 2010 1:28 pm

    Publishing should be fine, for the search center, you need to base your work off of minimal.master. I plan to post about that very soon.

  24. Reply Jesse Jul 23, 2010 3:30 pm

    Yep, publishing is fine – my mistake. Started over w/ stater.master and trying to see where I went wrong. Thanks again for your help!

  25. Reply Rebecca Warriner Oct 19, 2010 9:43 am

    Very helpful, thx. Question – have you seen the scroll bar on the body being ‘hidden’ by the bottom of the browser? meaning we can move the scroll bar but we can’t see it because it is behind and below the bottom of my browser. Seeing this in IE and FF. Thoughts on this?

  26. Reply issnet Dec 10, 2010 7:43 am

    Hello Randy;

    I don´t know if someone had face the same problem as mine.

    I have a publishing site, that I created in SharePoint 2010. And it is a frontend website for internet anonymous access.

    My site work fine with dayandnight master page but when I set the starter publishing master page, the access to the site back to authentication access and don´t let anonymous access.

    Also I went to know where I can put the images, css and javascript files, it will be good to put them in the SiteAssets folder ?

    Regards

  27. Reply issnet Dec 10, 2010 11:04 am

    I already find the solution, it was because I didn´t approve the master page.

    Now it is working fine.

  28. Reply Magnus Hansson Jan 20, 2012 3:38 am

    About Branding SharePoint: http://maghansson.blogspot.com/2012/01/developing-sharepoint-interface.html
    What do you think about the separation of the Presentation logic and the design artifacts ?

  29. Reply Randy Drisgill Jan 20, 2012 10:17 am

    Magnus, interesting article. In some ways your presentation solution is similar to how the old themes worked in 2007… or maybe Alternate CSS.

    I’m not opposed to the idea. I haven’t tried your code, but it would be cool if it were a sandbox solution. While I see pro’s and con’s to putting the assets on the file system, I think for mass consumption it might be more user friendly if the assets were stored in the site collection.

Leave a Reply