PublishingWeb.AllowAllPageLayouts Method
Resets the available PageLayout objects on this PublishingWeb to the complete set of layouts.
Namespace: Microsoft.SharePoint.Publishing
Assembly: Microsoft.SharePoint.Publishing (in Microsoft.SharePoint.Publishing.dll)
Syntax
'Declaration
Public Sub AllowAllPageLayouts ( _
resetAllSubsitesToInherit As Boolean _
)
'Usage
Dim instance As PublishingWeb
Dim resetAllSubsitesToInherit As Boolean
instance.AllowAllPageLayouts(resetAllSubsitesToInherit)
public void AllowAllPageLayouts(
bool resetAllSubsitesToInherit
)
Parameters
resetAllSubsitesToInherit
Type: System.BooleanThis Boolean parameter indicates whether the available PageLayout objects are pushed down to all subsites.
Exceptions
Exception | Condition |
---|---|
[System.UnauthorizedAccessException] | The current user does not have sufficient permissions to perform this action. |
Remarks
After calling this method, the GetAvailablePageLayouts method returns the complete set of PageLayout objects. The IsInheritingAvailablePageLayouts property is set to false. The IsAllowingAllPageLayouts property is set to True.
After calling this method, you should call the Update method to save the changes.
Note
This operation is synchronous.
See Also
Reference
Microsoft.SharePoint.Publishing Namespace