What are Content Types?



For me, one of the coolest new features of SharePoint Server 2007 (or MOSS) is Content Types. In this article, I’ll aim to give a brief overview of what they are and why you should be getting excited about them (especially if you are from a SharePoint 2003 background).


 



It is worth noting that this article is focused on the implications of Content Types in a document management scenario. Content Types are used throughout MOSS and have benefits throughout, but it was too much to cover in one article, so I decided to focus on DM.


What is a Content Type then?
A content type is an object that is stored within MOSS that defines several elements of a piece of content, including:



  • Document Template that the content will be based on
  • Columns that the content will have associated with it (metadata)
  • Workflows that the content will use
  • Information Management policies that apply to the content
  • Conversion types for the content

This picture shows the site-wide admin interface for managing content types



Every piece of list or library content in MOSS is created from a content type. There are a load of out-of-the-box content types like ‘Blank Document’ or ‘Announcement’ and you can create your own (without any code or customisation, it is done through the admin UI).


So how do you apply them?
Content Types are created centrally and then they can be applied to lists and libraries throughout your site.


This picture shows the list-based interface for adding content types to a list or library




What does this mean for users?
This means that users can now create an expense report by simply choosing ‘expense report’ from the new item button on the library. Their new expense report will be created from the central content type with the document template and all the columns and workflow that are associated with the content type.


This pictures show the net result of content types; the ability for users to choose what type of content they wish to create


The important thing to note here is that the content will inherit all of the columns and workflow that comes with the content type – even if the library does not.


For example, if you have a standard document library that just has the ‘blank document’ content type associated with it (which is the default) it will not have any columns or workflows. However if you add the ‘expense report’ content type to the library, items created from that content type will have all of the columns and workflows that are required by the content type. These columns can be used in the same way as list-based columns.


Why should you get excited?
The easiest way to demonstrate this is to compare SharePoint Server 2007 against SharePoint Portal Server 2003 functionality.


Document Templates:


  • In 2003 you needed some third party or community supported code to use anything more than the single template that is defined for each library
  • In 2007 you can choose to include multiple content types (each with their own template) within a library using simple configuration

 


Metadata (Columns):


  • In 2003, all items in a library have to use the same metadata columns. This restricts your library design to specific types of content rather than administrative or logical libraries structures
  • In 2007, the content in a library can be whatever type you like without compromising the metadata of that content because each content type brings it’s own set of columns

 


Workflow:


  • OK, so 2003 did not have workflow. But it did have Document Library Event Handlers which were used for workflow. Again these event handlers applied to the entire content of a library, not specific documents
  • In 2007, the content brings the workflow that it needs with it, regardless of where it is stored. Work flows are included as part of the contenyt type, not the library (allthough they can also be set on thr library)

 


Search:


  • In 2003, there was no easy way of differentiating different types of content other than relying on column values being filled out
  • In 2007, you can search on ‘where content type = x’, i.e. ‘give me all the expense reports written by Jo Blogs’

 


This was only a brief summary, I hope it was useful. Please comment if you need clarification, found it usefull, good but do this different etc ….

