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:
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 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