This topic has not yet been rated - Rate this topic

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

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 Note

This operation is synchronous.

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.