PublishingWeb PublishingWeb PublishingWeb Class

Definition

Provides publishing behavior for an SPWeb instance that supports publishing.

public ref class PublishingWeb sealed
[Microsoft.SharePoint.Client.ClientCallableType(ClientLibraryTargets=Microsoft.SharePoint.Client.ClientLibraryTargets.NonRESTful, FactoryType=typeof(Microsoft.SharePoint.Publishing.Internal.PublishingClientObjectFactory), ObjectIdentityPropertyName="CanonicalId", ServerTypeId="55927360-235B-4ace-9DCF-C574D6E517EA")]
public sealed class PublishingWeb
Public NotInheritable Class PublishingWeb
Inheritance
PublishingWebPublishingWebPublishingWeb
Attributes
Microsoft.SharePoint.Client.ClientCallableTypeAttribute

Examples

<pre><code>using System;

using System.IO; using System.Web; using Microsoft.SharePoint; using Microsoft.SharePoint.Publishing;

namespace Microsoft.SDK.SharePoint.Samples.PublishingWebSample { class Program { static void Main(string[] args) { Console.WriteLine("--------------------------------------"); Console.WriteLine("Starting sample tests execution...");

        #region  PublishingWeb example

        //
        // ---------------------------------------------------------------------------------------
        // PublishingWeb example
        // ---------------------------------------------------------------------------------------
        // Passing the full url of a PublishingWeb.
        //
        // To compile add additional references to 
        // - System.Web.dll
        // - Microsoft.SharePoint.dll
        // - Microsoft.SharePoint.Publishing.dll
        //

        //
        // You need to pass one parameter which is the full url of a PublishingWeb.
        //
        if (args.Length &amp;lt; 1)
        {
            Console.WriteLine("--------------------------------------");
            Console.WriteLine("You need to pass the full url of a PublishingWeb.");
            FinishSampleTest();
            return;
        }

        string url = args[0];

        //
        // The url must be in the correct format.
        //
        Uri webUri = null;
        if (!Uri.TryCreate(url, UriKind.Absolute, out webUri))
        {
            Console.WriteLine("--------------------------------------");
            Console.WriteLine("The url is not in correct format.");
            FinishSampleTest();
            return;
        }

        SPSite site = null;
        try
        {
            site = new SPSite(url);
        }
        catch (FileNotFoundException)
        {
            Console.WriteLine("--------------------------------------");
            Console.WriteLine("The url is not a valid PublishingWeb.");
            FinishSampleTest();
            return;
        }

