Partager via


List Element

The List element is the top-level element that contains the entire definition of a list.

Syntax

<List
  BaseType = "Integer" | "Text"
  Default = "TRUE" | "FALSE"
  Direction = "Text"
  Description = "Text"
  DisableAttachments = "TRUE" | "FALSE"
  EventSinkAssembly = "Text"
  EventSinkClass = "Text"
  EventSinkData = "Text"
  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>

Attributes

Name Description
BaseType 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.
Default 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.
Description 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.
Direction 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.
DisableAttachments Optional Boolean. TRUE to disable attachments in the list.
EventSinkAssembly Optional Text. Specifies the strong name of a file in the Global Assembly Cache (GAC) that provides an event handler for document library events. For example, Microsoft.SharePoint, Version=11.0.0.0, Culture=Neutral, PublicKeyToken=71e9bce111e9429c. For more information, see Handling Document Library Events.
EventSinkClass 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. For more information, see Handling Document Library Events.
EventSinkData Optional Text. Contains an arbitrary string for use by an event handler for document library events. For more information, see Handling Document Library Events.
Name Required Text. The internal name of a list.
OrderedList 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.
PrivateList Optional Boolean. TRUE to specify that the list is private.
QuickLaunchUrl Optional Text. Specifies the URL of the view page to open for the list through Quick Launch navigation.
RootWebOnly Optional Boolean. TRUE to specify that the list created from the definition exists only in the root Web site of a site collection.
ThumbnailSize Optional Integer. Specifies the width of thumbnails to display in picture libraries.
Title Required Text. The generic display name of the list.
Type Optional Integer. Specifies the list template type of the list. The following table lists values for the default list template types.
ValueDescription
100Generic list
101Document library
102Survey
103Links list
104Announcements list
105Contacts list
106Events list
107Tasks list
108Discussion board
109Picture library
110Data sources
111Site template gallery
113Web Part gallery
114List template gallery
115XML Form library
120Custom grid for a list
200Meeting Series list
201Meeting Agenda list
202Meeting Attendees list
204Meeting Decisions list
207Meeting Objectives list
210Meeting text box
211Meeting Things To Bring list
212Meeting Workspace Pages list
300Portal Sites list.
1100Issue tracking
2002Personal document library
2003Private document library
This attribute corresponds to the Type attribute of the ListTemplate element.
Value Description
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
113 Web Part gallery
114 List template gallery
115 XML Form library
120 Custom grid for a 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
300 Portal Sites list.
1100 Issue tracking
2002 Personal document library
2003 Private document library
Url Optional URL. Specifies the path to the folder in the Local_Drive:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\60\TEMPLATE\1033\STS\LISTS directory that contains the ASPX files to which the list definition applies, relative to the root URL of the Web site.
URLEncode Optional Boolean. TRUE to convert special characters, such as spaces, to quoted UTF-8 format, for example, %c3%ab for character ë.
VersioningEnabled 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.
WebImageHeight Optional Integer. Specifies the height in pixels of an image in a picture library.
WebImageWidth Optional Integer. Specifies the width in pixels of an image in a picture library.

Element Relationships

Parent Elements Child Elements
GlobalLists, ListFormButtons, ,ListFormOpening, Lists, Toolbar, ViewBidiHeader, ViewEmpty, ViewHeader Data, MetaData

Remarks

If List is the root element of the XML file, it must contain the Microsoft Windows SharePoint Services 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="Shared Documents" Direction="0" Url="Shared Documents" BaseType="1"
  VersioningEnabled="TRUE">