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)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

Syntax

'Declaration
<ClientCallableAttribute> _
Public ReadOnly Property DisplayCategory As String
    Get
'Usage
Dim instance As SPWebTemplate
Dim value As String

value = instance.DisplayCategory
[ClientCallableAttribute]
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 Understanding WebTemp*.xml Files 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

Understanding WebTemp*.xml Files

Collaborative Application Markup Language (CAML)

How to: Create a Custom Site Definition and Configuration

Web Templates

Site Definitions and Configurations

Configuration Element (Site)