Share via


CatalogConnectionManager.AddCatalogConnection method (CatalogConnectionSettings, String[], String, String)

Adds a catalog connection to the site that is specified in the constructor.

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

Syntax

'Declaration
Public Sub AddCatalogConnection ( _
    catalogInfo As CatalogConnectionSettings, _
    orderedPropertiesForUrlRewrite As String(), _
    webUrl As String, _
    catalogTaxonomyManagedProperty As String _
)
'Usage
Dim instance As CatalogConnectionManager
Dim catalogInfo As CatalogConnectionSettings
Dim orderedPropertiesForUrlRewrite As String()
Dim webUrl As String
Dim catalogTaxonomyManagedProperty As String

instance.AddCatalogConnection(catalogInfo, _
    orderedPropertiesForUrlRewrite, _
    webUrl, catalogTaxonomyManagedProperty)
public void AddCatalogConnection(
    CatalogConnectionSettings catalogInfo,
    string[] orderedPropertiesForUrlRewrite,
    string webUrl,
    string catalogTaxonomyManagedProperty
)

Parameters

  • orderedPropertiesForUrlRewrite
    Type: []

    Catalog item key fields that are used to generate friendly URLs for items in this catalog. The URL will be rewritten by using these property values in the same order.

  • webUrl
    Type: System.String

    Server-relative URL of the web that form the base URL of the friendly URL for items in this catalog.

  • catalogTaxonomyManagedProperty
    Type: System.String

    Managed property name of the taxonomy field that contains category information for catalog items.

Remarks

Use the GetPublishingCatalog() method to get catalog information.

The connection is added to the store when the Update method is called.

Throws aArgumentNullException exception if the catalogInfo parameter is a null reference (Nothing in Visual Basic). URL rewrite is enabled only if non-empty values for the orderedPropertiesForUrlRewrite parameter, the webUrl parameter, and the catalogTaxonomyManagedProperty parameter are passed in.

See also

Reference

CatalogConnectionManager class

CatalogConnectionManager members

AddCatalogConnection overload

Microsoft.SharePoint.Publishing namespace

Microsoft.SharePoint.Publishing.CatalogConnectionSettings