        using (SPWeb web = site.OpenWeb(HttpUtility.UrlDecode(webUri.AbsolutePath)))
        {
            PublishingWeb area = null;

            //
            // The url must be the full url of a PublishingWeb.
            //
            if (!web.Exists || !PublishingWeb.IsPublishingWeb(web))
            {
                Console.WriteLine("--------------------------------------");
                Console.WriteLine("The url is not a valid PublishingWeb.");
                FinishSampleTest();
                return;
            }

            area = PublishingWeb.GetPublishingWeb(web);
            Console.WriteLine("--------------------------------------");
            Console.WriteLine("Print out some properties of the current PublishingWeb:");
            PrintPublishingWebProperty(area);


            //
            // Create a PublishingPage examples: 
            //

            Console.WriteLine("--------------------------------------");
            Console.WriteLine("Adding the 1st PublishingPage...");

            //
            // Create a new PublishingPage using default PageLayout.
            // 
            PublishingPage page1 = area.AddPublishingPage();
            Console.WriteLine("Sucessfully added the 1st PublishingPage.");

            // 
            // Check in the 1st PublishingPage.
            //
            if (page1.ListItem.File.CheckOutType != SPFile.SPCheckOutType.None)
            {
                Console.WriteLine("Check-in the 1st PublishingPage...");
                page1.CheckIn("The PublishingPage page1 1st check in.");
                Console.WriteLine("Successfully checked-in the 1st PublishingPage.");
            }

            Console.WriteLine("--------------------------------------");
            Console.WriteLine("Try to add the 2nd PublishingPage using the default PageLayout of the PublishingWeb...");
            PageLayout defaultPageLayout = area.DefaultPageLayout;
            PublishingPage page2 = null;

            string page2Url = area.Web.Url + "/Pages/Page2.aspx";

            // 
            //  Get a PublishingPage by its url.
            // 
            Console.WriteLine("--------------------------------------");
            Console.WriteLine("First try to see whether the PublisingPage with the same Url already exists:");
            page2 = area.GetPublishingPage(page2Url);
            Console.WriteLine("The Url of the PublishingPage is :" + page2Url);

            if (page2 != null)
            {
                Console.WriteLine("The PublishingPage with Url {0} already exists.", page2Url);
            }
            else
            {
                Console.WriteLine("The PublishingPage with Url {0} does not exist.", page2Url);
                Console.WriteLine("Adding the 2nd PublishingPage...");
                page2 = area.AddPublishingPage("Page2.aspx", defaultPageLayout);
                Console.WriteLine("Sucessfully added the 2nd PublishingPage.");

                // 
                // Check in the 2nd PublishingPage.
                //
                if (page2.ListItem.File.CheckOutType != SPFile.SPCheckOutType.None)
                {
                    Console.WriteLine("Check-in the 2nd PublishingPage...");
                    page2.CheckIn("The PublishingPage page2 1st check in.");
                    Console.WriteLine("Successfully checked-in the 2nd PublishingPage.");
                }
            }

            //
            // Get a PublishingPage examples: 
            //

            // 
            // Get a PublishingPage by its ID.
            // 
            Console.WriteLine("--------------------------------------");
            Console.WriteLine("Try to retrieve the PublisingPage by its ID:");
            int page1ID = page1.ListItem.ID;
            Console.WriteLine("The ID of the PublishingPage is :" + page1ID);
            PublishingPage page3 = area.GetPublishingPage(page1ID);

            // 
            //  Check out the PublishingPage, and edit its properties, then check it in.
            //
            if (page3 != null)
            {
                Console.WriteLine("The PublishingPage with ID {0} is found.", page1ID);

                if (page3.ListItem.File.CheckOutType == SPFile.SPCheckOutType.None)
                {
                    Console.WriteLine("Check-out the PublishingPage...");
                    page3.CheckOut();
                    Console.WriteLine("Successfully checked-out the PublishingPage.");
                }

                Console.WriteLine("Updating the title of the PublishingPage to be 'Page3'...");
                page3.Title = "Page3";
                page3.Update();
                Console.WriteLine("Successfully updated the PublishingPage.");

                if (page3.ListItem.File.CheckOutType != SPFile.SPCheckOutType.None)
                {
                    Console.WriteLine("Check-in the PublishingPage...");
                    page3.CheckIn("Update the title to be Page3.");
                    Console.WriteLine("Successfully checked-in the PublishingPage.");
                }
            }

            //
            // Iterate the whole PublishingPage List.
            //
            Console.WriteLine("--------------------------------------");
            Console.WriteLine("Iterate through the Pages library:");
            area.IterateOverAllPages(
             delegate(PublishingPage page)
             {
                 PrintPageUrl(page);
             });
        }

        if (site != null)
        {
            site.Close();
        }

        #endregion

        Console.WriteLine("--------------------------------------");
        Console.WriteLine("Sample tests completed.");

        FinishSampleTest();
    }

    static void PrintPublishingWebProperty(PublishingWeb area)
    {
        PrintPublishingWebProperty(area, "ImagesLibrary", area.ImagesLibrary.Title);
        PrintPublishingWebProperty(area, "DocumentsLibrary", area.DocumentsLibrary.Title);
    }

    static void PrintPublishingWebProperty(PublishingWeb area, string propertyName, string propertyValue)
    {
        Console.WriteLine("The property {0} of PublishingWeb {1} is: {2}.", propertyName, area.Name, propertyValue);
    }

    static void PrintPageUrl(PublishingPage page)
    {
        Console.WriteLine("The Url of PublishingPage " + page.Name + " is " + page.Url + ".");
    }

    static void FinishSampleTest()
    {
        Console.WriteLine("--------------------------------------");
        Console.WriteLine("Press any key to continue...");
        Console.ReadKey();
    }
}

}

