ListTemplate element (Site)

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

Specifies a list definition that is available as an option for creating lists on the Create Page.

<ListTemplate
  AllowDeletion = "TRUE" | "FALSE"
  AllowEveryoneViewItems = "TRUE" | "FALSE"
  AlwaysIncludeContent = "TRUE" | "FALSE"
  BaseType = "0" | "1" |"3" | "4" | "5"
  CacheSchema = "TRUE" | "FALSE"
  Catalog = "TRUE" | "FALSE"
  Category = "Libraries" | "Communications" | "Tracking" |
    "Custom Lists"
  Default = "TRUE" | "FALSE"
  Description = "Text"
  DisableAttachments = "TRUE" | "FALSE"
  DisallowContentTypes = "TRUE" | "FALSE"
  DisplayName = "Text"  DocumentAsEnclosure = "TRUE" | "FALSE"
  DocumentTemplate = "Integer"
  DontSaveInTemplate = "TRUE" | "FALSE"
  EditPage = "Text"
  EnableModeration = "TRUE" | "FALSE"  EnablePeopleSelector = "TRUE" | "FALSE"  EnableResourceSelector = "TRUE" | "FALSE"
  FeatureId = "Text"
  FolderCreation = "TRUE" | "FALSE"
  Hidden = "TRUE" | "FALSE"
  HiddenList = "TRUE" | "FALSE"
  Image = "URL"
  MultipleMtgDataList = "TRUE" | "FALSE"
  MustSaveRootFiles = "TRUE" | "FALSE"  MultipleTypes = "TRUE" | "FALSE"
  Name = "Text"
  NewPage = "Text"
  NoCrawl = "TRUE" | "FALSE"
  OnQuickLaunch = "TRUE" | "FALSE"
  Path = "Text"
  RootWebOnly = "TRUE" | "FALSE"
  SecurityBits = "Text"
  Sequence = "Integer"
  SetupPath = "Text"
  SyncType = "Text"
  Type = "Integer"
  Unique = "TRUE" | "FALSE"
  UseRootFolderForNavigation = "TRUE" | "FALSE"
  VersioningEnabled = "TRUE" | "FALSE">
</ListTemplate>

Elements and attributes

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

Attributes

Attribute Description
AllowDeletion
Optional Boolean. TRUE to specify that lists created through the list definition cannot be deleted; otherwise, FALSE.
AllowEveryoneViewItems
Optional Boolean. TRUE to allow any user to view items in the library. The AllowEveryoneViewItems attribute is used, for example, in the Master Page gallery to give all users access to master pages.
AlwaysIncludeContent
Optional Boolean. TRUE to specify that list content be included by default when lists created through the list definition are saved as list templates in the user interface; otherwise, FALSE.
BaseType
Required Integer. Specifies the base type, or default schema, for lists created from the definition. In SharePoint Foundation, this can be 0, 1, 3, 4, or 5. It cannot be 2.
CacheSchema
Optional Boolean. TRUE to enable schema caching of the list when provisioning a site. The CacheSchema attribute is used, for example, in the global Onet.xml file to enable caching of the user list for the current site collection.
Catalog
Optional Boolean. TRUE to specify that the list definition is for a site gallery, a list gallery, or a web part gallery.
Category
Optional Text. Specifies the category with which to associate lists created through the list definition.

