Creating a Custom Content Type in SharePoint 2010

Home > Blogs > SharePoint > Creating a Custom Content Type in SharePoint 2010

Creating a Custom Content Type in SharePoint 2010

Like This Blog 10 Spike Xavier
Added by September 16, 2011

In this blog post, we will see how to create a custom content type then use it in a Document Library.

Here's' the problem: We need a custom content type 'ConfigurationFiles' which requires a site column of service tag. The service tag will be a text file because we will eventually need to enforce a specific format or pattern of 3 digits followed by a dash and 3 more digits. For example: 232-343 or 908-458.

Here's the solution: We will create a custom content type of 'ConfigurationFile' It will be based on the document content type and use a custom excel worksheet template. We will add a site column called ServiceTagNumber which will be of type text.

Create our custom content type 'ConfigurationFile'.
We are at the top level site of a new site collection based on the Team Site template for this demonstration. We are the site collection administrator. The url is http://intranet.contoso.com/sites/ctd

To create the custom content type: Site Actions > Site Settings

In the Galleries Section of the Site Administration Page click on Site content types.

Click Create to create a new custom content type.

Now we'll fill out the Name and Description as shown. We are careful to select Document Content Types as the Parent Content Type: Select parent content type from: and Document from the Parent Content Type drop down menus. We will leave this in the Custom Content Type Existing group. Then click the OK button.

We will now add the new site column ServiceTagNumber by clicking on the Add from new site column link.

We fill out the Column name: as ServiceTagNumber and use the default single line of text. We are not using spaces in our name in case we need to get to this property with code at some point in the future. When we are done we click the OK button at the bottom of the screen (not pictured)

Let's go ahead and customize the default template to use an Excel 2010 Spreadsheet as opposed to a Word 2010 document. Click on the Advanced Settings link in the Settings section of the Site Content Type Information Page.

Check the Upload a new document template and click Browse and upload your spreadsheet template. (I made one earlier and saved it to my desktop this was not shown in the instructions) then click the OK button.

Let's check the Document Information Panel settings by clicking on the Document Information Panel Settings link.

Make sure the Always show Document Information Panel check box is checked then click OK.

Make sure the Always show Document Information Panel check box is checked then click OK.

Time to create our Configuration Files Document Library. To do this we'll click Site Actions>New Document Library

We fill in the Create wizard as shown then click the Create button.

We fill in the Create wizard as shown then click the Create button.

We'll click the Library settings to configure the Library to manage it's own content types.

We'll click the Library settings to configure the Library to manage it's own content types.

We'll click on Advanced Settings

In the first section we check Allow management of content types then we click the OK button at the bottom of the page. (not shown)

We click the Add from existing site content types in the Content Types section of the Document Library Settings page.

We click the Add from existing site content types in the Content Types section of the  Document Library Settings page.

Select Custom Content Types from the Select site content types from: drop down list. Then highlight ConfigurationFile and click on the Add> button then click OK.

Select Custom Content Types from the Select site content types from: drop down list.  Then  highlight ConfigurationFile and click on the Add> button then click OK.

Click on the Change new button order and default content type link so we can remove Document from the choice and thus change ConfigurationFile to the default content type.

Click on the Change new button order and default content type link so we can remove Document  from the choice and thus change ConfigurationFile to the default content type.

We'll clear the Visible check box for Document and click OK.

We'll clear the Visible check box for Document and click OK.

Because there are only 2 content types currently listed and we've aced one of them ConfigurationFile becomes the default content type automatically.

Confirm our settings.

Now we'll use the content type. Click on the ConfigurationFiles link in the breadcrumb.

Now we'll use the content type.  Click on the ConfigurationFiles link in the breadcrumb.

Click the Documents tab to change the ribbons context and click New Document to create a new Configuration File.

You can click o.k. if you get the Open Document security warning.

Excel should open up and you should see the Document Information Panel at the top asking for a Title and ServiceTagNumber.

Excel should open up and you should see the Document Information Panel at the top asking for  a Title and ServiceTagNumber.

Notice the use of the template I created (not in these instructions) and uploaded as the default template for the new content type (in these instructions)

That's it!

We have created a Custom Content Type in SharePoint 2010, customized the default template and set up a document library to use our new content type as it's default content type. In another blog we'll add Regular Expression Pattern Matching to make sure that our users enter the ServiceTagNumber in the correct format.

Videos You May Like

A Simple Introduction to Cisco CML2

0 3877 0

Mark Jacob, Cisco Instructor, presents an introduction to Cisco Modeling Labs 2.0 or CML2.0, an upgrade to Cisco’s VIRL Personal Edition. Mark demonstrates Terminal Emulator access to console, as well as console access from within the CML2.0 product. Hello, I’m Mark Jacob, a Cisco Instructor and Network Instructor at Interface Technical Training. I’ve been using … Continue reading A Simple Introduction to Cisco CML2

Creating Dynamic DNS in Network Environments

0 641 1

This content is from our CompTIA Network + Video Certification Training Course. Start training today! In this video, CompTIA Network + instructor Rick Trader teaches how to create Dynamic DNS zones in Network Environments. Video Transcription: Now that we’ve installed DNS, we’ve created our DNS zones, the next step is now, how do we produce those … Continue reading Creating Dynamic DNS in Network Environments

Cable Testers and How to Use them in Network Environments

0 724 1

This content is from our CompTIA Network + Video Certification Training Course. Start training today! In this video, CompTIA Network + instructor Rick Trader demonstrates how to use cable testers in network environments. Let’s look at some tools that we can use to test our different cables in our environment. Cable Testers Properly Wired Connectivity … Continue reading Cable Testers and How to Use them in Network Environments

Write a Comment

See what people are saying...

  1. Pingback: How to hide the Add Document Button in SharePoint 2010

  2. Pingback: How to set Default Metadata Values in SharePoint 2010 | Interface Technical Training

  3. Pingback: Using InfoPath 2010 To Create A Custom Content Type In SharePoint 2010Interface Technical Training Blog

Share your thoughts...

Please fill out the comment form below to post a reply.