SharePoint 2010: Custom Content Types

Content Type

  1. A Content Type is used to define a SharePoint entity.

  2. A Content Type is a group of site columns (or metadata), workflows and other settings for the item in the list or document in a Document Library or for SharePoint page.

  3. Content Types are reusable components, they are not specific to any list or library or page layout. The base type of a Content Type could be an existing Content Type like:

      -Item
      -Document
      -Folder
      -Event
      -Task
      -Message
      -Comment
      -Post
Now we will learn how to define the Content Type and how to use it.

Step 1: Open your SharePoint Site.

Step 2: Go to Site Action -> Site Settings.

site setting
                                                                           Image 1.

Site Action
                                                                              Image 2.

Go to Galleries -> Site Content Types.

Site content types
                                                                                 Image 3.

Click on Create.

Click on Create
                                                                                 Image 4.

Name: The name of the Content Type.

Description: Description of Content Type.

Parent Content Type: Content Types can inherit from existing Content Types and they are grouped together by a Group Name.
  1. Parent Content Type from: select an existing group. Since we are defining a Content Type that will be used to generate a document we use the "Document Content Type" group.

  2. Parent Content Type: We want the Content Type to be applied when we are adding a new page to a page library in the site, so that each Functional Spec is published as a page.

Group: Select under which group our new Content Type should be categorized. Since it's a template for a Functional Specification Document we'll categorize it under Document Content Types.

OK

Document Content Types
                                                                                    Image 5.

Now to define the columns. Here you have 2 options, either select a site column or create a new one. We will add a column using both methods.
First by using: Add from existing site columns as in the following:

select your group
                                                                                 Image 6.

Here select your group from which you want to add the column. Click Ok.

add column
                                                                                    Image 7.

You can see your added columns. Now we will add from the new site column. Here I added the following column.

  1. Employee Name:

    1. Column Name: Employee Name
    2. Type: Single Line Text
    3. Group: Custom Columns

  2. Experience:

    1. Column Name: Experience
    2. Type: Single Line Text
    3. Group: Custom Columns

  3. Contact Number:

    1. Column Name: Contact Number
    2. Type: Single Line Text
    3. Group: Custom Columns

  4. Employee Address

    1. Column Name: Employee Address
    2. Type: Multiple lines of text
    3. Group: Custom Columns
columns
                                                                                    Image 8.

Now to use this Content Type. So add a new Document Library.

So add a new document library   
                                                                                 Image 9.

document liberary
                                                                                 Image 10.

name and description
                                                                                 Image 11.

By clicking on More Options enter the Name and Description. Select Navigation, version and Document Template value. Click OK.

Document Template value
                                                                              Image 12.

Now select your Document Library then select the Library then select Library Settings.

document liberary setting
                                                                           Image 13.

Select Advanced Settings here.

Advance settings
                                                                           Image 14.

Select (Allow Management of Content Types to Yes). Then select OK.

Allow Management of content Types
                                                                                 Image 15.

Here select Add from existing site content types.

Add from existing site content types
                                                                                 Image 16.

Select the group then select you Content Type -> Add -> OK.

select you content type
                                                                              Image 17.

Now you can see all the columns here in this Document Library. Here you can see in Content Type 2 Content Types are coming so we will disable the Default Content Type For example: Document.

Click Change new button order and default Content Type.

Change new button order
                                                                              Image 18.

Uncheck Document Content Type to make invisible.  Then click OK.

Now to upload the new document. Select your Document Library then select Add document.

upload document
                                                                                 Image 19.

After selecting document click Ok. A popup will be shown automatically.

popup
                                                                              Image 20.

Fill in the form then select Save.

Click Save
                                                                                 Image 21.

Here you can see your uploaded document. But you are unable to see all the columns. To make all the columns visible we need to modify the default view. In library select View -> Modify View.

sharepoint admin
                                                                        Image 22.

Select all your columns that you want to show then click OK.

Select all your columns
                                                                                 Image 23.

Now you can see all your columns.