SPWebTemplate.DisplayCategory Property

Gets the name, as it appears in the user interface, of the category of site definition configurations and site templates to which the SPWebTemplate belongs.

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

Syntax

Public ReadOnly Property DisplayCategory As String
    Get

Dim instance As SPWebTemplate
Dim value As String

value = instance.DisplayCategory
public string DisplayCategory { get; }

Property Value

Type: System.String
A String that identifies the category of the site definition configuration.

Remarks

In Windows SharePoint Services 3.0, DisplayCategory is used as a tab label in the Template Selection section of the New SharePoint Site page.

If the SPWebTemplate represents a site definition configuration, this property is the value of the DisplayCategory attribute of a <Configuration> element in a WebTemp*.xml. (See WebTemp.xml for more information.)

For the configurations in the MPS site definition that ships with Windows SharePoint Services 3.0, WebTemp.xml defines this property as "Meetings". For the configurations in the STS, BLOG, and WIKI site definitions, WebTemp.xml defines this property as "Collaboration". (The CENTRALADMIN site definition is hidden anyway, so DisplayCategory is a null reference (Nothing in Visual Basic).)

If you create your own customized site definition, you can use any string you want for DisplayCategory (by setting the DisplayCategory attribute of the <Configuration> element in WebTemp.xml) and you do not have to use the same string for each configuration within your definition. Microsoft recommends that you not use "Custom" since a tab with this name will contain all the site templates. It can be valuable for troubleshooting purposes to have all and only site templates on one tab.

If the SPWebTemplate represents a site template, this property is always a null reference (Nothing in Visual Basic). In Windows SharePoint Services 3.0, site templates always appear on a tab named "Custom".

See Also

Reference

SPWebTemplate Class

SPWebTemplate Members

Microsoft.SharePoint Namespace

Other Resources

WebTemp.xml

Collaborative Application Markup Language (CAML)

How to: Create a Custom Site Definition and Configuration

How to: Use Site Definition Configurations

Custom Site Templates

Site Definitions and Configurations

Configuration Element (Site)