// Access the Pages list information without creating a PublishingWeb
// object.
using (SPSite site = new SPSite("http://myteam/team/"))
{
    using (SPWeb web = site.OpenWeb())
    {
        if (PublishingWeb.IsPublishingWeb(web))
        {
// Get the ID for the Pages list if we 
// know that Web is a PublishingWeb.
Guid pagesListId = PublishingWeb.GetPagesListId(web);

// Get the list by way of the ID.
SPList pagesList = web.Lists[pagesListId];

// Get the Pages list URL. Note:
// PublishingWeb.GetPagesListName(web)
// is equivalent to pagesList.RootFolder.Url.
string pagesListUrl = PublishingWeb.GetPagesListName(web);
        }
        else
        {
// If the SPWeb is not a PublishingWeb, 
// then GetPagesListName returns the URL
// that would be used by the Pages list 
// if the Publishing feature were to be
// activated.
string pagesListName = PublishingWeb.GetPagesListName(web);
        }
    }
}

// You can also create a PublishingWeb and access
// the properties from it.
using (SPSite site = new SPSite("http://myteam/"))
{
    using (SPWeb web = site.OpenWeb())
    {
        PublishingWeb publishingWeb = PublishingWeb.GetPublishingWeb(web);

        // Get the ID for the Pages list.
        Guid pagesListId = publishingWeb.PagesListId;

        SPList pagesList = publishingWeb.PagesList;

        // The PublishingWeb.PagesListName is equivalent 
        // to PublishingWeb.PagesList.RootFolder.Url.
        string pagesListUrl = publishingWeb.PagesListName;
    }
}
<pre><code>' Access the Pages list information without creating a PublishingWeb

' object. Using site As New SPSite("http://myteam/team/") Using web As SPWeb = site.OpenWeb() If PublishingWeb.IsPublishingWeb(web) Then ' Get the ID for the Pages list if we ' know that Web is a PublishingWeb. Dim pagesListId As Guid = PublishingWeb.GetPagesListId(web)

' Get the list by way of the ID. Dim pagesList As SPList = web.Lists(pagesListId)

' Get the Pages list URL. Note: ' PublishingWeb.GetPagesListName(web) ' is equivalent to pagesList.RootFolder.Url. Dim pagesListUrl As String = PublishingWeb.GetPagesListName(web) Else ' If the SPWeb is not a PublishingWeb, ' then GetPagesListName returns the URL ' that would be used by the Pages list ' if the Publishing feature were to be ' activated. Dim pagesListName As String = PublishingWeb.GetPagesListName(web) End If End Using End Using

' You can also create a PublishingWeb and access ' the properties from it. Using site As New SPSite("http://myteam/") Using web As SPWeb = site.OpenWeb() Dim publishingWeb As PublishingWeb = PublishingWeb.GetPublishingWeb(web)

    ' Get the ID for the Pages list.
    Dim pagesListId As Guid = publishingWeb.PagesListId

    Dim pagesList As SPList = publishingWeb.PagesList

    ' The PublishingWeb.PagesListName is equivalent 
    ' to PublishingWeb.PagesList.RootFolder.Url.
    Dim pagesListUrl As String = publishingWeb.PagesListName
End Using

End Using

Remarks

The PublishingWeb class provides publishing-specific behavior for an SPWeb that supports publishing, including access to child PublishingPage and PublishingWeb instances, variations support, navigation settings, PageLayout and Web template restrictions, and Welcome page settings. This class wraps an SPWeb instance that has the publishing feature activated.

Instantiate this class by using the static GetPublishingWeb(SPWeb) method or by retrieving it from a PublishingWebCollection collection.

The PublishingWeb class wraps the SPWeb class. It also directly exposes the underlying SPWeb through the Web property so that additional SPWeb functionality can be easily accessed.

The members exposed by this class are optimized for the current SPSite context. Trying to use methods in the PublishingWeb class to return objects from a different site collection can result in unexpected behaviors, and doing so is not supported.

Properties

AlternateCssUrl AlternateCssUrl AlternateCssUrl

Gets the URL that points to the alternate cascading style sheets (CSS) file for this PublishingWeb object.

AnonymousPageCacheProfileId AnonymousPageCacheProfileId AnonymousPageCacheProfileId

