DocumentTemplate element (Site)
Applies to: SharePoint 2016 | SharePoint Foundation 2013 | SharePoint Online | SharePoint Server 2013
Defines a document library template for the New Document Library page in a website based on Microsoft SharePoint Foundation.
<DocumentTemplate
Default = "TRUE" | "FALSE"
Description = "Text"
DisplayName = "Text"
Name = "Text"
Path = "Text"
Type = "Number">
</DocumentTemplate>
Elements and attributes
The following sections describe attributes, child elements, and parent elements.
Attributes
Attribute | 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 definition 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. |
Child elements
Parent elements
Occurrences
- Minimum: 0
- Maximum: Unbounded
Example
The following example defines a Microsoft Office Excel 2007 document library template.
<DocumentTemplate Path="STS" DisplayName="$Resources:core,doctemp_Excel;" Type="103" Description="$Resources:core,doctemp_Excel_Desc;">
<DocumentTemplateFiles>
<DocumentTemplateFile Name="doctemp\xl\xltmpl.xls" TargetName="Forms/template.xls" Default="TRUE" />
</DocumentTemplateFiles>
</DocumentTemplate>