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