Gets or sets the identifier (ID) of the ASP.NET output cache profile for this PublishingWeb object.

Audience Audience Audience

Gets or sets a string representing the audience whom this PublishingWeb targets.

AuthenticatedPageCacheProfileId AuthenticatedPageCacheProfileId AuthenticatedPageCacheProfileId

Gets or sets the identifier (ID) of the authenticated page output cache profile for this PublishingWeb object.

CreatedBy CreatedBy CreatedBy

Gets the SPUser who created this PublishingWeb object.

CreatedDate CreatedDate CreatedDate

Gets the date and time that this PublishingWeb was created.

CustomMasterUrl CustomMasterUrl CustomMasterUrl

Gets the custom master URL for this PublishingWeb object.

DefaultDefaultPageName DefaultDefaultPageName DefaultDefaultPageName

Gets the default URL name for the Welcome page for this PublishingWeb object.

DefaultPage DefaultPage DefaultPage

Gets and sets the Welcome page for this PublishingWeb object.

DefaultPageLayout DefaultPageLayout DefaultPageLayout

Gets the URL token that is used when creating “one-click” pages within this Microsoft.SharePoint.PublishingWeb.

DefaultPagesListName DefaultPagesListName DefaultPagesListName

Gets the default URL name that is used for the pages list in the existing locale for this PublishingWeb object.

Description Description Description

Gets or sets the description string for this PublishingWeb object.

DocumentsLibrary DocumentsLibrary DocumentsLibrary

Gets the designated Documents list of the current PublishingWeb object.

ImagesLibrary ImagesLibrary ImagesLibrary

Gets the specified Images list of the current PublishingWeb object.

IncludeInCurrentNavigation IncludeInCurrentNavigation IncludeInCurrentNavigation

Controls whether this Web site is included by PortalSiteMapProvider objects that have NavigationType set to Current.

IncludeInGlobalNavigation IncludeInGlobalNavigation IncludeInGlobalNavigation

Gets or sets a value that indicates whether this Web site is included by PortalSiteMapProvider objects that have NavigationType set to Global.

IncludePagesInNavigation IncludePagesInNavigation IncludePagesInNavigation

Gets or sets a value that indicates whether to automatically include pages in navigation.

IncludeSubSitesInNavigation IncludeSubSitesInNavigation IncludeSubSitesInNavigation

Gets or sets a value that indicates whether to automatically include subsites, or any type of SPWeb object, in navigation.

InheritCurrentNavigation InheritCurrentNavigation InheritCurrentNavigation

Gets or sets a value that indicates whether the current navigation should be inherited.

InheritGlobalNavigation InheritGlobalNavigation InheritGlobalNavigation

Gets or sets a value that indicates whether this PublishingWeb object should display its own global navigation or should use the global navigation of its parent.

IsAllowingAllPageLayouts IsAllowingAllPageLayouts IsAllowingAllPageLayouts

Gets a Boolean value that indicates whether the available PageLayout objects that are returned by the GetAvailablePageLayouts() method are the complete set of page layouts.

IsAllowingAllWebTemplates IsAllowingAllWebTemplates IsAllowingAllWebTemplates

Gets a Boolean value that indicates whether the available Web templates that are returned by the Microsoft.SharePoint.Publishing.PublishingWeb.GetAvailableWebTemplates method are the complete set.

IsInheritingAvailablePageLayouts IsInheritingAvailablePageLayouts IsInheritingAvailablePageLayouts

Gets a Boolean value that indicates whether the available PageLayout objects that are returned by the GetAvailablePageLayouts() method are inherited from the parent PublishingWeb object.

IsInheritingAvailableWebTemplates IsInheritingAvailableWebTemplates IsInheritingAvailableWebTemplates

Gets a Boolean value that indicates whether the available Web templates that are returned by the Microsoft.SharePoint.Publishing.PublishingWeb.GetAvailableWebTemplates method are inherited from the parent PublishingWeb.

IsInheritingDefaultPageLayout IsInheritingDefaultPageLayout IsInheritingDefaultPageLayout

Specifies the page layout that will be used when creating “one-click” pages within this PublishingWeb object through the UI.

