What are SharePoint Content Types?

One of the most powerful features of SharePoint version 3 is the introduction of content types. Not just are content types incredibly flexible, but they also allow a degree of control that far surpasses any other mechanism in SharePoint.

When I wrote issue 2 of Understanding SharePoint Journal, I assumed, perhaps wrongly so, that most people were familiar with the concept of SharePoint content types. I focused most of that issue on developing content types, but perhaps not enough time on explaining exactly what content types are.

So, I’m writing this relatively short overview. And I am saying relatively short, because any overview of content type must be vast, simply because of the span and importance of content types to any SharePoint solution.

SharePoint Content Types in five bullets:

1. SharePoint content types is a term used for describing a collection of metadata

For example, an invoice content type may contain a set of metadata such as buyer, date of sale, terms of delivery, order total, shipping cost, etc.

2. Content types support user interface customization

You can define the appearance of a content type, both while editing, creating, and displaying data based on the content type. For example, you may want to display or edit your invoices in a page resembling an actual invoice.

3. Content types support behavior through workflows and event receivers

Data derived from a content type can behave in a certain fashion or react to specific events. For example, an invoice may need approval from a manager, or you may want to prevent deletion of approved invoices altogether.

4. Content types can have specific user interface elements attached

Through the use of CustomAction elements, content types can have unique menu options attached to the user interface. For example, you may want to add a ‘Pay now’ menu option or button to an invoice, and only for an invoice.

5. SharePoint content types support inheritance of properties, appearance, and behavior

You can create content type hierarchies, for example by having a root accounting document content type that defines a set of metadata, user interface options, and behavioral settings, and have the invoice child content type inherit those settings and override or extend the definition to include the necessary modifications for an invoice.

If you think all of this sounds complex, don’t worry. Content types are easy to use, and the complexity grows with your understanding.

How to Create Content Types

Creating content types is incredibly simple. You have access to the content types on the Site Settings page, accessible from the Site Actions menu. You can find the Site Content Type Gallery page by clicking the Site Content Types link in the Galleries section.

All content types inherit from an existing content type. The Site Content Type Gallery page gives you an overview of all available content types for your site and from which parent content type each content type inherits.

To create a new content type, click the Create button in the toolbar and type in a name and optional description for your new type. Then, select from which parent content type your new content type should inherit and choose or create a new display group or the type. Hit OK and you’re done.

Once your new type is created, you can edit the settings for the content type, such as any new columns you want to add to your type, attach workflows to your content type, or change the name and description. You can also reach the content type configuration page from the Site Content Type Gallery, by clicking on the content type name in the list.

How to Use a Content Type

You need to attach your content type to a list or library in order to create items based on the content type. Generally, you can attach content types that inherit from the Document content type to a library and content types that inherit from the Item content type to most other lists.

To attach a content type to a list, go to the list settings of your chosen list and click the Advanced settings link on the Site Settings page. Click Yes in the section called "Allow management of content types?" and click OK. You will return to the Site Settings page and should now see a new section containing the content types. Click "Add from existing site content types", select your content type and click OK to add the content type.

You can now return to your list view and click the down-arrow on the New button to create a new item based on your content type. Note that any additional content type columns you added earlier will also be added to the list.

16.05

Some Questions about Content Types

Wait, this is too much, I prefer not to use content types. How can I avoid content types?

Your only choice to avoid using content types is not to use SharePoint. All data stored in SharePoint is stored using a content type. Even folders are content types. Therefore, you cannot simply choose to not use content types; you already are, if you are using SharePoint at all.

What do you mean? How can folders be content types?

The complete answer is beyond the scope of this short article, however, the fact that folders indeed are content types means you can also create new folder types and attach behavior and custom metadata to those folders. One example is to add a ‘Zip Folder Contents’ option to the folder menu.

Ok, you sold me, where can I learn more?

Mark Miller over at EndUserSharePoint.com has a beginner’s guide to content types presentation available that will guide you through content types and show you some examples and best practices. EndUserSharePoint.com also has periodical workshop classes where you can learn even more about using content types. However, spaces in those classes are very limited, so I recommend you sign up for his newsletter to be notified whenever a new class is announced.

Of course, I may be a bit biased, but if you want to learn to develop more complex content types and harness all the power available, get issue 2 of Understanding SharePoint Journal, called Developing SharePoint Content Types. In that issue, I will teach you all the inner workings of SharePoint content types. Be prepared to get wet, though, because the content is targeted at people with some development experience.

