共用方式為


SPWebTemplate.FilterCategories Property

Gets the legacy category of the site that served as the source for the template when SPWebTemplate represents a custom Web template.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

Syntax

'Declaration
Public ReadOnly Property FilterCategories As String
    Get
'Usage
Dim instance As SPWebTemplate
Dim value As String

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

Property Value

Type: System.String
a null reference (Nothing in Visual Basic), if the SPWebTemplate represents a site definition configuration instead of a Web template.
"Meetings", if the SPWebTemplate represents a Web template and the source site from which it was created uses any of the configurations in the MPS site definition.
"Collaboration", if the SPWebTemplate represents a Web template and the source site from which it was created uses a configuration from any other site definition, such as STS or BLOG.

Remarks

This property is never read by any code that ships with SharePoint Foundation.

Enhanced portal or content management solutions built on SharePoint Foundation, such as Microsoft SharePoint Server, may use this property for a purpose other than what is described here and it may have a different pattern of values in those solutions from what is described here.

In general this property can be used to categorize site definition configurations in ways that do not map precisely onto the categorizations that appear in the UI when users are creating a new Web site. (Contrast this property with DisplayCategory.) Since the property is not settable, you must set the value of the FilterCategories attribute of the Configuration element in the WebTemp*.xml file that defines the site definition. (See Understanding WebTemp*.xml Files for more information.)

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