IsInheritingNewPageUrlToken IsInheritingNewPageUrlToken IsInheritingNewPageUrlToken

Gets a Boolean value indicating whether the new page URL token that is returned by the NewPageUrlToken property is inherited from the parent PublishingWeb object.

IsRoot IsRoot IsRoot

Gets a Boolean value that determines whether this PublishingWeb object is the root SPWeb object.

Label Label Label

Gets the VariationLabel object in whose hierarchy this PublishingWeb object is situated.

LastModifiedDate LastModifiedDate LastModifiedDate

Gets the date and time that an item in this PublishingWeb object was last modified.

MasterUrl MasterUrl MasterUrl

Gets the master URL for this PublishingWeb object.

Name Name Name

Gets or sets the URL name of this PublishingWeb object.

Navigation Navigation Navigation

Gets a PortalNavigation object that represents the navigation settings for the current publishing Web.

NavigationAutomaticSortingMethod NavigationAutomaticSortingMethod NavigationAutomaticSortingMethod

Gets or sets an enumeration value which indicates the sort method to use when automatically sorting navigation items owned by this PublishingWeb object.

NavigationOrderingMethod NavigationOrderingMethod NavigationOrderingMethod

Gets or sets an enumeration value that indicates the ordering of navigation items owned by this PublishingWeb object.

NavigationShowSiblings NavigationShowSiblings NavigationShowSiblings

Gets or sets a value that indicates whether this Web site should display siblings of the current Web site in current navigation.

NavigationSortAscending NavigationSortAscending NavigationSortAscending

Gets or sets a Boolean value that indicates whether navigation of this PublishingWeb object is sorted in ascending or descending order.

NewPageUrlToken NewPageUrlToken NewPageUrlToken

Gets the URL token that is usede when creating “one-click” pages within the current PublishingWeb object.

PagesList PagesList PagesList

Gets the pages list in which PublishingPage objects are stored for this PublishingWeb object.

PagesListId PagesListId PagesListId

Gets or sets the ID of the pages list in which the PublishingPage objects are stored for this PublishingWebobject.

PagesListName PagesListName PagesListName

Gets or sets the URL name of the pages list in which PublishingPage objects are stored for this PublishingWeb object.

ParentPublishingWeb ParentPublishingWeb ParentPublishingWeb

Gets the parent SPWeb object as a PublishingWeb instance.

ThemedCssFolderUrl ThemedCssFolderUrl ThemedCssFolderUrl

Gets the URL of the folder containing the themed CSS for the current PublishingWeb object, or a null reference (Nothing in Visual Basic) if no theme is applied.

Title Title Title

Gets or sets the title of the PublishingWeb object.

Uri Uri Uri

Gets the URI of this PublishingWeb object.

Url Url Url

Gets the URL for this PublishingWeb object.

VariationPublishingWebUrls VariationPublishingWebUrls VariationPublishingWebUrls

Gets a collection of URLs of the variant publishing Webs associated with this PublishingWeb object

Web Web Web

Gets the SPWeb object that is wrapped by this PublishingWeb instance.

Methods

AddPublishingPage() AddPublishingPage() AddPublishingPage()

Creates a new PublishingPage object in the PublishingWeb.

AddPublishingPage(String, PageLayout) AddPublishingPage(String, PageLayout) AddPublishingPage(String, PageLayout)

Creates a new PublishingPage object in the PublishingWeb.

AddPublishingPage(String, PageLayout, SPFolder) AddPublishingPage(String, PageLayout, SPFolder) AddPublishingPage(String, PageLayout, SPFolder)

Creates a new PublishingPage object in the PublishingWeb.

AddPublishingPage(String, SPFile, Guid, PageConversionPriority) AddPublishingPage(String, SPFile, Guid, PageConversionPriority) AddPublishingPage(String, SPFile, Guid, PageConversionPriority)

Creates a new PublishingPage object in the PublishingWeb.

AddPublishingPage(String, SPFile, Guid, PageConversionPriority, SPFolder) AddPublishingPage(String, SPFile, Guid, PageConversionPriority, SPFolder) AddPublishingPage(String, SPFile, Guid, PageConversionPriority, SPFolder)

Creates a new PublishingPage object in the PublishingWeb.

