PublishingWeb.SetAvailableCrossLanguageWebTemplates Method
Specifies the cross-language Web templates that are available for creating subsites below this PublishingWeb object.
Namespace: Microsoft.SharePoint.Publishing
Assembly: Microsoft.SharePoint.Publishing (in Microsoft.SharePoint.Publishing.dll)
Syntax
'Declaration
Public Sub SetAvailableCrossLanguageWebTemplates ( _
webTemplates As Collection(Of SPWebTemplate), _
resetAllSubsitesToInherit As Boolean _
)
'Usage
Dim instance As PublishingWeb
Dim webTemplates As Collection(Of SPWebTemplate)
Dim resetAllSubsitesToInherit As Boolean
instance.SetAvailableCrossLanguageWebTemplates(webTemplates, _
resetAllSubsitesToInherit)
public void SetAvailableCrossLanguageWebTemplates(
Collection<SPWebTemplate> webTemplates,
bool resetAllSubsitesToInherit
)
Parameters
webTemplates
Type: System.Collections.ObjectModel.Collection<SPWebTemplate>A collection of SPWebTemplate objects.
resetAllSubsitesToInherit
Type: System.BooleanThis Boolean parameter indicates whether the available Web templates should be pushed down to all subsites.
Exceptions
Exception | Condition |
---|---|
[System.UnauthorizedAccessException] | The current user does not have sufficient permissions to perform this action. |
Remarks
After calling this method, the GetAvailableCrossLanguageWebTemplates method returns this set of Web templates. The IsInheritingAvailableWebTemplates and IsAllowingAllWebTemplates properties are false. The GetAvailableWebTemplates(UInt32, LCID) method includes this set of Web templates if they are available for the specified LCID.
To save changes after calling this method, call the Update method.
See Also
Reference
Microsoft.SharePoint.Publishing Namespace
IsInheritingAvailableWebTemplates
SetAvailableCrossLanguageWebTemplates