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
catalogInfo
Type: Microsoft.SharePoint.Publishing.CatalogConnectionSettingsThe connection settings to add. Settings to add should include the CatalogUrl property, the CatalogId property, the CatalogSiteUrl property, which are returned by the GetPublishingCatalog method. This parameter should not be a null reference (Nothing in Visual Basic).
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.StringServer-relative URL of the web that form the base URL of the friendly URL for items in this catalog.
catalogTaxonomyManagedProperty
Type: System.StringManaged 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