Defining Content Type in MOSS 2007



Objective

In this article, I am going to give and walkthrough of how to define a custom Content type in MOSS or SharePoint.

Step 1:

Go to Site Setting of the root site. Click on Site Action then select Site Setting.

1.gif

Step 2:

From the Galleries section select Site content types.

2.gif

Step 3:

In Site Content Type Gallery, select Create option.

3.gif

Step 4:

I will define a new type called Press Content here.   The values for different fields, I am giving as below.

Name: Press Content
Description:  This is a new content type associate with the documents.
Parent Content type form: Document Content Types
Parent Content Type: Document
Group: Existing Group (Custom Content Type)

4.gif

Step 5:

The new content type will have only one property called Title property.  I will expand the properties by adding new columns.

The new properties, I will be adding as below 

  1. Subtitle as Single Line of text and it would be an optional property.
  2. Publish Date as date and time and it would be optional property.
  3. PR Contact as Person or Group and it would be optional property.

To add new column from the column group select Add from New site columns 

5.gif

Step 6:

To see how to add new site column, see my other articles on this site. After adding all the columns , the column group will look like below.

6.gif

Step 7:

Now I will update the Document Template. I will pull the Content type Meta data into uploaded document template.

To do this click on Advance setting in the Setting group inside Press Release Content type.

7.gif

Create a blank word document and save it. Browse to that document in upload the new document template section. Leave for other field the default values.

8.gif

Step 8:

Up to this step I have created the custom content type. Now I am going to attach this content type to a document library.

To attach go to advance setting of document library go to Document Library setting from setting. From General Setting go to advance setting. 

9.gif

10.gif

Select Allow Management of Content type Yes and leave other filed with default values.

11.gif

Step 9:

Inside Setting of document library, go to Content Types group. Here select  Add From existing site contents.

12.gif

Select the newly created content type and click ADD button.

13.gif

Step 10:

Go to Document library. While adding new item new document template with metadata of content type would be available there.

14.gif

Conclusion:

In this article, I have shown how to create a new custom content type. Thanks for reading.

Happy Coding

Up Next
    Ebook Download
    View all
    Learn
    View all