SPWebTemplate.DisplayCategory 属性

获取该名称,将显示在用户界面中,网站定义配置Web 模板SPWebTemplate所属的类别。

命名空间:  Microsoft.SharePoint
程序集:  Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)

语法

声明
Public ReadOnly Property DisplayCategory As String
    Get
用法
Dim instance As SPWebTemplate
Dim value As String

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

属性值

类型:System.String
标识网站定义配置的类别String

备注

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.)

对于在附带SharePoint FoundationMPS 网站定义中的配置, WebTemp.xml作为"会议"定义此属性。对于 STS、 博客、 SGS 和旧式 WIKI 网站定义中的配置, WebTemp.xml作为"协作"定义此属性。(CENTRALADMIN 和 TENANTADMIN 网站定义已被隐藏,因此DisplayCategory空引用(无 在 Visual Basic 中)。)

如果您创建您自己的自定义的网站定义,您可以使用任何所需的DisplayCategory (通过自定义WebTemp*.xml文件中设置< 配置 > 元素的DisplayCategory属性) 的字符串,并且没有为每种配置您定义中使用相同的字符串。

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.

另请参阅

引用

SPWebTemplate 类

SPWebTemplate 成员

Microsoft.SharePoint 命名空间

其他资源

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)