Minimal SharePoint Master Page

I often get asked about how to go about customising a WSS/MOSS master page.

Here is the advice I give:

  1. Don’t for the love of the children try to write one from scratch! You will end up pulling out your hair and banging your head against a brick wall. Start with one of the out of the box ones, and remove/change the bits you want.
  2. Start with the Minimal.master page up on MSDN. This is a very basic bare bones master page. It has everything you need in a masterpage, but no look and feel. You can then go and add everything you need.

Get it here:

How to: Create a Minimal Master Page:

Comments (7)

  1. Sean de Jager says:

    Hey Chris,  The minimal Master page code fails when using it as a default.master page for standard WSS.  We don’t use MOSS.  Is this code surposed to work or is there some things that have to be removed?  THe site error states that a file cannot be found.  I suspect the code references extra stuff in there that is only for MOSS.    Any ideas on what stuff should be taken out.

  2. Sean de Jager says:

    <%@ Master language="C#" %>

    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" ""&gt;

    <%@ Import Namespace="Microsoft.SharePoint" %>

    <%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>

    <%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>

    <%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>

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

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

    <html dir="<%$Resources:wss,multipages_direction_dir_value%>" runat="server" xmlns:o="urn:schemas-microsoft-com:office:office" __expr-val-dir="ltr">

    <head runat="server">

    <WebPartPages:SPWebPartManager runat="server" />

    <SharePoint:RobotsMetaTag runat="server" /><%– The head section includes a content placeholder for the page title and links to CSS and JavaScript files that run on the server. –%>

    <asp:ContentPlaceHolder runat="server" id="head">


      <asp:ContentPlaceHolder id="PlaceHolderPageTitle" runat="server" />



    <Sharepoint:CssLink runat="server" />

    <asp:ContentPlaceHolder id="PlaceHolderAdditionalPageHead" runat="server" />



    <form runat="server" onsubmit="return _spFormOnSubmitWrapper();">

    <wssuc:Welcome id="explitLogout" runat="server" />

    <SharePoint:SiteActions runat="server" AccessKey="<%$Resources:wss,tb_SiteActions_AK%>" id="SiteActionsMenuMain" PrefixHtml="&lt;div&gt;&lt;div&gt;" SuffixHtml="&lt;/div&gt;&lt;/div&gt;" MenuNotVisibleHtml="&amp;nbsp;">


                 <SharePoint:featuremenutemplate runat="server"






                  <SharePoint:menuitemtemplate runat="server" id="MenuItem_Create"








                   PermissionsString="ManageLists, ManageSubwebs"

                   PermissionMode="Any" />

                  <SharePoint:menuitemtemplate runat="server" id="MenuItem_EditPage"








                  <SharePoint:menuitemtemplate runat="server" id="MenuItem_Settings"









                   PermissionMode="Any" />




    <asp:ContentPlaceHolder id="PlaceHolderMain" runat="server" />

     <asp:Panel visible="false" runat="server">

      <asp:ContentPlaceHolder id="PlaceHolderSearchArea" runat="server"/>

      <asp:ContentPlaceHolder id="PlaceHolderTitleBreadcrumb" runat="server"/>

      <asp:ContentPlaceHolder id="PlaceHolderPageTitleInTitleArea"  runat="server"/>

      <asp:ContentPlaceHolder id="PlaceHolderLeftNavBar" runat="server"/>

      <asp:ContentPlaceHolder ID="PlaceHolderPageImage" runat="server"/>

      <asp:ContentPlaceHolder ID="PlaceHolderBodyLeftBorder" runat="server"/>

      <asp:ContentPlaceHolder ID="PlaceHolderNavSpacer" runat="server"/>

      <asp:ContentPlaceHolder ID="PlaceHolderTitleLeftBorder" runat="server"/>

      <asp:ContentPlaceHolder ID="PlaceHolderTitleAreaSeparator" runat="server"/>

      <asp:ContentPlaceHolder ID="PlaceHolderMiniConsole" runat="server"/>

      <asp:ContentPlaceHolder id="PlaceHolderCalendarNavigator" runat ="server" />

      <asp:ContentPlaceHolder id="PlaceHolderLeftActions" runat ="server"/>

      <asp:ContentPlaceHolder id="PlaceHolderPageDescription" runat ="server"/>

      <asp:ContentPlaceHolder id="PlaceHolderBodyAreaClass" runat ="server"/>

      <asp:ContentPlaceHolder id="PlaceHolderTitleAreaClass" runat ="server"/>





  3. So I was asked by a partner of mine to help them create a minimal.master page for WSS. No problems, I’ve

  4. So I was asked by a partner of mine to help them create a minimal.master page for WSS. No problems, I&#39;ve

  5. Jayanth says:

    I want to add a menu item in sharepoint 2007. If you open the sharepoint home page you can see the webparts available there. If you click document library link it will take you to the respective page. There you can see list of documents under related documents. If you click any document it will show a combobox with options as view properties, edit properties, manage permissions, edit in Microsoft office word, delete, sent to option as other location, e-mail a link, create document workspace, and download a copy. Here in this send to menu I want to add another item called Fax. I want to do this in C# 2.0. Should I create web application or website for this? How to do this? Please help me.