Поделиться через


Свойство Web.WebTemplate

Gets the name of the site definition or site template that was used to create the site.

Пространство имен:  Microsoft.SharePoint.Client
Сборки:   Microsoft.SharePoint.Client.Silverlight (в Microsoft.SharePoint.Client.Silverlight.dll);  Microsoft.SharePoint.Client.Phone (в Microsoft.SharePoint.Client.Phone.dll)  Microsoft.SharePoint.Client (в Microsoft.SharePoint.Client.dll)

Синтаксис

'Декларация
Public ReadOnly Property WebTemplate As String
    Get
'Применение
Dim instance As Web
Dim value As String

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

Значение свойства

Тип: System.String
A string that contains the name of the site definition. This value corresponds to the Name attribute of the Template element in Collaborative Application Markup Language (CAML).

Замечания

The possible values for this property are also available as constants in the WebTemplate class. For example, the name of the site definition for a wiki site is "WIKI", which is also the value of the constant SPWebTemplate.WebTemplateWIKI.

When you create a custom site template by saving a site as a template and then create a new site from that template, the WebTemplate property contains the name of the site definition from which the custom template derives, not the name of the custom template. Thus if the site that was used to create a custom template was itself created from the standard team site definition, the WebTemplate property of all sites that are created from the new template will return "STS" (or the value of the constant SPWebTemplate.WebTemplateSTS).

См. также

Справочные материалы

Web класс

Элементы Web

Пространство имен Microsoft.SharePoint.Client