Using Pages and Page Libraries

Page libraries are designed to store publishing pages. The columns of the page library store the content of the page, and the page layout defines how that content is displayed. Page libraries and publishing features are only available in MOSS 2007 and not WSS 2007.

The benefits of using page libraries is that you can standardize how you want content to appear, and update the page layout to change the appearance for every page that uses that layout. There are several building blocks used in the publishing feature set:

  • Content Types: Content types are the types of pages available for publishing. They define the collection of information that the page will contain as well as the page policies and workflow. You can associate content types with page libraries to limit the type of content submitted to that page library. For example, if you create a site from the Publishing site template, the Page, Welcome Page, and Article Page content types are associated with that page library.

  • Page layouts: An Active Server Page is defined for each content type. The page layout defines where each piece of content appears on the page. In addition to the page content, the page layouts can also define Web Part zones, Web Parts, server controls, and Cascading Style Sheets (CSS). The page layout is combined with the master page to render the content in the browser. You can have multiple page layouts for each content type; for example, an article page has a page layout with the image on the left and a page layout with the image on the right. For each page library, you can define which page layouts are available.

  • Page content: Each page is stored as an item in the pages library and the content is stored in the columns of that item. The columns are defined by the content types associated with that library.

  • Site columns: Columns of metadata that are associated with that site. Site columns are different from document library metadata columns in that they are available site-wide and are available for filtering with the content query Web Part. See Chapter 5 for more information about the content query Web Part.

  • Server columns: Columns of metadata that are defined for all sites on the server. You can choose which server columns are available as site columns.

Modifying content types

MOSS provides three content types: the Welcome page, the Article page, and the Redirect page. These types have associated columns relevant to their content type, but as you work with the types, you may find the need to modify the columns to fit your needs.

The welcome page content type is intended to work as the home page of a publishing site. The columns associated with this content type are

  • Scheduling columns: Start date and End date.

  • Contact columns: Contact name and Email address for primary page contact.

  • Audience targeting columns: Audiences that will see the content on the welcome page.

  • Images: Images to be included on the page.

  • Page content: Column for the main page text. This column can hold any HTML content.

  • Links: Columns to display links on the page.

The article page content type works for publishing news and in-depth articles for your organization. The columns associated with this content type are

  • Scheduling columns: Start date and End date.

  • Contact columns: Contact name and Email address for primary page contact.

  • Images columns: Images to be included on the page and image captions.

  • Page content: Column for the main page text. This column can hold any HTML content.

  • Links: Columns to display links on the page.

  • Byline column: The byline column is used to capture/show the author of the page content.

The redirect page content type is used for pages that redirect to another page. This is useful when you want to provide a link to content that is already published in another location and publicize that content and description in your page library.

Adding site and server columns

Before associating a new column with a content type, you need to create the column on either the site or server level. If the column is applicable to numerous sites, you should create the column at the server level so that the definition can be widely used. If the column has limited applicability, create it at the site level.

Creating a site column at the server level

To create a site column at the site collection level, follow these steps:

1.
Open the top-level site for the site collection and select Site Settings from the Site Actions menu in the top-right corner.

2.
Select Site columns from the Galleries menu.

3.
Click Create.

4.
Enter your column name and choose the column type (choice, text, number, HTML, and so on).

5.
Select Custom Columns in the Put this site column into field.

6.
Select whether or not the field is required.

7.
Click OK.

Creating a site column at the site level

To create a site column at the site level, follow these steps:

1.
On the site that you want to use the new site column, select Site Settings from the Site Actions menu in the top right corner.

2.
Select Site Columns from the Galleries menu.

3.
Click Create.

4.
Enter your column name and choose the column type (choice, text, number, HTML, and so on).

5.
Select Custom Columns in the Put this site column into field.

6.
Select whether or not the field is required.

7.
Click OK.

Associating columns with content types

A column can be used in multiple content types. You must own the content type in order to modify it. If you want to modify it with a server column, you can do that from anywhere in the site collection. If you want to modify it with a site column type, the gallery that holds the content type must be in the same site as the column. For information about how to create site content types for your site, see the next section, “Creating a site content type.”

