DocumentTemplate Element (ContentType)

Applies to: SharePoint 2016 | SharePoint Foundation 2013 | SharePoint Online | SharePoint Server 2013

Specifies the document template for the content type. This is the file which SharePoint Foundation opens as a template when a user requests a new item of this content type.

Definition

<DocumentTemplate
  TargetName="Text"
/>

Elements and attributes

The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute

Description

**TargetName**

Optional **Text**. Specifies the path to the document template. This path can be absolute, relative to the server base URL, or relative to the content type's resource folder.

Child elements

None.

Parent elements

ContentType Element (ContentType)

Occurrences

Minimum: 0

Maximum: 1

Example

The following example specifies a document template for a content type. In this case, the path specified is relative to the server base URL.

    <ContentType 
    …
      <DocumentTemplate TargetName="/_layouts/NewCTDoc.aspx" />
    </ContentType>

See also