Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

PublishingSite class

Provides publishing behavior for an SPSite object that supports publishing.

System.Object
  Microsoft.SharePoint.Publishing.PublishingSite

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

[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
public sealed class PublishingSite

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.

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

Reference

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