SPWebTemplate.DisplayCategory property

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

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

Syntax

'Declaration
Public ReadOnly Property DisplayCategory As String
    Get
'Usage
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

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 SharePoint Foundation, WebTemp.xml defines this property as "Meetings". For the configurations in the STS, BLOG, SGS, and legacy WIKI site definitions, WebTemp.xml defines this property as "Collaboration". (The CENTRALADMIN and TENANTADMIN site definitions are 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 a custom WebTemp*.xml file) and you do not have to use the same string for each configuration within your definition.

If the SPWebTemplate represents a Web template, this property corresponds to the DisplayCategory attribute in a WebTemplate element in a elements.xml file contained in the .wsp file that stores the Web template. The value will default to "Custom" when the Web template is created in the UI. You will need to edit the .wsp file to change it. For more information, see How to: Create a Custom Web Template.

See also

Reference

SPWebTemplate class

SPWebTemplate members

Microsoft.SharePoint namespace

Other resources

WebTemp.xml

Collaborative Application Markup Language (CAML)

How to: Create a Web Site Definition from an Existing Web Site Definition

Custom Site Templates

Site Definitions and Configurations

Configuration Element (Site)