Comments (31)

  1. Martin Kearn stellt in seinem Artikel die Content types in SharePoint 2007 vor:

    What is a Content…

  2. Mick Ekers says:

    … or Document Profiles as we used to call them in SPS 2001. Good to see all the document management features removed in SPS2003 being re-introduced and improved.

    Tricky bit will be explaining it to original 2001 users who were told that the functionality lost in SPS2003 was not important and made the system easier and faster to user 🙂

  3. So are these content types stored per site collection or are they server wide?

  4. Columns have always been one of the most powerful features in SharePoint as they allow you to slice and…

  5. Romeo Pruno says:

    VIA JOPX on SharePoint, MCMS, Office and SOA

    The Beauty of SharePoint 2007 – Publishing / Copying…

  6. Vidya says:

    Hi,

    We are trying to deploy content types using Features .

    In the content type we are trying to create fields which use Lookup datatype in order to map with the columns of a list.

    Can u please let us know the usage of LookUp in content types

    Regards,

    Vidya

  7. Marc Blasi says:

    I had a question about content types relating to the templates that you can link to a specific content type.  I know that you can link only one template to one content type, but was wondering if there was a way to use content types to organize our office templates (there are about 180 of them). I was hoping to use the group attribute to organize the documents into specific units and then build the drop down under new off of the groups containing all of the templates creating a multi template document library that gives access to all templates, but does not just show a huge listing of them but actually organizes them inside of the drop down.  Am I going about this idea in the right manner or should I be creating a custom web part?  Just started to play around with V3 because of the new options available, but was hoping to accomplish this goal.  Any help is appreciated.  Good post, it was very informative.

    Marc

  8. Oliver Schindler says:

    Hi,

    nice article.

    I have exactly the same problem to solve like Marc Blasi. So far I had no luck in displaying them hierarchical in the New drop down menu of the Docuemt Library.

    Regards,

    Oli

  9. SJ says:

    I understand that SharePoint 2007 has limitations on the number of Content types ie., Only 50 Content types that can be defined. How can I define 300+ content types in SharePoint 2007.

  10. Apologies that I’ve been a little quiet responding to questions of late, I’ve had quite a lot of work on and not got round to it. This question about the max number of content types caught my interest though ….. turns out that we do have some UI limitations in Beta2 in that it will not display more than 15 content types very well, but there is no hard limit in terms of the number you can have. The only hard limit in the product is that the total size of all content type schema on the list cannot exceed 2GB.

    I’d expect that the UI limitation will be sorted for future releases (please do not take that as an ‘official’ comment, just my personal expectation 🙂 )

    Regards – Martin Kearn

  11. What has happened to Portal Listings in MOSS 2007? Let’s make it short: They are gone! (And…

  12. Arno Nel 2.0 says:

    Planning Plan document management Chapter overview: Plan document management What is document management?

  13. Jim Raley says:

      I’m getting "element has no children" when I try to push built-in elements of an item down the list in favor of client-requested form fields.  Specifically, when it comes to "discussion groups", I need to push the "body" element after a few other fields, and MOSS 2007 doesn’t seem to like it.

       It’s as if I can resort my custom fields, but I gotta stay away from the built-in stuff.

       Am I understanding these limits properly, or is there a trick?  I’m using the UI.

       Thanks.

  14. Raul Ribeiro says:

    SharePoint 2007 – General information SharePoint Server 2007 – Hidden gems Microsoft Office SharePoint

  15. Columns have always been one of the most powerful features in SharePoint as they allow you to slice and

  16. Sirk says:

    Is there a way to set the default content type (and/or order) on a list through the object model? (looking to do the same thing you can do through the UI but through code)

  17. Michael says:

    How can we Add additional Column settings dynamically or programatically

  18. Liles says:

    In SPS2003 (and in 2007 with some modification) I am able to programmatically (vb.net) set column values using the Updatelistitems web service.  Will this work the same on a content type I wonder?  Will it see the columns of the content type the same way?

  19. arsenjew says:

    Can I combine user administration and content type definitions in a way that allows only users within a specific role to create new documents of a specific type? Or would I have to manage this by defining the content type for a specific site and give only users with a specific role access to this site?

  20. Kevin says:

    Hi all , very nice site! Thank You !

  21. Aruna says:

    Hello,

    I am trying to add multiple content types to a library when i tried with one content type it was working but for 2 content types the second type is not appearing in "new" menu. I saw my 2 content types and the correspoing columns in site columns/ site content types section but that second only not appearing in new comamnd what went wrong? could any one help me out please…

    Thanks

    Aruna

  22. Aruna says:

    Here is my code for adding multiple content types to library. Please check

    <Elements xmlns="http://schemas.microsoft.com/sharepoint/"&gt;

     <!– Content Types used by Hyper.Net –>

     <ContentType ID="0x0101009927057F616A475898E81C1FB15770B7" Name="Structured" Group="HN Integration Content Types" Version="0">

       <FieldRefs>

          <FieldRef ID="{7261987E-9FD1-431d-8C8C-27C51E57CD5C}" Name="Hypertext" />

          <FieldRef ID="{6FBEA9E5-0213-4745-8C80-8CB3D90FFA1C}"   Name="TaxonomyMappings" Hidden="TRUE"/>

          <FieldRef ID="{9B05FED3-732B-43fc-9139-0E91C93DF743}" Name="InfoType" />

          <FieldRef ID="{21491E1E-89D9-4311-9DCC-6C62AD24CA1A}" Name="MainTOC"/>

          <FieldRef ID="{59A7BC5C-A4CB-4635-B026-8D3B4001FC92}" Name="ExternalTargetGroup" />

          <FieldRef ID="{BE8A517B-A695-4890-A96B-798F281A6350}" Name="LearnAbout" />

       </FieldRefs>

     </ContentType>

     <ContentType ID="0x01010097467DF67DF7427983A75A6EB3D351B4" Name="Unstructured" Group="HN Integration Content Types" Version="0">  

       <FieldRefs>

       <RemoveFieldRef ID="FID_Attachments" Name="Attachments" Required="FALSE" Hidden="TRUE" ShowInNewForm="FALSE" ShowInEditForm="TRUE"/>

         <RemoveFieldRef ID="FID_SelectFilename" Name="SelectFilename" Hidden="TRUE"  Required="FALSE" ShowInNewForm="FALSE" ShowInEditForm="TRUE"/>

    <FieldRef ID="{B2C5235D-1543-47b9-AF52-C02E97A37514}" Name="Abstract" />

       </FieldRefs>

       </ContentType>

    </Elements>

    bye