Click to Rate and Give Feedback
Community Content
In this section
Statistics Annotations (9)
This page is specific to
The 2007 product release

Other versions are also available for the following:
Content Type Definition Schema

Each element manifest that defines content types must adhere to the Content Type Definition Schema.

Following is a list of the elements in the Content Type Definition Schema.

<Elements Element (ContentType)>

   <ContentType Element (ContentType)>

      <Folder Element (ContentType)>

      <FieldRefs Element (ContentType)>

         <FieldRef Element (ContentType)>

         <RemoveFieldRef Element (ContentType)>

         <DocumentTemplate Element (FieldRefs)>

      <Forms Element (ContentType)>

         <Forms Element (ContentType)>

            <Forms Element (ContentType)>

            <Forms Element (ContentType)>

            <Forms Element (ContentType)>

            <Forms Element (ContentType)>

      <XmlDocuments Element (ContentType)>

         <XmlDocument Element (ContentType)>

      <DocumentTemplate Element (ContentType)>

Note Note:

The Forms Element (ContentType) element is obsolete, as are its child elements. The DocumentTemplate Element (FieldRefs) child element of the FieldRefs Element (ContentType) element is obsolete as well.

Content Type Schema Example

Following is an example of the XML that defines the Document content type in Windows SharePoint Services 3.0. Elements have been edited for readability.

Xml
<?xml version="1.0" encoding="utf-8" ?>
<!-- _lcid="1033" _version="12.0.3008" _dal="1" --><Elements xmlns="http://schemas.microsoft.com/sharepoint/"><ContentType ID="0x0101"
      Name="$Resources:Document"
      Group="$Resources:Document_Content_Types"
      Description="$Resources:DocumentCTDesc"
      V2ListTemplateName="doclib"
      Version="0">
    <FieldRefs>
      <RemoveFieldRef ID=FID_Attachments Name="Attachments" /> <!-- Attachments -->
… 
      <FieldRef ID=FID_Created Name="Created" Hidden="TRUE" /> <!-- Created -->
      <FieldRef ID=FID_Title Name="Title" Required="FALSE" ShowInNewForm="FALSE" ShowInEditForm="TRUE"/> <!-- Title --></FieldRefs>
    <XmlDocuments>
      <XmlDocument NamespaceURI="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms">
        <FormTemplates xmlns="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms">
          <Display>DocumentLibraryForm</Display>
          <Edit>DocumentLibraryForm</Edit>
          <New>DocumentLibraryForm</New>
        </FormTemplates>
      </XmlDocument>
    </XmlDocuments>
  </ContentType>

</Elements>

See Also

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
How To; change the order of fields shown on SharePoint NewForm.aspx      FredMorrison   |   Edit   |   Show History
The order that fields will appear on the out-of-the-box default SharePoint NewForm.aspx form in response to New, New Item, is governed by the order of the <FieldRef> elements beneath the <ContentType> tag. This wasn't spelled out anywhere that I could find, so this seemed like a good place to document yet another of what I call "What Mother [Microsoft] Never Told You About Controlling The Order Of How Fields Are Rendered In Response To New, New Item" in a custom SharePoint list. :-)
Associate workflow to a content type using feature      Intekhab Sheikh   |   Edit   |   Show History
How to add a workflow template to a custom content type , So that when installing the content type feature the workflows is associated to it by default. Is there any xmldocument section available in which we can specify the workflow template.
If the field order in ContentType is not honored      Henrik Andersson   |   Edit   |   Show History
Use this code to fix it: http://www.alexbruett.net/?p=48

In my case I had code in FeatureActivated that messed up the order from the ContentType definition
Tags What's this?: Add a tag
Flag as ContentBug
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker