Thursday, July 16, 2009

Master pages and its benefits

Master Pages
  • Master pages are a feature of ASP.NET 2.0 that work the same way in Windows SharePoint Services 3.0 and Office SharePoint Server 2007 as they do in ASP.NET 2.0. Using master pages, you can create a single page template and then use that template as the basis for multiple pages in an application, instead of having to build each new page from scratch.
  • Master pages, in order to render in the browser, actually require two separate parts, the master page itself and a content page. A master page defines the common layout and navigation, as well as the common default content, for all of the content pages that are attached to it. A content page is a unique page. When the page is rendered in the browser, the master page supplies the common content and the content page supplies the page-specific content.
  • First, you create a single master page to define both the look and feel and the standard behavior either for all of the pages in your site or for a specific group of those pages. Then you can create individual content pages that contain the unique content that you want to display on each individual page. The master page is merged with the content pages to produce a final, rendered page that combines the layout from the master page with the content from the content page.
Benefits of using Master Pages

By using master pages, you can easily change the look and feel of all of the pages across the entire site. Master pages also provide:

  • An enhanced experience for editing SharePoint pages Developers and designers can save their time and resources by making design changes in a single master page and automatically propagating those changes to all of the content pages that are attached to that master page.
  • Site-level editing Users can edit master page elements for their site in a single location. They also can return to that same single location to make additional changes, and do not have to customize all of the content pages that use those common elements.
  • Professional-looking sites Users can easily create a new page that has the SharePoint look and feel. By referencing the default master page, a new page based on it displays the same look and feel, and also picks up any updates to the master page going forward.
  • More consistent pages and an enhanced end-user experience Because all of the pages that are attached to a master page have the same consistent look and feel, site visitors can browse from a core SharePoint page to a page added by a third-party solution, or to a page customized by the Web designer, and not notice any difference in the way the site looks or in how its controls work.
  • Efficient site management Using master pages improves site management, because you can change the look and feel of your entire site by customizing only the master page. You don't have to modify every page in the site.

No comments: