This topic has not yet been rated - Rate this topic

ContentTypes Element (List)

Windows SharePoint Services 3

Contains references to content types to associate with lists that are created through the list definition.


<ContentTypes>
  <ContentTypeRef
    ID = "Text">
        <Folder
          TargetName="Text">
        </Folder>
  </ContentTypeRef>
  ...
</ContentTypes>
Attribute Description

None

N/A

Minimum: 0

Maximum: 1

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
ContentType as a Child Element of ContentTypes
According to wss.xsd from (12\Template\XML), ContentTypes also supports having ContentType element as a child, not only ContentTypeRef:

<xs:complexType name="ListMetaDataDefinition">
<xs:all>
...
<xs:element name="ContentTypes" type="ContentTypeReferences" minOccurs="0" maxOccurs="1" />
</xs:all>
</xs:complexType>
...
<xs:complexType name="ContentTypeReferences">
<xs:sequence>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="ContentTypeRef" type="ContentTypeReference" />
<xs:element name="ContentType" type="ContentTypeDefinition" />
</xs:choice>
</xs:sequence>
</xs:complexType>
ContentType
Additional Info:
  • ContentType: http://msdn2.microsoft.com/en-us/library/aa544268.aspx

  • How to: Add a Content Type to a List: http://msdn.microsoft.com/en-us/library/aa543576.aspx