13 Sep 2011

Content Types SharePoint

A Content Type schema defines a model for a specific SharePoint complex data type, and is based on a set of Site Column references, together with some other optional information related to forms, rendering templates, a specific document template (only in case of document items), and custom XML configuration.

Content Type IDs

it’s a more complex value that describes the hierarchical inheritance of the type

Content Type ID
System    0x
       Item      0x01
               Document 0x0101
                       XmlDocument 0x010101
                       Picture           0x010102
               Event        0x0102
               Contact     0x0106
               Task          0x0108
               Folder        0x0120

The rule used to define Content Type IDs states that you can build an ID using two different techniques:

  • Parent Content Type ID + two hexadecimal values (cannot be “00”)  [ Used by Microsoft]
  • Parent Content Type ID + “00” + hexadecimal GUID   [Used by developers like us]

To define a hierarchy of custom Content Types of your own, you should:
1. Identify the base Content Type from which you want to inherit.
2. Add 00 at the end of the base Content Type ID.
3. Add a hexadecimal GUID just after the 00.
4. Append two hexadecimal values to declare every specific child of your Content Type.

Example:

Base ID 0x010100BDD3EC87EA65463AB9FAAA3ED
Child 1 0x010100BDD3EC87EA65463AB9FAAA3ED01
Child 2 0x010100BDD3EC87EA65463AB9FAAA3ED02

Content Types Attributes

ReadOnly

Sealed

Hidden

Content Types Elements

FieldRefs

XmlDocuments,with which you can define any kind of custom XML configuration to apply to the Content Type

No comments:

Post a Comment