Partilhar via


PublishingSite.GetPageLayouts Method (Boolean)

Gets a collection of PageLayout objects from the master page gallery of the RootWeb() property.

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

Syntax

'Declaration
Public Function GetPageLayouts ( _
    excludeObsolete As Boolean _
) As PageLayoutCollection
'Usage
Dim instance As PublishingSite
Dim excludeObsolete As Boolean
Dim returnValue As PageLayoutCollection

returnValue = instance.GetPageLayouts(excludeObsolete)
public PageLayoutCollection GetPageLayouts(
    bool excludeObsolete
)

Parameters

  • excludeObsolete
    Type: System.Boolean

    Boolean flag that indicates whether to exclude PageLayout objects that are marked as hidden.

Return Value

Type: Microsoft.SharePoint.Publishing.PageLayoutCollection
A collection of PageLayout objects from the master page gallery of the RootWeb property.

Remarks

If the excludeObsolete parameter is set to true, PageLayout objects that are obsolete and have been marked as hidden are not returned in the collection.

If the excludeObsolete parameter is set to false, then obsolete PageLayout objects are included in the collection.

See Also

Reference

PublishingSite Class

PublishingSite Members

GetPageLayouts Overload

Microsoft.SharePoint.Publishing Namespace

PublishingSite

GetPageLayouts

PageLayouts

GetAvailablePageLayouts

GetAvailablePageLayouts