NavigationTerm.CatalogTargetUrl property
Gets the target URL that is used when rewriting URLs for catalog-friendly URLs that are based on this NavigationTerm object.
Namespace: Microsoft.SharePoint.Client.Publishing.Navigation
Assembly: Microsoft.SharePoint.Client.Publishing (in Microsoft.SharePoint.Client.Publishing.dll)
Syntax
'Declaration
Public ReadOnly Property CatalogTargetUrl As CustomizableString
Get
'Usage
Dim instance As NavigationTerm
Dim value As CustomizableString
value = instance.CatalogTargetUrl
public CustomizableString CatalogTargetUrl { get; }
Property value
Type: Microsoft.SharePoint.Client.Publishing.CustomizableString
A customized string that represents the target URL that is used when rewriting URLs for catalog-friendly URLs that are based on this NavigationTerm object.
Remarks
Normally, the web server performs URL rewriting to render the friendly URL for a NavigationTerm by using the page that is specified by the TargetUrl property. For example, for the term "Cameras", the URLs might look like this: Friendly URL: http://example.com/products/camerasTarget URL: /store/Pages/TopicTemplate.aspxHowever, if a catalog-friendly URL suffix is appended, then the CatalogTargetUrl property will be used instead. Continuing the example involving the term "Cameras":Catalog Friendly URL: http://example.com/products/cameras/nice-pix-35mm/sku12345URL Suffix: nice-pix-35mm/sku12345 Catalog Target URL: /store/Pages/CatalogItemTemplate.aspx
Typically, catalog-friendly URLs are used for products such as the hypothetical "Nice Pix 35mm camera" in the preceding example, which do not have a corresponding navigation term, but belong to the category represented by that term. However, the interpretation of the catalog-friendly URL suffix is left to the controls on the target page, and other usage scenarios are possible.If the CatalogTargetUrl value is an empty string, then URL rewriting will not be performed for the term and the catalog-friendly URL may produce an HTTP 404 error. The target URL may contain tokens such as ~site/ (representing the server-relative URL for the associated Web object) or ~sitecollection/ (representing the server-relative URL for the associated Site object). These tokens are expanded by methods such as GetResolvedTargetUrl(String, []).
This property is only used when the LinkType is NavigationLinkType.FriendlyUrl. For other link types, attempting to change it will cause an InvalidOperationException to be thrown.
This property is a CustomizableString object. The default value is inherited from the CatalogTargetUrlForChildTerms.Value property of the parent NavigationTerm or the NavigationTermSet if there is no parent term.