AddPublishingPage(String, SPFile, Guid, String, PageConversionPriority) AddPublishingPage(String, SPFile, Guid, String, PageConversionPriority) AddPublishingPage(String, SPFile, Guid, String, PageConversionPriority)

Creates a new PublishingPage object in the PublishingWeb.

AddPublishingPage(String, SPFile, Guid, String, PageConversionPriority, SPFolder) AddPublishingPage(String, SPFile, Guid, String, PageConversionPriority, SPFolder) AddPublishingPage(String, SPFile, Guid, String, PageConversionPriority, SPFolder)

Creates a new PublishingPage object in the PublishingWeb.

AllowAllPageLayouts(Boolean) AllowAllPageLayouts(Boolean) AllowAllPageLayouts(Boolean)

Resets the available PageLayout objects on this PublishingWeb to the complete set of layouts.

AllowAllWebTemplates(Boolean) AllowAllWebTemplates(Boolean) AllowAllWebTemplates(Boolean)

Resets the available Web templates on this PublishingWeb object to the complete set of Web templates.

Close() Close() Close()

Closes the wrapped SPWeb object if it was instantiated internally.

Delete(Boolean) Delete(Boolean) Delete(Boolean)

Deletes the current PublishingWeb instance and potentially all sites in the subtree with a node in this PublishingWeb.

Delete() Delete() Delete()

Deletes the current PublishingWeb object.

DisableScheduling(SPList) DisableScheduling(SPList) DisableScheduling(SPList)

Disables scheduling behavior on an SPList object.

EnableScheduling(SPList) EnableScheduling(SPList) EnableScheduling(SPList)

Enables scheduling behavior on an SPList object.

GetAvailableCrossLanguageWebTemplates() GetAvailableCrossLanguageWebTemplates() GetAvailableCrossLanguageWebTemplates()

Returns the cross-language Web templates available for creating subsites below this PublishingWeb.

GetAvailablePageLayouts() GetAvailablePageLayouts() GetAvailablePageLayouts()

Returns the PageLayout objects available for creating PublishingPage objects within this PublishingWeb.

GetAvailablePageLayouts(SPContentTypeId) GetAvailablePageLayouts(SPContentTypeId) GetAvailablePageLayouts(SPContentTypeId)

Returns the PageLayout objects available for creating PublishingPage objects within this PublishingWeb object, filtered by an associated SPContentTypeId object.

GetAvailableWebTemplates(UInt32) GetAvailableWebTemplates(UInt32) GetAvailableWebTemplates(UInt32)

Returns the Web templates available for creating subsites below this PublishingWeb.

GetIsSchedulingEnabled(SPList) GetIsSchedulingEnabled(SPList) GetIsSchedulingEnabled(SPList)

Returns the web templates that are available for creating subsites below this PublishingWeb object.

GetPagesListId(SPWeb) GetPagesListId(SPWeb) GetPagesListId(SPWeb)

Returns ID of the pages list in which PublishingPage objects are stored for this PublishingWeb object.

GetPagesListName(SPWeb) GetPagesListName(SPWeb) GetPagesListName(SPWeb)

The URL name of the pages list in which PublishingPage objects are stored for this PublishingWeb.

GetPublishingPage(Int32) GetPublishingPage(Int32) GetPublishingPage(Int32)

This member is reserved for internal use and is not intended to be used directly from your code.

GetPublishingPage(String) GetPublishingPage(String) GetPublishingPage(String)

This member is reserved for internal use and is not intended to be used directly from your code.

GetPublishingPages() GetPublishingPages() GetPublishingPages()

Gets a collection of PublishingPage objects contained in this PublishingWeb object.

GetPublishingPages(SPQuery) GetPublishingPages(SPQuery) GetPublishingPages(SPQuery)

Gets a collection of PublishingPage objects contained in this PublishingWeb object.

GetPublishingPages(String) GetPublishingPages(String) GetPublishingPages(String)

Gets a collection of PublishingPage objects contained in this PublishingWeb object.

GetPublishingPages(UInt32) GetPublishingPages(UInt32) GetPublishingPages(UInt32)

Gets a collection of PublishingPage objects contained in this PublishingWeb object.

