Home > Uncategorized > Page Layouts and Master Pages

Page Layouts and Master Pages


Page Layouts and Master Pages

Master pages and page layouts dictate the overall look and feel of your SharePoint site. Master pages contain controls that are shared across multiple page layouts, such as navigation, search, or language-preference for multilingual sites. Page layouts contain field controls and Web Parts.

By using master pages, you can provide a consistent look and feel for your site. You can use master pages to position items that must be shared by all pages, such as navigational controls, company logos, and copyright notices. Within master pages, you can use user controls (.ascx controls), Web server controls, and Web Parts.

The top-level SharePoint Server site for a site collection hosted on SharePoint Server 2010 has a special document library called the Master Page and Page Layout Gallery. All page layouts and master pages are stored in this document library. The Master Page and Page Layout Gallery supports versioning and workflow, so you can use those features for your master pages and page layouts.

All page layouts reference a master page that is based on the CustomMasterUrl property of the SPWeb class. All page layouts host controls called field controls that bind to fields on the master page list item. You can use the default controls or build custom controls. Field controls enable content to be edited and rendered for display. To see a code example for creating and using a custom field control, see How to: Create a Custom Field Control.

Page layouts can be used by all page instances that are based on that page layout. Master pages can be used by all page instances in a site. Page instances based on the same page layout in different sites can use different master pages.

Advertisements
Categories: Uncategorized
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: