Share via


PublishingCatalogUtility.PublishCatalog method (SPWeb, SPList, Boolean, IEnumerable<SPField>, IEnumerable<TaxonomyField>, TaxonomyField)

Shares (publishes) a list or library as a publishing catalog for subscription at another site.

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

Syntax

'Declaration
Public Shared Sub PublishCatalog ( _
    parentWeb As SPWeb, _
    list As SPList, _
    allowAnonymousAccess As Boolean, _
    catalogItemKeyFields As IEnumerable(Of SPField), _
    allListCategoryFields As IEnumerable(Of TaxonomyField), _
    selectedCategoryField As TaxonomyField _
)
'Usage
Dim parentWeb As SPWeb
Dim list As SPList
Dim allowAnonymousAccess As Boolean
Dim catalogItemKeyFields As IEnumerable(Of SPField)
Dim allListCategoryFields As IEnumerable(Of TaxonomyField)
Dim selectedCategoryField As TaxonomyFieldPublishingCatalogUtility.PublishCatalog(parentWeb, list, _
    allowAnonymousAccess, catalogItemKeyFields, _
    allListCategoryFields, selectedCategoryField)
public static void PublishCatalog(
    SPWeb parentWeb,
    SPList list,
    bool allowAnonymousAccess,
    IEnumerable<SPField> catalogItemKeyFields,
    IEnumerable<TaxonomyField> allListCategoryFields,
    TaxonomyField selectedCategoryField
)

Parameters

  • allowAnonymousAccess
    Type: System.Boolean

    Whether the content of the catalog is anonymously accessible from the search service. Setting the property to true does not affect access to the list by using a content database that uses CAML queries.

  • catalogItemKeyFields
    Type: System.Collections.Generic.IEnumerable<SPField>

    List columns in this catalog that would identify an item uniquely. For example, item ID, item number, etc. These are fields that catalog subscribers can use to create unique, friendly URLs for items in this catalog.

  • allListCategoryFields
    Type: System.Collections.Generic.IEnumerable<TaxonomyField>

    Taxonomy fields that are available in this catalog. This list can be used by the catalog subscriber to determine the navigation hierarchy representing the catalog at a subscribing site.

  • selectedCategoryField
    Type: Microsoft.SharePoint.Taxonomy.TaxonomyField

    The default taxonomy field that determines the navigation hierarchy that represents this catalog at a subscribing site. The categories in this field can be added to the navigation hierarchy of a subscribing site to create friendly URLs for items in this catalog.

See also

Reference

PublishingCatalogUtility class

PublishingCatalogUtility members

PublishCatalog overload

Microsoft.SharePoint.Publishing namespace

Microsoft.SharePoint.Taxonomy.Term

CatalogConnectionManager.AddCatalogConnection