Content Types - What and Why?

Content types are a way to associate metadata to an item. So lets say that your company has several departments and each department "files" reports into separate document libraries. You may want every department to tag that report with specific information like "Author", "Supervisor", etc. You would then create a content type called "Reports" for example, and anytime someone uses the Reports content type in a document library, they will automatically see the Author and Supervisor fields.

There are several benefits to using this approach. The first obvious reason is that content types allow you to add columns to a list/library without having to manually go into each relevant list/document library and add the columns. Another benefit involves document templates. You can assign a document template to a content type. So if you have more than one content type in a document library, when you create a new item, each content type will open a specific template. You can add site columns to content types already added to a list/library without altering the site content type. You can do a search based on a content type.
As you can already tell, content types are a very powerful feature that if used properly can make you life so so so much easier. Now, lets get into how to manually create a content type.
Click on Site Actions > Site Settings > Site Content Types.
This will take you to the Site Content Type Gallery. Here, you'll see all the default content types (plus any that you create). You'll notice that the content types are grouped into categories. You can create your own categories (I'll show that here).
Click on the Create button and it will take you to the New Site Content Type page shown in the next image. Now, there are a few things on this page that you'll want to take a look at. The first being the Parent Content Type. You have to select one. Your content type will inherit the columns associated with its parent. The first dropdown contains the name of each grouping, while the second dropdown contains the individual content types found in each group. List Content Types will contain the base Item content type and Document Content Types will contain the base Document content type.
The next thing you'll want to notice on this page is the Group section. Here is where you tell SharePoint what group your content type will belong to. You can select from the existing groups or you can create your own group. In this example, you can see that I'm going to create a Reports content type that inherits from the base Document content type and I'm putting it in a new group called SharePoint Lessons Docs.
You'll be taken back to the Site Content Type Gallery and you should see the new group with your content type underneath it. Click on your content type and under the Columns section, click on "Add from existing site columns". The list box on the left will show you all of the available Site Columns. I'm going to select Author. You'll also see radio buttons on this page. This is where you can choose to push the new fields down to content types that inherit from this content type. When your done, click OK.
Now lets add a new site column. Back in the Reports content type settings page, underneath the Columns section again, click on the "Add from new site column" link. (Guess Microsoft didn't catch that typo, huh?) You'll create a site column the same way you create a list column. I'm going to create a Supervisor column and select Person or Group from the radio list. You'll see something new in the following image. You can put this column in a group. Just for fun, I'm creating a SharePoint Lessons group.
When we go back to our Reports content type settings page, you'll see our 2 new columns. Now any list/library that inherits the Reports content type will contain a Name, Title, Author, and Supervisor column by default.
The next step is to allow our document library to use content types. Go to your document library and click Settings > Document Library Settings > Advanced Settings and click the Yes radio button in the Content Types section located at the top.
When you go back to your document library settings page, you'll see a Content Types section. Click on the "Add from existing site content types" link.
On this page, you can select the grouping or just find your content type in the list box. When you select it, make sure you move it to the second list box and click OK.
Back on the document library settings page, you'll see that your content type is now listed in the Content Types section and your content types columns now show up in the Columns section. Notice that the Used In column tells you which content types use each field.
When we go to add a new item to our document library, you'll see a new menu item for our new content type.
That's not all, you'll also get to see your new columns in the Document Information Panel (DIP). You can edit the metadata in here and when you save it, the updates will be stored in the document library. Also notice that the Supervisor field in the DIP knows that it's a Person or Group column and gives you extra controls to find and/or check usernames.
When you upload a new document, you can select which content type to use for the document. Selecting a content type will display the appropriate fields below. If I chose Document, instead of Reports, the Author and Supervisor fields will not be available.
You also have the option of associating a template to the content type. To get to this page, I went to my document library's settings page, clicked on my content type, then clicked on Advanced Settings.

And that's content types. Again, content types are a very powerful feature if used correctly. Determining content types for a company is something that should be planned carefully. You don't want to have multiple content types or site columns with similar names that are meant to represent the same thing.

Labels: ,