|
|
The SharePoint People > Blog > Posts > Minimal Master Page WSS 3.0
|
7/14/2009
Creating MOSS or WSS master pages from scratch can be a painful process. I have noticed a number of posts outlining Minimal Master Pages for MOSS, but could not find a good posting on a WSS 3.0 Minimal Master Page.
Paste the Markup below into a .master page file for a quick way to get started on a new Mater Page.
-------------------------------------------------------------------- <%@Master language="C#"%> <%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Import Namespace="Microsoft.SharePoint" %> <%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %> <%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=12.0.0.0, 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"> <META Name="GENERATOR" Content="Microsoft SharePoint"> <META Name="progid" Content="SharePoint.WebPartPage.Document"> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8"> <META HTTP-EQUIV="Expires" content="0"> <SharePoint:RobotsMetaTag runat="server"/> <Title ID=onetidTitle><asp:ContentPlaceHolder id=PlaceHolderPageTitle runat="server"/></Title> <SharePoint:CssLink runat="server"/> <SharePoint:Theme runat="server"/> <SharePoint:ScriptLink language="javascript" name="core.js" Defer="true" runat="server"/> <SharePoint:CustomJSUrl runat="server"/> <SharePoint:SoapDiscoveryLink runat="server"/> <asp:ContentPlaceHolder id="PlaceHolderAdditionalPageHead" runat="server"/> <SharePoint:DelegateControl runat="server" ControlId="AdditionalPageHead" AllowMultipleControls="true"/> </HEAD> <BODY scroll="yes" onload="javascript:if (typeof(_spBodyOnLoadWrapper) != 'undefined') _spBodyOnLoadWrapper();"> <form runat="server" onsubmit="return _spFormOnSubmitWrapper();"> <!--<WebPartPages:SPWebPartManager id="m" runat="Server"/>--> <table cellpadding="0" cellspacing="0" border="0" width="100%" height="100%" style="margin:0px;"> <tr id="top-bar" height="20px" style="text-align:right"> <td> <table cellpadding="0" cellspacing="0" border="0" width="100%" height="100%" style="margin:0px; background-color:#a6ce39; border-bottom:solid 1px white;"> <tr> <td> </td> <td style="width:250px; text-align:right;"> <wssuc:Welcome id="IdWelcome" runat="server" EnableViewState="false"></wssuc:Welcome> </td> </tr> </table> </td> </tr> <tr id="banner" height="80px"> <td> <table cellpadding="0" cellspacing="0" border="0" width="100%" height="100%" style="background-color:#515151;"> <tr> <td style="width:50%; padding-left:10px;"> <SharePoint:SiteLogoImage id="onetidHeadbnnr0" LogoImageUrl="/_layouts/images/titlegraphic.gif" runat="server"/> </td> <td style="width:50%; text-align:right; padding-right:5px;"> <asp:ContentPlaceHolder id="PlaceHolderSearchArea" runat="server"> <SharePoint:DelegateControl runat="server" ControlId="SmallSearchInputBox"/> </asp:ContentPlaceHolder> </td> </tr> </table> </td> </tr> <tr id="menu" height="20px"> <td> <table cellpadding="0" cellspacing="0" border="0" width="100%" height="100%"> <tr> <td> <asp:ContentPlaceHolder id="PlaceHolderHorizontalNav" runat="server"> <SharePoint:AspMenu ID="TopNavigationMenu" Runat="server" DataSourceID="topSiteMap" EnableViewState="false" AccessKey="<%$Resources:wss,navigation_accesskey%>" Orientation="Horizontal" StaticDisplayLevels="2" MaximumDynamicDisplayLevels="1" DynamicHorizontalOffset="0" StaticPopoutImageUrl="/_layouts/images/menudark.gif" StaticPopoutImageTextFormatString="" DynamicHoverStyle-BackColor="#CBE3F0" SkipLinkText="" StaticSubMenuIndent="0" CssClass="ms-topNavContainer"> <StaticMenuStyle/> <StaticMenuItemStyle CssClass="ms-topnav" ItemSpacing="0px"/> <StaticSelectedStyle CssClass="ms-topnavselected" /> <StaticHoverStyle CssClass="ms-topNavHover" /> <DynamicMenuStyle BackColor="#F2F3F4" BorderColor="#A7B4CE" BorderWidth="1px"/> <DynamicMenuItemStyle CssClass="ms-topNavFlyOuts"/> <DynamicHoverStyle CssClass="ms-topNavFlyOutsHover"/> <DynamicSelectedStyle CssClass="ms-topNavFlyOutsSelected"/> </SharePoint:AspMenu> <SharePoint:DelegateControl runat="server" ControlId="TopNavigationDataSource"> <Template_Controls> <asp:SiteMapDataSource ShowStartingNode="False" SiteMapProvider="SPNavigationProvider" id="topSiteMap" runat="server" StartingNodeUrl="sid:1002"/> </Template_Controls> </SharePoint:DelegateControl> </asp:ContentPlaceHolder> </td> <td style="white-space:nowrap; width:100px" class="ms-siteactionsmenu" id="siteactiontd"> <SharePoint:SiteActions runat="server" AccessKey="<%$Resources:wss,tb_SiteActions_AK%>" id="SiteActionsMenuMain" PrefixHtml="<div><div>" SuffixHtml="</div></div>" MenuNotVisibleHtml="&nbsp;"> <CustomTemplate> <SharePoint:FeatureMenuTemplate runat="server" FeatureScope="Site" Location="Microsoft.SharePoint.StandardMenu" GroupId="SiteActions" UseShortId="true"> <SharePoint:MenuItemTemplate runat="server" id="MenuItem_Create" Text="<%$Resources:wss,viewlsts_pagetitle_create%>" Description="<%$Resources:wss,siteactions_createdescription%>" ImageUrl="/_layouts/images/Actionscreate.gif" MenuGroupId="100" Sequence="100" UseShortId="true" ClientOnClickNavigateUrl="~site/_layouts/create.aspx" PermissionsString="ManageLists, ManageSubwebs" PermissionMode="Any" /> <SharePoint:MenuItemTemplate runat="server" id="MenuItem_EditPage" Text="<%$Resources:wss,siteactions_editpage%>" Description="<%$Resources:wss,siteactions_editpagedescription%>" ImageUrl="/_layouts/images/ActionsEditPage.gif" MenuGroupId="100" Sequence="200" ClientOnClickNavigateUrl="javascript:MSOLayout_ChangeLayoutMode(false);" /> <SharePoint:MenuItemTemplate runat="server" id="MenuItem_Settings" Text="<%$Resources:wss,settings_pagetitle%>" Description="<%$Resources:wss,siteactions_sitesettingsdescription%>" ImageUrl="/_layouts/images/ActionsSettings.gif" MenuGroupId="100" Sequence="300" UseShortId="true" ClientOnClickNavigateUrl="~site/_layouts/settings.aspx" PermissionsString="EnumeratePermissions,ManageWeb,ManageSubwebs,AddAndCustomizePages,ApplyThemeAndBorder,ManageAlerts,ManageLists,ViewUsageData" PermissionMode="Any" /> </SharePoint:FeatureMenuTemplate> </CustomTemplate> </SharePoint:SiteActions> </td> <td style="width:5px"> </td> </tr> </table> </td> </tr> <tr id="bread-crumbs"> <td style="padding:5px; height:20px;"> <table cellpadding="0" cellspacing="0" border="0" width="100%" height="100%" style="font-size:8pt"> <tr> <td> <!-- Bread Crumbs --> <asp:ContentPlaceHolder id="PlaceHolderTitleBreadcrumb" runat="server"> <asp:SiteMapPath SiteMapProvider="SPContentMapProvider" id="ContentMap" SkipLinkText="" NodeStyle-CssClass="ms-sitemapdirectional" runat="server"/> </asp:ContentPlaceHolder> </td> </tr> </table> </td> </tr> <tr id="main"> <td style="padding:10px; text-align:center; vertical-align:top"> <div style="text-align:left; vertical-align:top; width:80%;"> <h2 class="ms-pagetitle"> <asp:ContentPlaceHolder id="PlaceHolderPageTitleInTitleArea" runat="server" /> </h2> </div> <div style="text-align:left; vertical-align:top; width:80%; border-top:solid 1px gray"> <asp:ContentPlaceHolder id="PlaceHolderPageDescription" runat="server" /> <asp:ContentPlaceHolder id="PlaceHolderMain" runat="server"> </asp:ContentPlaceHolder> </div> </td> </tr> </table> <!-- --------------------------------> <asp:ContentPlaceHolder id="PlaceHolderFormDigest" runat="server"> <SharePoint:FormDigest runat=server/> </asp:ContentPlaceHolder> <input type="text" name="__spDummyText1" style="display:none;" size=1/> <input type="text" name="__spDummyText2" style="display:none;" size=1/> <!-- Hides optional controls --> <asp:Panel Visible="false" runat="server"> <asp:ContentPlaceHolder id="PlaceHolderGlobalNavigationSiteMap" runat="server"> <!--<asp:SiteMapPath SiteMapProvider="SPSiteMapProvider" id="GlobalNavigationSiteMap" RenderCurrentNodeAsLink="true" SkipLinkText="" NodeStyle-CssClass="ms-sitemapdirectional" runat="server"/>--> </asp:ContentPlaceHolder> <asp:ContentPlaceHolder id="PlaceHolderLeftActions" runat="server"></asp:ContentPlaceHolder> <asp:ContentPlaceHolder id="PlaceHolderPageImage" runat="server"/> <asp:ContentPlaceHolder id="PlaceHolderLeftNavBarDataSource" runat="server" /> <asp:ContentPlaceHolder id="PlaceHolderCalendarNavigator" runat="server" /> <asp:ContentPlaceHolder id="PlaceHolderLeftNavBarTop" runat="server"/> <asp:ContentPlaceHolder id="PlaceHolderLeftNavBar" runat="server" /> <asp:ContentPlaceHolder id="PlaceHolderBodyLeftBorder" runat="server" /> <asp:ContentPlaceHolder id="PlaceHolderUtilityContent" runat="server"/> <asp:ContentPlaceHolder id="PlaceHolderBodyAreaClass" runat="server"/> <asp:ContentPlaceHolder id="PlaceHolderTitleAreaClass" runat="server"/> </asp:Panel> </form> </BODY> </HTML>
---------------------------------------------------------------------- |
|
|
|
|
|
|
|