Share via


PublishingWeb.GetAvailableWebTemplates Method

Returns the Web templates available for creating subsites below this PublishingWeb.

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

Syntax

'Declaration
Public Function GetAvailableWebTemplates ( _
    lcid As UInteger _
) As SPWebTemplateCollection
'Usage
Dim instance As PublishingWeb
Dim lcid As UInteger
Dim returnValue As SPWebTemplateCollection

returnValue = instance.GetAvailableWebTemplates(lcid)
public SPWebTemplateCollection GetAvailableWebTemplates(
    uint lcid
)

Parameters

  • lcid
    Type: System.UInt32
    Locale ID of the Web templates to be retrieved.

Return Value

Type: Microsoft.SharePoint.SPWebTemplateCollection
An SPWebTemplateCollection collection of SPWebTemplate objects available for creating subsites below this PublishingWeb for a given locale. This includes any Web templates specified as cross-language by the SetAvailableCrossLanguageTemplates(Collection<SPWebTemplate>, UInt32, Boolean) method if they are available for the specified lcid.

Remarks

The available Web templates returned by this method may be inherited from a parent PublishingWeb, as indicated by the property IsInheritingAvailableWebTemplates.

Use the methods SetAvailableWebTemplates(), SetAvailableCrossLanguageWebTemplates(), AllowAllWebTemplates(), and InheritAvailableWebTemplates to modify the set of Web templates returned by this method.

After calling this method, you should call the Update method to save changes.

See Also

Reference

PublishingWeb Class

PublishingWeb Members

Microsoft.SharePoint.Publishing Namespace

IsAllowingAllWebTemplates

GetAvailableWebTemplates

AllowAllWebTemplates

SetAvailableWebTemplates

SetAvailableCrossLanguageWebTemplates