BaseTypes Element

The BaseTypes element contains the collection of BaseType elements in the ONET.XML file of a site definition.

Syntax

<BaseTypes>
</BaseTypes>

Element Relationships

Parent Elements Child Elements
Project BaseType

Remarks

The fields defined in a base type may not be deleted from a derived list without breaking the list (for example, a document library won't function without the file name column), although fields may be added to the list.

Example

This example from ONET.XML defines the discussion forum base type, in other words, the fields that all discussion forums must have. You can create other discussion forums with additional fields; however, all discussion forums must include the fields defined in the following base type.

<BaseType Title="Discussion Forum" Image="_layouts/images/itdisc.gif" Type="3">
   <MetaData>
      <Fields>
         <Field ColName="tp_ID" Type="Counter" Name="ID" ReadOnly="TRUE" PrimaryKey="TRUE" DisplayName="ID"></Field>
         <Field Type="Text" Name="Title" DisplayName="Subject" Required="TRUE" ></Field>
         <Field ColName="tp_Modified" ReadOnly="TRUE" Type="DateTime" Name="Modified" DisplayName="Modified" StorageTZ="TRUE"></Field>
         <Field ColName="tp_Created" ReadOnly="TRUE" Type="DateTime" Name="Created" DisplayName="Posted At" StorageTZ="TRUE"></Field>
         <Field ColName="tp_Author" ReadOnly="TRUE" Type="User" List="UserInfo" Name="Author" DisplayName="Posted By" ></Field>
         <Field ColName="tp_Editor" ReadOnly="TRUE" Type="User" List="UserInfo" Name="Editor" DisplayName="Modified By" ></Field>
         <Field ColName="tp_Version" Hidden="TRUE" ReadOnly="TRUE" SetAs="owshiddenversion" Type="Integer" Name="owshiddenversion" DisplayName="owshiddenversion"></Field>
         <Field ColName="tp_Ordering" Hidden="TRUE" ReadOnly="TRUE" Name="Ordering" Type="Threading" DisplayName="Ordering"></Field>
         <Field ColName="tp_GUID" ReadOnly="TRUE" Hidden="TRUE" Type="Guid" Name="GUID" DisplayName="GUID"></Field>
         <Field ColName="tp_HasAttachment" Type="Attachments" Name="Attachments" DisplayName="Attachments"></Field>
         <Field ColName="tp_ModerationStatus" ReadOnly="TRUE" Type="ModStat" Name="_ModerationStatus" DisplayName="Approval Status" Hidden="TRUE" CanToggleHidden="TRUE" Required="FALSE">
            .
            .
            .
         </Field>
         <Field ReadOnly="TRUE" Type="Note" Name="_ModerationComments" DisplayName="Comments" Hidden="TRUE" CanToggleHidden="TRUE" Sortable="FALSE"></Field>
         <Field ReadOnly="TRUE" Name="ThreadID" Hidden="TRUE" Type="Guid" DisplayName="Thread ID"></Field>
         <Field ReadOnly="TRUE" Type="Computed" Name="Threading" Hidden="TRUE" DisplayName="Subject" DisplayNameSrcField="Title" AuthoringInfo="(threaded)" >
            .
            .
            .
         </Field>
         <Field ReadOnly="TRUE" Type="Computed" Name="ThreadingNoIndent" DisplayName="Subject" DisplayNameSrcField="Title" AuthoringInfo="(linked to item with edit menu)" >
            .
            .
            .
         </Field>
         <Field Name="Body" RichText="TRUE" Type="Note" DisplayName="Text" Sortable="FALSE" NumLines="10"></Field>
         <Field ReadOnly="TRUE" Type="Computed" Name="Edit" Sortable="FALSE" Filterable="FALSE" DisplayName="Edit" AuthoringInfo="(link to edit item)" >
            .
            .
            .
         </Field>
         <Field Name="InstanceID" DisplayName="InstanceID" ColName="tp_InstanceID" ReadOnly="TRUE" Hidden="TRUE" Type="Integer" Min="0" Max="99991231" Filterable="TRUE" Sortable="TRUE"></Field>
         <Field ColName="tp_ItemOrder" Name="Order" DisplayName="Order" Type="Number" Hidden="TRUE"></Field>
      </Fields>
         .
         .
         .
   </MetaData>
</BaseType>