.b

Found this article valuable? Want to show your appreciation? Here are some options:

a) Click on the banners anywhere on the site to visit my blog's sponsors. They are all hand-picked and are selected based on providing great products and services to the SharePoint community.

b) Donate Bitcoins! I love Bitcoins, and you can donate if you'd like by clicking the button below.

c) Spread the word! Below, you should find links to sharing this article on your favorite social media sites. I'm an attention junkie, so sharing is caring in my book!

Pin It

Published by

Bjørn Furuknap

I previously did SharePoint. These days, I try new things to see where I can find the passion. If you have great ideas, cool projects, or is in general an awesome person, get in touch and we might find out together.

14 thoughts on “What are SharePoint Content Types?”

  1. B…I had a question about CTs and thought you might be able to answer it. Can you force your user to only be able to choose specific Parent content types from which to inherit? For instance, when I go to the ctypenew.aspx page can I make it such that when I select Document Content Types in the "Select parent content type from:" dropdown can I force the "Parent Content Type:" dropdown list to only show a specific few Document CTs rather than all of them?

  2. B…I had a question about CTs and thought you might be able to answer it. Can you force your user to only be able to choose specific Parent content types from which to inherit? For instance, when I go to the ctypenew.aspx page can I make it such that when I select Document Content Types in the "Select parent content type from:" dropdown can I force the "Parent Content Type:" dropdown list to only show a specific few Document CTs rather than all of them?

  3. B…thanks for the reponse. It's not what I was hoping for but was what I expected. I want to force the users of my application to use ONLY those content types that I define for them. For instance, I want to have a "Company Document" CT inherited from Document but when they go to the ctypenew page I don't want them to see the base Document CT. I guess I could hide it but that would be a real pain in the future. I would want SC Administrators to be able to see it in order to create other CTs derived from it. I don't want to set it up so that every future CT needs to be implemented via CAML.

  4. Chris:

    You only option here is to make the aprent content type hidden. Doing so will remove the unwatned content types from the list, but this will apply to all users, including administrators.

    This does not prevent you from inheriting from the content type using other means, however. For example, you may want to create a base content type that is hidden, and the create child document content types using CAML that are available for users.

    There is no way to do this solely through the web interface, though.

    Shoot me an email if this is not the answer you were looking for.

    .b

  5. Chris:

    Just one more note. You can, of course, create your own content type management, and that will allow you do to pretty much anything you like, but not with the default CT management, though.

    .b

  6. Great article.

    Six months ago, Sharepoint was deployed in the company where I work. In one of our internal sites, I have a document library with 20 content types, one for each letter type. These letters are very similar (termination of service templates). Most have the same site columns; others have 1-2 additional site columns.

    What's the best approach for this scenario?

    1 conteny type called 'Termination of Service', and have all the possible site columns
    20 content types. One for each letter even if the site columns are identical (or nearly identical)

  7. Hello – I have created multiple content types (which I refer to as my child content types) based on a master/parent content type. Many of the child content types have been deployed in my sub-sites library lists (under my root site). We now need to update some of those child content type names, which were created at the root site from the parent content type. When I go into the root site, and navigate to one of the child content types whose name needs to be updated, I am allowed to update the name but there is no option to have the change cascade to dependencies. So once I have changed the name of the child content type, what I end up with is a child content type name change at the root site but the old name is still referenced in all of my sub-sites. Is there a way to update a content type name at the root site and have the change trickle to wherever that content type was used in any sub-site list or library-list beneath the root/sub-site heirachy? I would need to be able to do this out of the box, no coding, but could use sharepoint designer. Thank you!!!

  8. Where/howdo I update HTML tags and attributes? Please explain in detail, as I said, all of my development is out of the box and via sharepoint designer. Thank you!

  9. ok, if I can’t update a content type name, which was created from the master parent template content type, at the root site, to be deployed on each of the root sub-sites for the purpose of data rollup across all of the sub-sites, if I change the name of that root child content type at each sub-site (using the same exact name) will the rollup of that content type from the root site of that content type still work? (I would change the content type name on the root site and the name of that same content type deployed at each sub-site level to the same name). Basically, if I change the name of the content type I created at the root site (from a parent content type), everywhere it is used, will my content type rollups for that content type still work?

Leave a Reply

Your email address will not be published.