Share via


NavigationTermSet.FindTermForUrl method

Searches for the first node that matches the specified URL.

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

Syntax

'Declaration
Public Function FindTermForUrl ( _
    url As String _
) As NavigationTerm
'Usage
Dim instance As NavigationTermSet
Dim url As String
Dim returnValue As NavigationTerm

returnValue = instance.FindTermForUrl(url)
public NavigationTerm FindTermForUrl(
    string url
)

Parameters

Return value

Type: Microsoft.SharePoint.Client.Publishing.Navigation.NavigationTerm
A navigation node with a hyperlink URL that matches the specified url, if an exact or associated match exists; otherwise, a null reference (Nothing in Visual Basic).

Remarks

This method is used by navigation controls (for example, a breadcrumb control) to determine the location of the current page in the navigation hierarchy. It searches all child NavigationTerm objects for a navigation node with a hyperlink URL that matches the specified URL. The matching algorithm normalizes the URLs to ignore some query parameters or character casing and encoding differences, and respects tokens such as ~site and ~sitecollection. If a direct match cannot be found, it will consider the AssociatedFolderUrl property. Otherwise, the return value is a null reference (Nothing in Visual Basic).

See also

Reference

NavigationTermSet class

NavigationTermSet members

Microsoft.SharePoint.Client.Publishing.Navigation namespace