GetListTemplates Method

The GetListTemplates method of the Webs service returns the collection of list template definitions for the current site.

Return Value

A fragment in Collaborative Application Markup Language (CAML) in the following form which can be assigned to a System.Xml.XmlNode object:

<ListTemplates xmlns="http://schemas.microsoft.com/sharepoint/soap/">
   <ListTemplate Name="custlist" DisplayName="Custom List" Type="100" BaseType="0" OnQuickLaunch="TRUE"
      SecurityBits="11" Description="Create a custom list when you want to specify your own columns.
      The list opens as a Web page and lets you add or edit items one at a time." Image="/_layouts/images/itgen.gif" />
   <ListTemplate Name="gridlist" DisplayName="Custom List in Datasheet View" Type="120" BaseType="0"
      OnQuickLaunch="TRUE" SecurityBits="11" Description="Create a custom list when you want to specify
      your own columns. The list opens in a spreadsheet-like environment for convenient data entry, editing,
      and formatting. It requires a Windows SharePoint Services-compatible list datasheet control and ActiveX
      control support." Image="/_layouts/images/itdatash.gif" />
   <ListTemplate Name="doclib" DisplayName="Document Library" Type="101" BaseType="1"
      OnQuickLaunch="TRUE" SecurityBits="11" Description="Create a document library when you have
      a collection of documents or other files that you want to share. Document libraries support features such
      as sub-folders, file versioning, and check-in/check-out." Image="/_layouts/images/itdl.gif"
      DocumentTemplate="101" />
      .
      .
      .
</ListTemplates>

Example

The following code example displays the titles of list definitions whose base type is 0 (in other words, the generic list type).

This example requires that a using (C#) or Imports (Visual Basic .NET) directive be included for the System.Xml namespace.

Requirements

Platforms: Microsoft Windows Server 2003

Web Reference: http://Server_Name/[sites/][Site_Name/]_vti_bin/Webs.asmx