Customize a publishing page layout

Publishing page layouts are fully customizable in Microsoft Office SharePoint Designer 2007. This article shows you how to quickly open a page layout in Office SharePoint Designer 2007 and how to add custom content. This article also shows you how to insert page fields and content fields, which make it possible for content owners to contribute content through the browser.

 Important   To create a publishing page layout, you must be working in a site that is located on a server running Microsoft Office SharePoint Server 2007, and publishing must be turned on in the top-level site of the site collection. Also, in order to create content types (which you use to define the content that goes into your publishing page), you must have authoring permissions for that top-level site. If you find that you are unable to create a page layout, contact your server administrator.

In this article


What is a page layout?

When you turn on publishing and set up page layouts, content owners can use the layouts to create Web pages for your Office SharePoint Server 2007 site by using only their browser. Page layouts are page templates that define how a page should look, what page fields and content fields are available, and exactly which elements should be present on the page (such as lists and libraries). For example, you can set up one page layout for trip reports, another page layout for newsletter articles, and a third page layout for plan updates. Authorized users can then create new publishing pages that are based on these page layouts, and their new pages for each specific type of content will follow a consistent format.

Publishing in Office SharePoint Server 2007 automates the workflow process and makes it easy to create in the browser new pages that are based on a publishing page. After the page has been created and edited, the content owner submits the page for review. When the reviewer approves the article and publishes it, the page becomes visible to other users on the site.

After you create a page layout, you can fully customize it by using Office SharePoint Designer 2007.

For more information about publishing pages and content types, see the article Create a publishing page layout.

Top of Page Top of Page

Open a page layout for editing

While viewing a publishing page that was created from a page layout, you may sometimes notice something that makes you want to change the underlying page layout. All publishing pages in a site are stored in a site-level Pages document library, where you can identify which page layout was used to create each page.

  1. In the browser, go to your site, and on the Site Actions menu, click View All Site Content, and then click the Pages document library.

Or you can browse directly to http://your_site/pages/forms/allitems.aspx, where your_site is the URL for your site, such as fabrikamweb/finance for the http://fabrikamweb/finance subsite.

The Pages document library is created automatically by the publishing feature and contains all of the pages in a site that are created from page layouts. You can look in the Page Layout column to see which page layout was used for a specific page and then click the link to view that page in the browser.

  1. To open the page layout that you want to customize in Office SharePoint Designer 2007, do one of the following:
    • Click the page in the Pages document library, and then click Edit in Microsoft Office SharePoint Designer. When prompted, click Edit Page Layout.
    • Browse to the Master Page Gallery in the top-level site of the site collection, which contains all page layouts available for the site collection. On the Site Actions menu, point to Site Settings, and then click Modify All Site Settings. Under Galleries, click Master pages and page layouts. Click the page layout that you want, and then click Edit in Microsoft Office SharePoint Designer.

Or you can browse directly to http://your_top_level_site/_catalogs/masterpage/page_layout_file_name, where your_top_level_site is the URL for your site, such as fabrikam for the top-level site http://fabrikam site. This URL tells you that the page layout is located in the masterpage folder, which is located in the _catalogs folder of the top-level site. This URL also indicates that you must have permissions to open and edit the top-level site in order to edit the page layout.

Top of Page Top of Page

Add custom content to a page layout

After you open a page layout for editing in Office SharePoint Designer 2007, you can edit it as you would any other page that is attached to a master page. When you add custom content to a page layout, that content appears on all publishing pages that are subsequently created from that page layout.

  1. With the page layout open in SharePoint Designer, click the placeholder in which you want to add content, click the arrow that appears, and then click Create Custom Content to unlock the placeholder for editing.

Placeholder with content menu activated

  1. Now you can edit this section of the page by using the features that you commonly use to edit pages. For example, you can use any of the following:
    • Tables    Click the Insert Table option on the Table menu to create tables to help align content.
    • Graphics    Click and drag images from the Images folder into this section of the page.
    • Text    Click and then type where you want text to appear.
    • Web Part zone    Insert a Web Part zone to give visitors to the page the option to add or remove Web Parts, such as views of document libraries and lists.
    • Web Parts    Insert views of document libraries, lists, and more into the page.
  2. Save the page by clicking Save on the File menu. Alternatively, you can press CTRL+S.

Top of Page Top of Page

Insert a page field

Publishing in Office SharePoint Server 2007 is a system for moving Web content from the draft stage through approval and then onward to publication. If you are responsible for creating Web content, you may want to display information about the Web page itself on that Web page. For example, if you are responsible for a news site, on an articles page you might want to display not just the article content, but also a contact name, or the file name, or the date that the article is scheduled to be published or pulled from the site. You can achieve any of these effects by inserting page fields into your page layout.

You can also use page fields to make it possible for content contributors to enter information in those fields through the browser. For example, with publishing you can set a Scheduling Start Date so that you can specify when the page should be published. You can also set a Scheduling End Date so that you can specify when the page should no longer appear on the site. Because the Scheduling Start Date and the Scheduling End Date are page fields that you can insert into your page, the content owner can change these dates via a browser for an immediate update to the scheduling engine in the publishing system. By adding the fields that you want to the content type that the page layout is associated with and then inserting those page fields into the page layout, you can quickly create a way for content owners to contribute unique content for each publishing page.

The following illustration shows the columns for a page layout content type in the browser. The columns in that content type appear as fields in the Toolbox in Office SharePoint Designer 2007.

Relationship between page layout type information and displayed fields

Follow these steps to insert page fields into editable regions in a page layout:

  1. With the page layout open in SharePoint Designer, click the placeholder in which you want to add content, click the arrow that appears, and then click Create Custom Content to unlock the placeholder for editing.

 Note   When you are creating a table that you want to add to an existing page, it is sometimes easier to first create the table on a blank page. That way, you can get the formatting and structure for the information set up just how you want them and then copy the table and paste it into the placeholder on the page where you want to publish it. Then you can follow the rest of these steps to insert the page fields into the allocated spaces in the table.

  1. If the Toolbox is not visible, on the Task Panes menu, click Toolbox.
  2. From the Page Fields section, drag the page field that you want to insert into the editable region.

The control is inserted onto the page.

 Note   If the items in the Page Fields section of the Toolbox are not visible, it is probably because you are not editing a page layout. Page fields and content fields are available only for page layouts.

Top of Page Top of Page

Insert a content field

You can also display information about content (metadata) that you have inserted into a page layout by using content fields. To use the example of a news site: If the page layout includes a field for the body of the article, you can also insert along with that field another field that displays the date and time when the body of the article was last modified. This is done by adding a content field to a page layout. To add a content field to a page layout, do the following:

  1. With the page layout open in SharePoint Designer, click the placeholder in which you want to add content, click the arrow that appears, and then click Create Custom Content to unlock the placeholder for editing.

 Note   When you are creating a table that you want to add to an existing page, it is sometimes easier to first create the table on a blank page. That way, you can get the formatting and structure for the information set up just how you want them and then copy the table and paste it into the placeholder on the page where you want to publish it. Then you can follow the rest of these steps to insert the page fields into the allocated spaces in the table.

  1. If the Toolbox is not visible, on the Task Panes menu, click Toolbox.
  2. From the Content Fields section, drag the content field that you want to insert into the editable region.

The control is inserted onto the content on the page.

 Note   If the items in the Page Fields section of the Toolbox are not visible, it is probably because you are not editing a page layout. Page fields and content fields are available only for page layouts.

Top of Page Top of Page

 
 
Applies to:
SharePoint Designer 2007