PublishingWeb.SetAvailableWebTemplates Method
Specifies the Web templates that are available for creating subsites below this PublishingWeb object for a specific locale
Namespace: Microsoft.SharePoint.Publishing
Assembly: Microsoft.SharePoint.Publishing (in Microsoft.SharePoint.Publishing.dll)
Syntax
'Declaration
Public Sub SetAvailableWebTemplates ( _
webTemplates As Collection(Of SPWebTemplate), _
lcid As UInteger, _
resetAllSubsitesToInherit As Boolean _
)
'Usage
Dim instance As PublishingWeb
Dim webTemplates As Collection(Of SPWebTemplate)
Dim lcid As UInteger
Dim resetAllSubsitesToInherit As Boolean
instance.SetAvailableWebTemplates(webTemplates, _
lcid, resetAllSubsitesToInherit)
public void SetAvailableWebTemplates(
Collection<SPWebTemplate> webTemplates,
uint lcid,
bool resetAllSubsitesToInherit
)
Parameters
- webTemplates
Type: System.Collections.ObjectModel.Collection<SPWebTemplate>
A List of SPWebTemplate objects that are available for use in creating subsites below this PublishingWeb class.
- lcid
Type: System.UInt32
The locale ID that is related to the specified Web templates.
- resetAllSubsitesToInherit
Type: System.Boolean
This Boolean parameter indicates whether the available Web templates should be pushed down to all subsites.
Remarks
Generally, Web templates are designed to be used in many languages, so you should use the SetAvailableCrossLanguageWebTemplates method.
After calling this method, the GetAvailableWebTemplates() method returns this set of Web templates. The **IsInheritingAvailableWebTemplates()**and IsAllowingAllWebTemplates() properties are False.
To save changes after calling this method, call the Update method.
Note
This operation is synchronous.