To associate a column with a content type, follow these steps for each content type to which you want to add the column:

1.
On the site that you want to use the new site column, select Site Settings from the Site Actions menu in the top-right corner.

2.
Select Site content types from the Galleries menu.

3.
Click the content type that you want to modify (for example, article page).

4.
Select Add from existing site columns in the columns section.

5.
Select Custom Columns from the Select columns from drop-down menu.

6.
Select your column from the available columns and click Add.

7.
Select OK.

Creating a site content type

To create a site content type, follow these steps:

1.
On the site that you want to use the new site content type, select Site Settings from the Site Actions menu in the top-right corner.

2.
Select Site Content Types from the Galleries menu.

3.
Click Create.

4.
Enter the site content type name and select the Parent Content Type for your content type. The new content type will inherit the columns from the parent content type and you can also add your own columns.

5.
Select Custom Content Types in the Put this site content type into field.

6.
Select whether or not the field is required.

7.
Click OK.

After the column has been associated with the content type, modify the page layout associated with that content type so that the column appears on the new page form.

Modifying page layouts

Page layouts define the layout for a content page by providing the controls by which the content is edited and displayed. There can be multiple page layouts for a single content type, as is the case with both the article page and the welcome page content types. The availability of multiple page layouts for a content type gives users different options for publishing a page. For example, the article page content type has four page layouts:

  • Article page with body only: A simple layout for an article that includes areas for the title and page content columns.

  • Article page with image on left: An article page with the article image, if populated, appears on the left side. The page also includes areas for the title, byline, article date, image caption, roll-up image (which shows only in content query views of the article), and page content columns.

  • Article page with image on right: An article page with the article image, if populated, appears on the right side, as shown in Figure 3.18. The page also includes areas for the title, byline, article date, image caption, roll-up image (which shows only in content query views of the article), and page content columns.

    Figure 3.18. Page layout of article page with image on right

  • Article page with summary links: This article page includes a Web Part for the author to add a list of hyperlinks, as well as areas for the title, article date, byline, and page content columns. See Figure 3.19.

Figure 3.19. Page layout of article page with summary links Web Part


Page layouts are stored in the Master Page Gallery in the top-level site of the site collection. This gallery has the MOSS features of versioning and approval turned on to safeguard the master page and page layouts.

You can modify page layouts to include site columns that you have added to the content type or Web Parts that would be helpful. You can also limit the page layouts available for page creation on a per library basis.

Editing the page layouts using SharePoint Designer

To modify the page layouts, you must have contributor access to the Master Page Gallery. Each layout is under versioning and approval control, so page layouts are not changed until a major version is published and approved.

To modify a page layout to add a site column, follow these steps:

1.
Launch SharePoint Designer and open the top-level site of the site collection.

2.
Navigate to the _catalogsmasterpage folder and open the page layout that you want to modify.

3.
When prompted to check out the document, click yes. This is important because SharePoint does not save changes that you make when the document is checked in.

4.
Scroll down in the Toolbox on the right side until you see the Content Fields, as shown in Figure 3.20.

Figure 3.20. Content Fields available for a page layout


5.
Drag the Content Field that you want to add onto the page, as shown in Figure 3.21.

Figure 3.21. Dragging a Content Field onto a page library


6.
Check in and publish the page layout.

7.
Approve the page layout if you have the appropriate permissions.

Selecting the page layouts available in a page library

You can modify the page layouts that are available to users creating a new page in a page library. To modify the available page layouts, follow these steps:

1.
Select Site Settings from the Site Action menu in the top right corner.

2.
Select Page layouts and site templates from the Look and Feel menu.

3.
In the Page Layouts section, select Pages in this site can only use the following layouts radio button.

4.
Select the page layouts that you do not want users to be able to use and click Remove, as shown in Figure 3.22.

Figure 3.22. Selecting the page layouts available for new pages


5.
Click OK when you have all the page layouts that you want selected.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset