Compartilhar via


PublishingWeb.InheritAvailablePageLayouts Method

Sets the PageLayouts available on this PublishingWeb object to be inherited from the parent PublishingWeb object.

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

Syntax

'Declaration
Public Sub InheritAvailablePageLayouts
'Usage
Dim instance As PublishingWeb

instance.InheritAvailablePageLayouts()
public void InheritAvailablePageLayouts()

Exceptions

Exception Condition
[System.InvalidOperationException]

The root site cannot inherit properties.

Remarks

After calling this method, the GetAvailablePageLayouts() method returns the same set of PageLayout objects that are specified in the parent PublishingWeb class. The IsInheritingAvailablePageLayouts property is true. The IsAllowingAllPageLayouts property returns the same value as the parent PublishingWeb.

Calling this method on the root site is not supported and results in an error.

See Also

Reference

PublishingWeb Class

PublishingWeb Members

Microsoft.SharePoint.Publishing Namespace

IsAllowingAllPageLayouts

GetAvailablePageLayouts

GetAvailablePageLayouts

AllowAllPageLayouts

SetAvailablePageLayouts

Update