List element (List)
Applies to: SharePoint 2016 | SharePoint Foundation 2013 | SharePoint Online | SharePoint Server 2013
Top-level element that contains the definition of a list.
<List BaseType = "Integer" | "Text" Default = "TRUE" | "FALSE" DefaultItemOpen = "Integer" Description = "Text" Direction = "Text" DisableAttachments = "TRUE" | "FALSE" DraftVersionVisibility = "Integer" EnableContentTypes = "TRUE" | "FALSE" EnableMinorVersions = "TRUE" | "FALSE" EnableThumbnails = "TRUE" | "FALSE" EventSinkAssembly = "Text" EventSinkClass = "Text" EventSinkData = "Text" FolderCreation = "TRUE" | "FALSE" Id = "GUID" ModeratedList = "TRUE" | "FALSE" ModerationType = "TRUE" | "FALSE" Name = "Text" OrderedList = "TRUE" | "FALSE" PrivateList = "TRUE" | "FALSE" QuickLaunchUrl = "URL" RootWebOnly = "TRUE" | "FALSE" ThumbnailSize = "Integer" Title = "Text" Type = "Integer" Url = "URL" URLEncode = "TRUE" | "FALSE" VersioningEnabled = "TRUE" | "FALSE" WebImageHeight = "Integer" WebImageWidth = "Integer"> </List>
Elements and attributes
The following sections describe attributes, child elements, and parent elements.
||Optional Text. The BaseType attribute can be set to Integer, which stores values as integers, or to Text (default), which stores values as text. Note that it is not possible to create integer base-type choice fields.
||Optional Boolean. TRUE to specify that the list referenced in the Onet.xml file be created whenever a site is created. Otherwise, the list will not be created during site creation but will be available for later instantiation.
||Optional Boolean. 1 to specify that applications which generate server transformations of items in the list open the items in a browser rather than in a separate client-side application; otherwise, 0.
||Optional Text. Provides a description for the list. This attribute must be specified within a configuration in an Onet.xml file when adding a custom list definition to a site definition. The value of this attribute overrides the value contained with the DefaultDescription element of a Schema.xml file.
||Required Text. Specifies the direction of the reading order for the list. Possible values include RTL (right-to-left), LTR (left-to-right), or none.
||Optional Boolean. TRUE to disable attachments in the list.
||Optional Integer. Specifies the rights that are required to see drafts.
The following values are possible:
- 1 Edit rights
- 2 Approval rights
- All other values Read rights
||Optional Boolean. TRUE to enable management of content types in lists created through the list definition.
||Optional Boolean. TRUE to specify that document parsers in this list generate thumbnail files that correspond to documents that are saved to this list. This attribute only applies to document libraries.
||Optional Text. This option is specified only for schemas upgraded from Windows SharePoint Services 2.0. Specifies the strong name of a file in the Global Assembly Cache (GAC) that provides an event handler for document library events.
This attribute has been deprecated in SharePoint Foundation.
||Optional Text. Specifies the fully qualified, case-sensitive name of a class that defines an event handler for document library events in the form Namespace_Name.Class_Name. This attribute has been deprecated in SharePoint Foundation.
||Optional Text. Contains an arbitrary string for use by an event handler for document library events. This attribute has been deprecated in SharePoint Foundation.
||Optional Boolean. TRUE to display the New Folder command on the New menu.
||Optional GUID. Specifies the GUID of the list.
||Optional Boolean. TRUE to require content approval for submitted items.
||Optional Boolean. TRUE to specify that the list has moderation enabled, requiring an approval process when content is created or modified.
||Required Text. The internal name of a list.
||Optional Boolean. TRUE to specify that the option to allow users to reorder items in the list is available on the Edit View page for the list.
||Optional Boolean. TRUE to specify that the list is private.
||Optional Text. Specifies the URL of the view page to open for the list through Quick Launch navigation.
||Optional Boolean. TRUE to specify that the list created from the definition exists only in the root website of a site collection.
||Optional Integer. Specifies the width of thumbnails to display in picture libraries.
||Required Text. The generic display name of the list.
||Optional Integer. Specifies the list template type of the list.
The following values are the default list template types.
100 Generic list
101 Document library
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
This attribute corresponds to the Type attribute of the ListTemplate element.
||Optional Text. Specifies the path to the root of the directory that contains the ASPX files to which the list definition applies, relative to the root URL of the website.
||Optional Boolean. TRUE to convert special characters, such as spaces, to quoted UTF-8 format, for example, %c3%ab for character ë.
||Optional Boolean. TRUE to specify within a Schema.xml file that versioning be enabled by default for document libraries created through the list definition. Setting this attribute has no effect on existing document libraries. If TRUE, versioning can still be disabled for a document library on the New Document Library page when the library is being created.
||Optional Integer. Specifies the height, in pixels, of an image in a picture library.
||Optional Integer. Specifies the width, in pixels, of an image in a picture library.
- Minimum: 0
- Maximum: 1
When used as the root element in the schema file for a list, the List element must contain the Microsoft SharePoint Foundation ows: namespace declaration. The following lines show the opening of a Schema.xml file for document libraries:
<List xmlns:ows="Microsoft SharePoint" Name="Documents" Title="$Resources:shareddocuments_Title;" Direction="$Resources:Direction;" Url="Shared Documents" BaseType="1">
In a list schema, the MetaData element contains the different parts of the list definition. Use an empty List element (<List />) to return the title of the current list.