PublishingWeb.GetAvailablePageLayouts method (SPContentTypeId)

Returns the PageLayout objects available for creating PublishingPage objects within this PublishingWeb object, filtered by an associated SPContentTypeId object.

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

Syntax

'Declaration
Public Function GetAvailablePageLayouts ( _
    associatedContentTypeId As SPContentTypeId _
) As PageLayout()
'Usage
Dim instance As PublishingWeb
Dim associatedContentTypeId As SPContentTypeId
Dim returnValue As PageLayout()

returnValue = instance.GetAvailablePageLayouts(associatedContentTypeId)
public PageLayout[] GetAvailablePageLayouts(
    SPContentTypeId associatedContentTypeId
)

Parameters

Return value

Type: []
An array of PageLayout objects available for creating PublishingPage objects within this PublishingWeb, filtered by an associated content type.

Remarks

This method returns a subset of the layouts returned from GetAvailablePageLayouts(SPContentTypeId), filtered by the AssociatedContentType property ID.

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

See also

Reference

PublishingWeb class

PublishingWeb members

GetAvailablePageLayouts overload

Microsoft.SharePoint.Publishing namespace

IsAllowingAllPageLayouts

SetAvailablePageLayouts

IsInheritingAvailablePageLayouts

AllowAllPageLayouts

InheritAvailablePageLayouts