Possible values include the following:
Libraries
Communications
Tracking
Custom Lists
Default
Optional Boolean. TRUE to specify that new SharePoint sites will include this list.
Description
Optional Text. Provides a description of the list definition.
DisableAttachments
Optional Boolean. TRUE to specify that users can attach files to items in lists created through the list definition; otherwise, FALSE.
DisallowContentTypes
Optional Boolean. TRUE to specify that content types can be managed on lists created through the list definition; otherwise, FALSE.
DisplayName
Required Text. Specifies the display name of the list definition.
DocumentAsEnclosure
Optional Boolean.
DocumentTemplate
Optional Integer. Currently unused. This is only valid in a ListTemplate element whose BaseType is set to 1 (document libraries). For future compatibility, this should either be left blank or correspond to the Type attribute of a DocumentTemplate element in the DocumentTemplates enumeration. This attribute has been deprecated in SharePoint Foundation.
DontSaveInTemplate
Optional Boolean. TRUE to exclude the content of the list when the list is saved as a custom list template or when the site to which the list belongs is saved as a custom site template through the user interface.
EditPage
Optional Text. Specifies the name of a custom form to use as the page for editing items in lists created through the list definition.
EnableModeration
Optional Boolean. TRUE to specify that content approval is enabled by default in lists created through the list definition; otherwise, FALSE.
EnablePeopleSelector
Optional Boolean.
EnableResourceSelector
Optional Boolean.
FeatureId
Optional Text. Specifies the GUID that identifies the Feature with which the list definition is associated.
FolderCreation
Optional Boolean. TRUE to enable folder creation within the list and to specify that the New Folder command appears on the New menu in list views; otherwise, FALSE.
Hidden
Optional Boolean. TRUE to specify that the list definition is not available on the Create Page for creating lists.
HiddenList
Optional Boolean. TRUE to specify that a list created from the list definition is hidden.
Image
Optional URL. Specifies a URL to an icon used to represent a list.
MultipleMtgDataList
Optional Boolean. If MultipleMtgDataList="TRUE" is specified, the list within a Meeting Workspace site contains data for multiple meeting instances within the site.
MultipleTypes
Optional Boolean.
MustSaveRootFiles
Optional Boolean. TRUE to save the pages contained within a special document library that is used internally for a Meeting Workspace site when the list template is saved without content. This attribute is not intended for public use.
Name
Required Text. Specifies the internal name of the list definition. No spaces or special characters can be used. This name is also used to find the folder that contains the Schema.xml file that defines the schema in use.
NewPage
Optional Text. Specifies the name of a custom form to use as the page for creating items in lists created through the list definition.
NoCrawl
Optional Boolean. TRUE to specify that the list not be visible in search results; otherwise, FALSE.
OnQuickLaunch
Optional Boolean. TRUE to display lists created from the list definition on the Quick Launch bar, if that bar has a Lists node.
Path
Optional Text. Specifies the name of the site definition that contains the list definition, for example, STS. This path is assumed to be relative to the 12\TEMPLATE directory. The path can be directed at a features schema, for example, Features\Announcements. This attribute has been deprecated in SharePoint Foundation.
RootWebOnly
Optional Boolean. TRUE to specify that the list created from the definition exists only in the root website of a site collection. This attribute has been deprecated in SharePoint Foundation.
SecurityBits
Optional Text. Defines the item-level permissions in the list for users with sufficient permission to read or edit list items. The SecurityBits attribute contains a 2-digit string. The first digit in the string controls the read access, while the second digit in the string controls the edit access.

For read access, the following are valid digits:
1 Users can read all items.
2 Users can read only their own items.

For edit access, the following are valid digits:
1 Users can edit all items.
2 Users can edit only their own items.
4 Users cannot edit items.

NOTE: Users with the ManageLists permission can read and edit all items, regardless of the SecurityBits attribute value.
This attribute does not apply to document libraries.
Sequence
Optional Integer. Specifies the ordering priority to use for the list definition on the Create page. If Sequence is not set, the list definition shows up last in arbitrary order with any other list definitions that also lack a Sequence value. Two list definitions that specify the same sequence are sorted together in an arbitrary order.
SetupPath
Optional Text. Specifies the path to a folder in the SharePoint Foundation setup directory ( \\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE) that contains a file to be included in the list definition.
SyncType
Optional Boolean. TRUE to override the default client list type associated with a SharePoint Foundation base template.
Type
Optional Integer. Provides a unique identifier for the list definition. This identifier must be unique within the feature, but need not be unique across all feature definitions or site definitions.

SharePoint Foundation includes the following list types by default.
100 Generic list
101 Document library
102 Survey
103 Links list
104 Announcements list
105 Contacts list
106 Events list
107 Tasks list
108 Discussion board
109 Picture library
110 Data sources
111 Site template gallery
112 User Information list
113 Web Part Gallery
114 List template gallery
115 XML Form library
116 Master pages gallery
117 No-Code Workflows
118 Custom Workflow Process
119 Wiki Page library
120 Custom grid for a list
130 Data Connection library
140 Workflow History
150 Gantt Tasks list
200 Meeting Series list
201 Meeting Agenda list
202 Meeting Attendees list
204 Meeting Decisions list
207 Meeting Objectives list
210 Meeting text box
211 Meeting Things To Bring list
212 Meeting Workspace Pages list
301 Blog Posts list
302 Blog Comments list
303 Blog Categories list
1100 Issue tracking
1200 Administrator tasks list

For custom list templates this attribute should be set to a number above 10000 to ensure that it does not conflict with any present or future Microsoft supplied list types.

This attribute corresponds to the Type attribute of the List element.
Unique
Optional Boolean. TRUE to specify that the list definition or list template can only be used to create a list during site creation and cannot be used to create a list through the object model or user interface after the site template or definition is applied. Setting this attribute to TRUE has the effect of making the list hidden so that it does not appear as an option on the Create Page or on the Documents and Lists page.
UseRootFolderForNavigation
Optional Boolean. TRUE to specify that a link to the list that is displayed in Quick Launch points to the root folder so that users go to a custom welcome page, instead of to the default list view page.

NOTE: If a custom welcome URL is not set for the list, rendering a link to the root folder is functionally equivalent to linking to the default list view.
VersioningEnabled
Optional Boolean. TRUE to specify that versioning is enabled by default in lists created through the list definition; otherwise, FALSE.

Child elements

None

Parent elements

Occurrences

  • Minimum: 0
  • Maximum: Unbounded

Remarks

In SharePoint Foundation, the list template for a standard SharePoint list is usually defined within the element manifest file of the Feature that contains the list definition. For more information about list template Features, see List template files.