PublishingSite Class

Provides publishing behavior for an SPSite object that supports publishing.

Inheritance Hierarchy

System.Object
  Microsoft.SharePoint.Publishing.PublishingSite

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

Syntax

'Declaration
<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel := True)> _
Public NotInheritable Class PublishingSite
'Usage
Dim instance As PublishingSite
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
public sealed class PublishingSite

Remarks

The PublishingSite class provides publishing-specific behavior for an SPSite object that supports publishing, including access to commonly used publishing-related objects from the SPSite object's RootWeb property such as PageLayout objects in the master page gallery and SPContentType objects. You can instantiate objects of this class by using the public constructor [T:Microsoft.SharePoint.Publishing.PublishingSite(Microsoft.SharePoint.SPSite)].The PublishingSite class wraps an SPSite class. The PublishingResources feature must already be activated for the SPSite class, which you can verify by calling the IsPublishingSite method.

This class also directly exposes the underlying SPSite through the Site property so that you can easily access additional SPSite functionality through the object model.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

PublishingSite Members

Microsoft.SharePoint.Publishing Namespace

[T:Microsoft.SharePoint.Publishing.PublishingSite.#ctor(Microsoft.SharePoint.SPSite)]

GetPageLayouts

IsPublishingSite