DocumentTemplate Element

The DocumentTemplate element defines a document library template for the New Document Library page in a Web site based on Microsoft Windows SharePoint Services.

Syntax

<DocumentTemplate
  Default = "TRUE" | "FALSE"
  Description = "Text"
  DisplayName = "Text"
  Type = "Number">
</DocumentTemplate>

Attributes

Name Description
Default Optional Boolean. TRUE if the template is the default choice in the Template Type drop-down list box of the New Document Library page.
Description Optional Text.. A description of the template.
DisplayName Required Text. The display name of the template.
Name Optional Text. The internal name of the template.
Path Optional Text. The name of the site template to which the document template belongs.
Type Required Integer. A unique ID for the template.
XMLForm Optional Boolean. TRUE if the document template applies to a form library.

Element Relationships

Parent Elements Child Elements
DocumentTemplates DocumentTemplateFiles

Example

The following example specifies a Microsoft Office Word 2003 template as the default template on the New Document Library page.

<DocumentTemplate DisplayName="Microsoft Office Word document" Type="101"
  Default="TRUE" Description="A blank Microsoft Office Word document.">
  <DocumentTemplateFiles>
    <DocumentTemplateFile Name="doctemp\word\wdtmpl.doc"
      TargetName="Forms/template.doc" Default="TRUE" />
  </DocumentTemplateFiles>
</DocumentTemplate>