SPListTemplate Class

The SPListTemplate class represents a list definition or a list template, which defines the fields and views for a list. List definitions are contained in files in the Local_Drive:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\60 directory, but list templates are created through the user interface or through the object model when a list is saved as a template.

System.Object

   Microsoft.SharePoint.SPListTemplate

Public Properties

The following table shows the public properties of the SPListTemplate class, the data type of each property, and a brief description of each.

Name Data Type Description
BaseType Microsoft.SharePoint.SPBaseType Gets the base type for the list definition or list template.
Description String Gets the description of the list definition or list template that is displayed in the user interface.
Hidden Boolean Gets a Boolean value that specifies whether the list definition or list template is hidden from Web site users and does not appear as an option on the Documents and Lists page.
ImageUrl String Gets the relative path, based on the server, for the image used to represent the list definition or list template.
InternalName String Gets the internal name used for the list definition or list template.
IsCustomTemplate Boolean Gets a Boolean value that indicates whether the SPListTemplate object represents a list template.
Name String Gets the display name for the list definition or list template.
OnQuickLaunch Boolean Gets a Boolean value that specifies whether any list created with the list definition or list template is displayed on the Quick Launch bar.
SchemaXml String Gets the schema that describes the list definition.
Type Microsoft.SharePoint.SPListTemplateType Gets the type of the list definition or list template.
Unique Boolean Gets a Boolean value that indicates whether the list definition or list template is used to create only one list in the site collection.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread safe.

Remarks

Use the ListTemplates property of the SPWeb class to return an SPListTemplateCollection object that represents the collection of list definitions for a site. Use the GetCustomListTemplates method of the SPSite class to return an SPListTemplateCollection object that represents the collection of list templates for a site. Use an indexer to return a single list definition or list template from the collection. For example, if the collection is assigned to a variable named myListTemplates, use myListTemplates[index] in C#, or myListTemplates(index) in Visual Basic .NET, where index is the index number of the definition or template in the collection or the name of the definition or template.

Requirements

Namespace: Microsoft.SharePoint

Platforms: Microsoft Windows Server 2003

Assembly: Windows SharePoint Services (in Microsoft.SharePoint.dll)

Security: Code Access Security