Share via


PublishingWeb.AllowAllWebTemplates Method

Resets the available Web templates on this PublishingWeb object to the complete set of Web templates.

Namespace:  Microsoft.SharePoint.Publishing
Assembly:  Microsoft.SharePoint.Publishing (in Microsoft.SharePoint.Publishing.dll)

Syntax

'Declaration
Public Sub AllowAllWebTemplates ( _
    resetAllSubsitesToInherit As Boolean _
)
'Usage
Dim instance As PublishingWeb
Dim resetAllSubsitesToInherit As Boolean

instance.AllowAllWebTemplates(resetAllSubsitesToInherit)
public void AllowAllWebTemplates(
    bool resetAllSubsitesToInherit
)

Parameters

  • resetAllSubsitesToInherit
    Type: System.Boolean

    This Boolean parameter indicates whether the available Web templates should be pushed down to all subsites.

Exceptions

Exception Condition
[Microsoft.SharePoint.SPException]

The available Web template property pushdown failed for some Web sites.

[System.UnauthorizedAccessException]

The current user does not have sufficient permissions to perform this action.

Remarks

After calling this method, the GetAvailableWebTemplates method returns the complete set of Web templates for a given language. The IsInheritingAvailableWebTemplates property is set to false. The IsAllowingAllWebTemplates property is set to True.

After calling this method, you should call the Update method to save changes.

Note

This operation is synchronous.

See Also

Reference

PublishingWeb Class

PublishingWeb Members

Microsoft.SharePoint.Publishing Namespace

GetAvailableCrossLanguageWebTemplates

SetAvailableWebTemplates

SetAvailableCrossLanguageWebTemplates