ListTemplate Element

The ListTemplate element specifies a list definition in the collection of list definitions of an ONET.XML file, which specifies the list definitions that are available on the Create Page.

Syntax

<ListTemplate
  BaseType = "0" | "1" | "2" |"3" | "4"
  Catalog = "TRUE" | "FALSE"
  Default = "TRUE" | "FALSE"
  Description = "Text"
  DisplayName = "Text"
  DocumentTemplate = "Integer"
  DontSaveInTemplate = "TRUE" | "FALSE"
  Hidden = "TRUE" | "FALSE"
  HiddenList = "TRUE" | "FALSE"
  Image = "URL"
  MustSaveRootFiles = "TRUE" | "FALSE"
  Name = "Text"
  OnQuickLaunch = "TRUE" | "FALSE"
  Path = "Text"
  RootWebOnly = "TRUE" | "FALSE"
  SecurityBits="Text"
  Type = "Integer"
  Unique = "TRUE" | "FALSE">
</ListTemplate>

Attributes

Name Description
BaseType Required Integer. Specifies the base type, or default schema, for lists created from the definition.
Catalog Optional Boolean. TRUE to specify that the list definition is for a site gallery, a list gallery, or a Web Part gallery.
Default Optional Boolean. TRUE to specify that new SharePoint sites will include this list.
Description Optional Text. Provides a description of the list definition.
DisplayName Required Text. Specifies the display name of the list definition.
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.
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.
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.
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.
OnQuickLaunch Optional Boolean. TRUE to display lists created from the list definition on the Quick Launch bar.
Path Optional Text. Specifies the name of the site definition that contains the list definition, for example, STS.
RootWebOnly Optional Boolean. TRUE to specify that the list created from the definition exists only in the root Web site of a site collection.
SecurityBits Optional Text. Defines read, write, and schema design security. Each digit in the string corresponds to the three security settings contained in the List of Lists database table. This attribute does not apply to document libraries.
Type Optional Integer. Provides a unique identifier for the template. 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 List 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
Unique Optional Boolean. TRUE to specifiy 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.

Element Relationships

Parent Elements
ListTemplates

Example

The following excerpt from an ONET.XML file specifies the list definitions that are available on the Create Page for a SharePoint site.

<ListTemplates>
   <ListTemplate Name="custlist" DisplayName="Custom List" Type="100" BaseType="0" OnQuickLaunch="TRUE"
      SecurityBits="11" Description="Create a custom list..." Image="/_layouts/images/itgen.gif">
   </ListTemplate>
   <ListTemplate Name="gridlist" DisplayName="Custom List in Datasheet View" Type="120" BaseType="0"
      OnQuickLaunch="TRUE" SecurityBits="11" Description="Create a custom list..." Image="/_layouts/images/itgen.gif">
   </ListTemplate>
   <ListTemplate Name="doclib" DisplayName="Document Library" Type="101" BaseType="1" OnQuickLaunch="TRUE"
      SecurityBits="11" Description="Create a document library..." Image="/_layouts/images/itdl.gif" DocumentTemplate="101">
   </ListTemplate>
   <ListTemplate Name="imglib" DisplayName="Picture Library" Type="109" BaseType="1" OnQuickLaunch="TRUE"
      SecurityBits="11" Description="Create a picture library..." Image="/_layouts/images/itil.gif" DocumentTemplate="100">
   </ListTemplate>
   <ListTemplate Name="voting" DisplayName="Survey" Type="102" BaseType="4" OnQuickLaunch="TRUE" SecurityBits="12"
      Description="Create a survey..." Image="/_layouts/images/itsurvey.gif">
   </ListTemplate>
   <ListTemplate Name="discuss" DisplayName="Discussion Board" Type="108" BaseType="3" OnQuickLaunch="TRUE"
      SecurityBits="12" Description="Create a discussion board..." Image="/_layouts/images/itdisc.gif">
   </ListTemplate>
   <ListTemplate Name="favorite" DisplayName="Links" Type="103" BaseType="0" OnQuickLaunch="TRUE" SecurityBits="11"
      Description="Create a links list..." Image="/_layouts/images/itlink.gif">
   </ListTemplate>
   <ListTemplate Name="announce" DisplayName="Announcements" Type="104" BaseType="0" OnQuickLaunch="TRUE"
      SecurityBits="11" Description="Create an announcements list..." Image="/_layouts/images/itann.gif">
   </ListTemplate>
   <ListTemplate Name="contacts" DisplayName="Contacts" Type="105" BaseType="0" OnQuickLaunch="TRUE" SecurityBits="11"
      Description="Create a contacts list..." Image="/_layouts/images/itcontct.gif">
   </ListTemplate>
   <ListTemplate Name="events" DisplayName="Events" Type="106" BaseType="0" OnQuickLaunch="TRUE" SecurityBits="11"
      Description="Create an events list..." Image="/_layouts/images/itevent.gif">
   </ListTemplate>
   <ListTemplate Name="tasks" DisplayName="Tasks" Type="107" BaseType="0" OnQuickLaunch="TRUE" SecurityBits="11"
      Description="Create a tasks list..." Image="/_layouts/images/ittask.gif">
   </ListTemplate>
   <ListTemplate Name="webtemp" DisplayName="Site Template Catalog" Type="111" BaseType="1" Hidden="TRUE"
      DontSaveInTemplate="TRUE" HiddenList="TRUE" Unique="TRUE" RootWebOnly="TRUE" Catalog="TRUE" OnQuickLaunch="FALSE"
      SecurityBits="11" Description="Store your custom site designs..." Image="/_layouts/images/itdl.gif" DocumentTemplate="100">
   </ListTemplate>
   <ListTemplate Name="wplib" DisplayName="Web Part Catalog" Type="113" BaseType="1" Hidden="TRUE" HiddenList="TRUE"
      Unique="TRUE" RootWebOnly="TRUE" Catalog="TRUE" OnQuickLaunch="FALSE" SecurityBits="11" Description="Place to store
      Web Parts" Image="/_layouts/images/itdl.gif" DocumentTemplate="100">
   </ListTemplate>
   <ListTemplate Name="datasrcs" DisplayName="DataSources" Type="110" BaseType="1" Hidden="TRUE" HiddenList="TRUE"
      OnQuickLaunch="FALSE" SecurityBits="11" Description="Data sources for this web." Image="/_layouts/images/itdl.gif"
      DocumentTemplate="100">
   </ListTemplate>
   <ListTemplate Name="listtemp" DisplayName="List Template Catalog" Type="114" BaseType="1" Hidden="TRUE"
      HiddenList="TRUE" Unique="TRUE" RootWebOnly="TRUE" Catalog="TRUE" OnQuickLaunch="FALSE" SecurityBits="11"
      Description="Make a template available..." Image="/_layouts/images/itdl.gif" DocumentTemplate="100">
   </ListTemplate>
   <ListTemplate Name="xmlform" DisplayName="Form Library" Type="115" BaseType="1" OnQuickLaunch="FALSE"
      SecurityBits="11" Description="Create a form library..." Image="/_layouts/images/itdl.gif" DocumentTemplate="1000">
   </ListTemplate>
   <ListTemplate Name="issue" DisplayName="Issues" Type="1100" BaseType="5" DontSaveInTemplate="TRUE"
      OnQuickLaunch="TRUE" SecurityBits="11" Description="Create an issues list..." Image="/_layouts/images/itdl.gif"
      DocumentTemplate="101">
   </ListTemplate>
</ListTemplates>