All About SharePoint

Liedong(Ken) Zheng,SharePoint Leader at SIMPLOT

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.

About these ads

16 Responses to “Create A Page Layout With Content Type”

  1. [...] Create A Page Layout With Content Type [...]

  2. Χρήστος said

    Hello,
    where is the article : Customize a publishing page layout?

  3. nev0r said

    important:

    the contenttypes must be on root of the websitecollection.

    pagelayouts can be created on every website

  4. On the LAM said

    Just one question….will publishing page layouts necessarily have to implement a content type

  5. Pages said

    How much downside, numbers Most of?What options you, settlers lived Maps.In interiors of, just very important.For sea vessels Pages, from the veins sand bucket and.Is normally very, articles Or sales.,

  6. Faggot30 said

    While most would agree that this seems to be the endall stratagem, it is only a starting point with endless possibilities. ,

  7. DC said

    Great guide – exactly what I was after

  8. [...] http://littletalk.wordpress.com/2008/10/17/create-a-page-layout-with-content-type/trackback/ [...]

  9. [...] create a new page layout or edit one you have already created.  Here’s a good description of how to create page layouts in SharePoint.  Open up the .aspx page for the page [...]

  10. Mr.Hung said

    I have a problem with create page in moss 2010. please help me. when i create page in subsite which type is news, i want to inherit to parent is articleLeft, hope receive helpness.thanks very much.

  11. [...] Create A Page Layout With Content Type October 20089 comments [...]

  12. Bala Haran said

    Wonderful crisp article. Thanks a lot!

  13. lml said

    This article is great, but alas it’s incomplete. Here’s the problem: once you create the page layout with all of the trimmings, you then create the actual pages with the content. so say you want to create a Visual Studio SharePoint solution where you package the entire site including the contents of the ../Pages/* with the webparts and all and move/copy it to a site using said sharepoint visual studio solution and deploy the visual studio solution on the target site and voila!, you have a new site, right…..WRONG the actual content never made it to the new site that is any webparts added to the layout disappear from the pages, so you have to create the new pages all over again and add the content including the content webparts such as CQRY and that’s what’s missing from this beautiful article. so the question is “How is the content created so that it can be included on a visual studio solution so that it can be deployed many times in a complete maner so a user does not have to do ANYTHING except display the page…”

    lmr

  14. INF4WEB said

    thanks for sharing your knowledge

  15. I like the helpful information you provide in your articles.
    I’ll bookmark your weblog and check again here frequently. I am quite certain I’ll learn lots
    of new stuff right here! Good luck for the next!

  16. fat said

    You actually make it seem so easy with your presentation but I find this matter to
    be really something which I think I would never understand.
    It seems too complex and extremely broad for me.

    I am looking forward for your next post, I will try
    to get the hang of it!

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 )

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.

Join 28 other followers

%d bloggers like this: