Partilhar via


List Template Files

Applies to: SharePoint Foundation 2010

A ListTemplate element points to a list definition contained in the Schema.xml file of a particular list type. You can use a list template to create a list.

Note

If you install a list template Feature, install a list instance Feature that is based on the list template Feature, and then activate only the list instance Feature, Microsoft SharePoint Foundation creates a new list in the specified Web site even though the list template Feature has not been activated.

For a specified feature, SharePoint Foundation checks the Features directory for a List_Template\Schema.xml file, but you can specify a Path parameter for another directory.

Elements

  ListTemplate

Example

The following example shows the contents of an XML file in a list definition that defines a list template, which means that the list type is displayed on the Create Page.

<?xml version="1.0" encoding="utf-8" ?>
<Elements xmlns="https://schemas.microsoft.com/sharepoint/">
   <ListTemplate Name="announce" Type="104" BaseType="0" 
      OnQuickLaunch="TRUE" SecurityBits="11" DisplayName="Announcements" 
      Description="Create an announcements list when you want a place to share news, status, and other short bits of information." 
      Image="/_layouts/images/itann.gif">
   </ListTemplate>
</Elements>