Create A Page Layout With Content Type
Posted by ken zheng on October 17, 2008
Here is the article explains the publishing page
1#.Page layouts are templates that define content structure for a page and are always associated with a content type.
2#.A content type contains a document template, data columns, workflows, and other information that completely define a document.
3#.The publishing feature of MOSS uses a single root content type for publishing called Page.
4#.All of the page layouts inherit from this base. Here’s how to create a new page layout in MOSS.
STEP 1: Define Site Columns
The individual content elements that appear in a page layout are derived from site columns. When you create a page layout, you can use any of the site columns already defined or define your own.
STEP 2: Define a Content Type
Page layouts have a direct relationship to a content type defined within the site. The content type is a collection of site columns, a page template, workflows, and other information that determine the appearance and behavior of a page layout. In order to create a page layout, you must create a new content type that derives from the existing Page content type. Inheriting the Page content type allows the new page layout to function correctly within the MOSS content management Feature.
Create a new content type from Site Settings > Site Content Type Gallery , click create.
# In the Name box, type the name for this content type.
This is the name that appears in the Content types list in step 6 in the following section, Create a page layout.
# In the Description box, type a description for this content type.
# In the Select parent content type from list, click Publishing Content Types.
# In the Parent Content Type list, click Page.
# Under Put this site content type into, click Existing group, and then click Page Layout Content Types in the list.
STEP 3: Create the Page Layout
Page layouts are stored in Master Page and Page Layout Gallery. From this gallery, you can create a new page layout and associate it with a content type.This process makes the site columns that are defined for the content type available to the page layout as field controls that you can place on the page with the SharePoint Designer.
Now that you have created a new content type, you can create a page layout from it. The fact that you first created a custom content type ensures that the pages that are created from this page layout have all of the columns that you specified available to them.
1. In Office SharePoint Designer 2007, open the Web site in which you want to create the page layout.
2. On the File menu, point to New, and then click SharePoint Content.
3. In the New dialog box, click SharePoint Publishing.
Note If this option is not listed, it is probably because the site in which you are working does not have publishing turned on in Office SharePoint Server 2007. If you have authoring permissions on the top-level site, you can turn on publishing for the browser by pointing to Administration on the Office SharePoint Designer Site menu, and then clicking Administration Home. Under Site Administration, click Site features, and then click Activate next to the Office SharePoint Server Publishing option. After you perform these steps, return to Office SharePoint Designer 2007 and start over with step 1, but this time click Refresh on the View menu between step 1 and step 2.
4. Click Page Layout.
5. Under Options, in the Content Type Group list, click Page Layout Content Types.
6. In the Content Type Name list, click the content type that you want.
SharePoint Content tab of the New dialog box showing the page layout selected
If you created a content type in the previous section, and if you put your content type in the Page Layout Content Types group, you should see that content type in this list. Learn how to create a content type in the previous section, Create a page layout content type.
7. In the URL Name box, type a name for this page layout.
This becomes the file name of the page layout. For example, if you type MyPageLayout in this box, the page layout file name will be MyPageLayout.aspx.
8. In the Title box, type a title for this page layout.
This becomes the page layout title that appears in the list of available page layouts when you create a new publishing page on the Create page in the browser. You want to give the page layout a title that is recognizable to users who create publishing pages that are based on this page layout.
9. Click OK.
The page layout opens in Design view. By default, it is attached to the default Master Page. To learn how to customize the page layout, see the article Customize a publishing page layout.
Note Site page layouts in Office SharePoint Server 2007 use the publishing master page, which may be different from default.master.
The new page layout is created in the top-level site. You can verify that it was created by browsing to the Master Page Gallery at http://your_top_level_site/_catalogs/masterpage/Forms/AllItems.aspx where your_top_level_site is the name of the top-level site. Your new page layout should be listed on this page.
STEP 4: Edit the Page Layout in SharePoint Designer
Once you have created the new page layout, you must open it in the SharePoint Designer so that you can add the desired field controls. The site columns you defined as part of the content type become available in the SharePoint Designer as field controls that you can place on the page layout.
STEP 5: Publish the New Page Layout
Once the page layout is created, you must publish and approve it so that it becomes available for content authors. This process is essentially the same as publishing any item in MOSS. First the document is checked in, then it is published, and finally it is approved.
STEP 6: Create a New Page
Once the page layout is published and approved, content authors may use it to create new pages. This is done in the normal way by selecting the Create Page item from the Site Actions menu. After the page is created, the field controls may be edited to develop the actual page content.