Content Type Definition

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

A content type is a reusable container for a schema and its forms. A content type contains both inline field definitions and links to fields declared as shared field sets, and it can also contain form definitions.

Elements
  ContentType
    FieldRefs
      [FieldRef|RemoveFieldRef]
    XmlDocuments
      XmlDocument
        FormTemplates
          [Display|Edit|New] 

ContentType Attributes

Name Data Type Description

Group

Text

Specifies the name of the content type group to which the type belongs. This attribute is used for grouping the list of content types in the user interface.

ID

Content_Type_ID

Specifies the content type ID for the content type.

Name

Text

Specifies the display name for the content type. This name must be unique in its scope. The maximum length of the string is 128 characters and the string must be a valid folder name.

Sealed

Boolean

TRUE to specify that the content type is a system type and thus cannot be modified.

V2ListTemplateName

Text

Specifies the name of the list template as represented in the previous version of Windows SharePoint Services.

Version

Integer

Specifies a version number for the content type.

Example

The following example shows the contents of an XML file in which particular fields are specified for a content type.

<?xml version="1.0" encoding="utf-8" ?>
<Elements xmlns="https://schemas.microsoft.com/sharepoint/">
   <ContentTypes>
      <ContentType ID="0x010100F8EF98760CBA4a94994F13BA881038FA" 
         Name="InfoPath Form Template" Group="InfoPath Content Types" 
         Description="A Microsoft Office InfoPath Form Template." Version="1">
         <FieldRefs>
            <FieldRef ID="{66B691CF-07A3-4CA6-AC6D-27FA969C8569}" 
               Name="FormName" Required="TRUE" />
            <FieldRef ID="{65572D4D-445A-43F1-9C77-3358222A2C93}" 
               Name="FormCategory" Required="FALSE" />
            <FieldRef ID="{94AD6F7C-09A1-42CA-974F-D24E080160C2}" 
               Name="FormVersion" Required="TRUE" />
            <FieldRef ID="{1A03FA74-8C63-40CC-BD06-73B580BD8744}" 
               Name="FormId" Required="TRUE" />
            <FieldRef ID="{96C27C9D-33F5-4f8e-893E-684014BC7090}" 
               Name="FormLocale" Required="TRUE" />
            <FieldRef ID="{1FFF255C-6C88-4a76-957B-AE24BF07B78C}" 
               Name="FormDescription" Required="TRUE" />
            <FieldRef ID="{58EB8694-8BD6-4f98-8097-374BD97FFEC4}" 
               Name="CusomContentTypeId" Required="TRUE" />
            <FieldRef ID="{4EF69CA4-4179-4d27-9E6C-F9544D45DFDC}" 
               Name="ShowInCatalog" Required="TRUE" />
            <FieldRef ID="{1A03FA74-8C63-40CC-BD06-73B580BD8743}" 
               Name="LinkTemplateName" Required="FALSE"/>
         </FieldRefs>
      </ContentType>
   </ContentTypes>
</Elements>