Email: Password:       Forgot Password 
    .netCodeSG
A Saarsha Group Online Community for dot net codes group like C#, Asp.NET, VB.NET, Sharepoint, JavaScript, JQuery, Ajax, SQL, WCF, WPF.
 
TECHNOLOGIES:
 

Custom Content Types in SharePoint 2010

Article:
Viewed:  859 
Posted On:  24/10/2014 04:23:05 
What is Content types in SharePoint? What is the benefit of using Content Types? How many types? of content types available in SharePoint? What is site column? 

 

In this article I am going to explain Content types in SharePoint 2010.

What is Content Type?

  • A content type is used to define a SharePoint entity.
  • A Content type is a group of site columns (or metadata), workflows and other settings for the item in the list or document in document library or for SharePoint page.
  • Content types are reusable component, 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 Content type and how to use:

Step 1 # Open your SharePoint Site.

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

1.png

Image 1.

2.png

Image 2.

Go to Galleries -> Site content types.

 3.png

Image 3.

Click on Create.

4.png

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

      i. 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

      ii. Parent Content Type: We want the content type to be applied when we are adding a new document to a library in the site.

Group: Select under which group our new content type should be categorized. 

OK.

5.png

Image 5.

Now the time to define columns. Here you have 2 options either select site column or create new. We will add column by using both method.

First by using: Add from existing site columns:

6.png

Image 6.

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

7.png

Image 7.

After clicking (Add from new site column) link button a new form will open, here enter your column name and select appropriate properties and click OK. Here I am going to add below columns.

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

1. Employee Name:

    a. Column Name: Employee Name
    b. Type: Single Line Text
    c. Group: Custom Columns

2. Experience:

     a. Column Name: Experience
     b. Type: Single Line Text
     c. Group: Custom Columns  

 3. Contact Number:

    a. Column Name: Contact Number
    b. Type: Single Line Text
    c. Group: Custom Columns  

4. Employee Address

     a. Column Name: Employee Address
     b. Type: Multiple lines of text
     c. Group: Custom Columns

8.png

Image 8.

Now time to use this content type. So add a new document library.

9.png
Image 9.

10.png

Image 10.

11.png

Image 11.

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

12.png
Image 12.

Now select your Document Library -> Select Library -> Select library Settings.

13.png

Image 13.

Select Advance settings here.

14.png

Image 14.

Select (Allow Management of content Types to Yes). -> Click OK.

15.png

Image 15.

Here Select Add from existing site content types.

16.png

Image 16.

Select Group -> Select you content type -> Add -> OK.

17.png

Image 17.

Now you can see all columns here in this document library. Here you cans ee in Content type 2 content types are coming so we will make disable Default content type ie: Document. 

Click Change new button order and default content type.

18.png

Image 18.

Unchecked Document Content type to make invisible. -> OK.

Now Time to upload new document -> Select your document library -> click Add document.

19.png

Image 19.

After selecting document click Ok. A popup will come automatically.

20.png

Image 20.

Fill form -> Click Save.

21.png

Image 21.

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

22.png

Image 22.

Select all your columns which you want to show -> and click OK.

23.png

Image 23.

Now you can see your entire column.

  Comment:
         HOME   |   Submit Article   |   Contact Us   |   About Us   |   Terms & Condition   |   Advertise With us