Inherit Content Types
Introduction
This document describes the content types' hierarchy and how to inherit existing content types. The main reason for making this document is that the standard documentation doesn't contain such a description and it is a part of the SharePoint 2007 server which will be used in any ECM scenario.
Hierarchy
Content types are ordered in a hierarchy (See attachment below for the whole content type inheritance tree - "Appendix A - ContentTypes hierarchy.pdf") to enable reuse and to make maintenance easier. This means that all content types inherit from the same base system content type.
The default content types which are already present in the SharePoint server is found in an XML file which resides in the feature folder: C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\ctypes\ctypeswss.xml. If you want to find the publishing content types they are found here: C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\PublishingResources\PublishingContentTypes.xml. To most important thing to understand when working with content types is that the ID of a content type reveals its base content types and when making your own content type you must provide a unique ID which includes the base content type you wish to inherit from.
An ID of a content type can be composed in two different ways:
•1. baseID + 00 + [GUID] (Ex. 0x010100b6ca00b0b50411db96e9005056c00008)
•2. baseID + two hexadecimal values (Ex. 0x0101AA)
In the first case you must remove the hyphens (-) from the GUID. In the second case you must make sure that the ID you give is unique within the site collection. Both above examples inherit from the document content type which has ID 0x0101. From the ID of the document content type you can see that it inherits from 0x01 = Item, which inherits from System = 0x, which is the base of all content types.
The complete hierarchy of content types is found in the appendix A (see attachment). If a content type can't be inherited it is marked as "SEALED = TRUE" in the diagram. Some of the content types shown in the inheritance diagram cannot be found in the SharePoint UI because they have their "Group" attribute set to "_Hidden".
Best practice
When making your own content types follow this best practice: When you make a content type that directly inherits from one of the predefined content types, the use the first approach e.g. base + 00 + GUID, when inheriting from one of your own custom types, then use the second approach, because now you already have made certain that your own branch is unique and the second approach is much easier to read and thereby makes the inheritance tree structure more transparent.
Tip
If you want to see a content types ID, without opening the xml document, then go to the content type gallery, the link to each content type contains a "ctype" parameter which contains the ID.