PublishingWeb.GetAvailableWebTemplates method
SharePoint 2013
Returns the Web templates available for creating subsites below this PublishingWeb.
Assembly: Microsoft.SharePoint.Publishing (in Microsoft.SharePoint.Publishing.dll)
Parameters
- lcid
- Type: System.UInt32
Locale ID of the Web templates to be retrieved.
Return value
Type: Microsoft.SharePoint.SPWebTemplateCollectionAn 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.
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.