Page Layout Model
A page layout is a template that is used in conjunction with a master page to control the look, feel, and content of a page. Each page layout has an associated content type that determines the kind of content that can be stored on pages based on that page layout. Microsoft Office SharePoint Server 2007 provides three default publishing content types: Page, Article Page, and Welcome Page.
Each content type contains columns that define content that can appear on a page and metadata associated with the page. A content type, therefore, contains a column for each of these data elements present on the page. When you create a content type, you add column templates to it for each field. Column templates determine the default field control that is associated with the column, as well as what kind of content the field can contain, such as a single line of text, a hyperlink, or a picture.
Content in a page is stored as SharePoint list items in the Pages document library. When users view or edit the page, content is pulled from the SharePoint list and displayed in field controls. When you create a page layout, you add field controls by using a page layout editor such as Microsoft Office SharePoint Designer 2007 or by writing the markup yourself.
The built-in Page content type contains columns that describe the metadata of the page. A sample of these columns is described in the following table.
Column | Description |
---|---|
Start Date |
Determines when the page is visible on the site. |
Expiration Date |
Determines when the page is no longer visible on the site. |
Contact |
The person or group who created the page. |
Contact Email |
The e-mail address of the person who created the page. |
Contact Name |
The name of the person who created the page. |
Contact Picture |
The picture of the person who created the page. |
Page Layout |
For each instance of a page in a site, a specific page layout that is associated with the user that determines which page layout to use. |
Visible in Navigation |
Yes if the page should show in navigation; otherwise, No. |
Page layouts are stored in the Master Page and Page Layout Gallery, a document library that is created when you install Office SharePoint Server 2007. By default, Office SharePoint Server 2007 creates a master page gallery for every site; however, you can only create new pages with the page layouts that are stored in the master page gallery of the top-level site in the site collection.
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 that are based on the same page layout in different sites can use different master pages.
As with any type of document stored in a SharePoint library, you can use versioning, check-in and check-out, workflow, and other features on page layouts. These features are available from within the master page gallery. The master page gallery is secured to limit the rights of most users, except those users with designer or greater privileges. You can create folders inside the master page gallery to organize your master pages, and you can assign different security levels to folders by applying "per item" security, a new feature available in Office SharePoint Server 2007, to the folder.