Tuesday, July 10, 2012

SharePoint 2010 : Master Pages Basics

In SharePoint 2010, the site pages and application pages could link to the same master page. This is a nice enhancement in SP 2010 whereas in SP 2007 had limitations that made it difficult to support linking site pages and application pages to the same master page.


SharePoint Foundation provisions the following three master page instances:


a. v4.master
b. minimal.master
c. default.master

v4.master: This is the primary master page used as the standard master page in SharePoint 2010 sites. This common layout (also known as Chrome) contains elements such as Site Actions menu, the breadcrumb trail, the Ribbon, the Welcome menu, the Site Icon, the TopNav bar, and the Quick Launch. This master page provides the default layout for SharePoint 2010 sites.


minimal.master: This provides a page layout without any of the chrome that is included in v4.master. The minimal.mnaster page is used by several of the standard site page templates and application pages that are distributed along with SharePoint Foundation and SharePoint Server 2010.


default.master: This master page designed to support a feature known as Visual Upgrade, which assists companies that are upgrading SharePoint 2007 sites to run within SharePoint 2010 farms.


Visual Upgrade process:

Default.master contains the standard HTML layout and chrome of a SharePoint 2007 site. When a site is upgraded from SharePoint 2007 to SharePoint 2010, SharePoint Foundation has its pages initially link to default.master instead of v4.master. The idea is that companies can upgrade from SharePoint 2007 to SharePoint 2010 without forcing their users to switch to the new SharePoint 2010 user interface immediately.


Important Note:


a. default.master is involved only when upgrading SharePoint 2007 sites to SharePoint 2010. If we are not involved in upgrade scenarios, yours sites will never use default.master.


b. The master pages in the Master Page Gallery is that they are created initially in a ghosted state ie., every SharePoint 2010 site gets a copy of v4.master that is processed using a master page template that exists on the file system of the front-end Web server.
A customized master page runs in Safe Mode, which means that it cannot contain inline code.