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
associatedContentTypeId
Type: Microsoft.SharePoint.SPContentTypeIdThe associated SPContentTypeId by which to filter the PageLayout objects.
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
GetAvailablePageLayouts Overload
Microsoft.SharePoint.Publishing Namespace