SPWebTemplate.ToString method

Returns a culture-invariant string that describes the site definition configuration or Web template.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Public Overrides Function ToString As String
'Usage
Dim instance As SPWebTemplate
Dim returnValue As String

returnValue = instance.ToString()
public override string ToString()

Return value

Type: System.String
A culture-invariant String describing the template or configuration.

Remarks

The syntax of the string returned is as follows.

Title - %LCID%nnnn - %GTID%_GLOBAL_#i - %TMPLID%Name

   Description

  • Title is the value of the Title property.

  • nnnn is the value of the Lcid property.

  • i is the value of the ID attribute of the Template element in a WebTemp*.xml if the SPWebTemplate represents a site definition configuration. If it represents a Web template, then I is the value of the BaseTemplateID element in a WebTemplate element in a elements.xml file contained in the .wsp file that stores the Web template.

  • Name is the value of the Name property.

  • Description is the value of the Description property.

Note

There is a carriage return and indentation just before Description.

The following are examples.

Team Site - %LCID%1033 - %GTID%_GLOBAL_#1 - %TMPLID%STS#0

A site for teams to quickly organize, author, and share information. It provides a document library, and lists for managing announcements, calendar items, tasks, and discussions.

Personal Site - %LCID%1033 - %GTID%_GLOBAL_#1 - %TMPLID%PersonalSite.stp

A template for personal sites.

Hobby Site - %LCID%1033 - %GTID%_GLOBAL_#10001 - %TMPLID%HobbySiteType#0

A template for creating sites discussing a hobby.

See also

Reference

SPWebTemplate class

SPWebTemplate members

Microsoft.SharePoint namespace

Other resources

WebTemp.xml

Collaborative Application Markup Language (CAML)

Custom Site Templates

Site Definitions and Configurations