GetPublishingPages(String, UInt32) GetPublishingPages(String, UInt32) GetPublishingPages(String, UInt32)

Gets a collection of PublishingPage objects that are contained in this PublishingWeb object.

GetPublishingWeb(SPWeb) GetPublishingWeb(SPWeb) GetPublishingWeb(SPWeb)

Retrieves an instance of the PublishingWeb that wraps the specified SPWeb object.

GetPublishingWebs() GetPublishingWebs() GetPublishingWebs()

Returns child PublishingWeb objects immediately below this PublishingWeb object.

GetVariation(VariationLabel) GetVariation(VariationLabel) GetVariation(VariationLabel)

Gets the peer Variation Publishing site of this PublishingWeb object for the given varlabel.

GetVariation(VariationLabel, Boolean) GetVariation(VariationLabel, Boolean) GetVariation(VariationLabel, Boolean)

Get the peer variation PublishingWeb object of this PublishingWeb object for the given label.

GetVariationUrlFromSourceUrl(String) GetVariationUrlFromSourceUrl(String) GetVariationUrlFromSourceUrl(String)

Returns the current Variation URL for the current PublishingWeb object for a specific source PublishingWeb location.

InheritAvailablePageLayouts() InheritAvailablePageLayouts() InheritAvailablePageLayouts()

Sets the PageLayouts available on this PublishingWeb object to be inherited from the parent PublishingWeb object.

InheritAvailableWebTemplates() InheritAvailableWebTemplates() InheritAvailableWebTemplates()

Sets the available web templates on this PublishingWeb to be inherited from the parent PublishingWeb.

InheritDefaultPageLayout() InheritDefaultPageLayout() InheritDefaultPageLayout()

Sets the new page URL token on this PublishingWeb object to be inherited from the parent PublishingWeb object.

InheritNewPageUrlToken() InheritNewPageUrlToken() InheritNewPageUrlToken()

This member is reserved for internal use and is not intended to be used directly from your code.

IsPublishingWeb(SPWeb) IsPublishingWeb(SPWeb) IsPublishingWeb(SPWeb)

Checks the SPWeb object to verify whether it is a PublishingWeb object.

IterateOverAllPages(PublishingWeb+ProcessPublishingPage) IterateOverAllPages(PublishingWeb+ProcessPublishingPage) IterateOverAllPages(PublishingWeb+ProcessPublishingPage)

Iterates over all PublishingPage objects in the current PublishingWeb object and processes each PublishingPage by using the given delegate.

SetAvailableCrossLanguageWebTemplates(Collection<SPWebTemplate>, Boolean) SetAvailableCrossLanguageWebTemplates(Collection<SPWebTemplate>, Boolean) SetAvailableCrossLanguageWebTemplates(Collection<SPWebTemplate>, Boolean)

Specifies the cross-language Web templates that are available for creating subsites below this PublishingWeb object.

SetAvailablePageLayouts(PageLayout[], Boolean) SetAvailablePageLayouts(PageLayout[], Boolean) SetAvailablePageLayouts(PageLayout[], Boolean)

Specifies PageLayout objects that are available for use in creating PublishingPage objects within this PublishingWeb object.

SetAvailableWebTemplates(Collection<SPWebTemplate>, UInt32, Boolean) SetAvailableWebTemplates(Collection<SPWebTemplate>, UInt32, Boolean) SetAvailableWebTemplates(Collection<SPWebTemplate>, UInt32, Boolean)

Specifies the Web templates that are available for creating subsites below this PublishingWeb object for a specific locale

SetDefaultPageLayout(PageLayout, Boolean) SetDefaultPageLayout(PageLayout, Boolean) SetDefaultPageLayout(PageLayout, Boolean)

Specifies the URL token that will be used when creating “one-click” pages within the current PublishingWeb object.

SetNewPageUrlToken(String, Boolean) SetNewPageUrlToken(String, Boolean) SetNewPageUrlToken(String, Boolean)

Sets the available web templates on this PublishingWeb object to be inherited from the parent PublishingWeb object.

Update() Update() Update()

Saves changes to this PublishingWeb object.

Extension Methods

ToJson(Object) ToJson(Object) ToJson(Object)

Applies to