Content Type (Customization Policy)

Represents a reusable collection of settings that can be applied to a certain category of content. Content types enable the management of metadata and behaviors of a document, item, or folder type in a centralized, reusable way.

Real World Example

A software development team needs to tag any documents or list items that relate to patents and are saved to a central Web site, and then send them through a special workflow. The team decides to develop a custom content type as a Feature so that each patent-related document will be clearly identified and associated with the relevant metadata, and will be started through the workflow by its tagging event.

Technical Details

Content types are a Windows SharePoint Services 3.0 schema structure composed of metadata, forms, templates, and workflows. You an define content types by using Features, or by using the Windows SharePoint Services user interfaces or object model. Content types can have information management policies associated with them, and can also have custom Microsoft Office InfoPath forms associated for use as document information panels within premium versions of the 2007 Microsoft Office system client applications.

Following is an example of a simple content type definition in a Feature.

   <ContentType ID="0x0109" Name="Ratings" Group="Base Content Types">
         <FieldRef Name="Body" ID="{7662cd2c-f069-4dba-9e35-082cf976e170}" />
         <FieldRef Name="Expires" ID="{6a09e75b-8d17-4698-94a8-371eda1af1ac}" />
         <FieldRef Name="Comments" ID="{12ec0213-63b5-4eed-b924-994d8be75eeb}" />
         <FieldRef Name="ThumbsUp" ID="{37659CB5-4FED-45c9-B82C-D22B033757E1}" />

Every item in Windows SharePoint Services 3.0 has a content type assigned to it, either implicitly or explicitly. You can explicitly set the content type of an item by selecting a content type for that item. However, even items that have not explicitly been assigned a content type by a user must still adhere to the metadata requirements, or schema, of the list in which they are located; the list schema actually functions as the default content type of the list.

Support Details

You cannot delete a site content type if it is being used as the basis for other site or list content types. You must first remove this content type from all lists that use it and delete all child site content types that are based on it.

A content type cannot be deleted from a list if that list contains items of that content type. Windows SharePoint Services does not consider items sent to the Recycle Bin when making this determination. If those items are restored after their content type is deleted from the list, they are assigned the default content type for that list.

Never update a content type definition file for a content type after the content type is installed and activated.