SetAvailableWebTemplates method

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


Type: System.Collections.ObjectModel.Collection<SPWebTemplate>

A list of SPWebTemplate objects that are available for use in creating subsites below this PublishingWeb class.

Type: System.UInt32

The locale ID that is related to the specified Web templates.

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.


This operation is synchronous.

© 2016 Microsoft