TaxonomyNavigationContext.NavigationTerm Property

Definition

Gets the context navigation term for the current HTTP request.

public:
 property Microsoft::SharePoint::Publishing::Navigation::NavigationTerm ^ NavigationTerm { Microsoft::SharePoint::Publishing::Navigation::NavigationTerm ^ get(); };
public Microsoft.SharePoint.Publishing.Navigation.NavigationTerm NavigationTerm { get; }
member this.NavigationTerm : Microsoft.SharePoint.Publishing.Navigation.NavigationTerm
Public ReadOnly Property NavigationTerm As NavigationTerm

Property Value

NavigationTerm

Remarks

Typically, this property is assigned automatically when the managed navigation feature rewrites a friendly URL or a catalog-friendly URL. If the current request URL is not a friendly URL, the context T:Microsoft.SharePoint.Publishing.Navigation.NavigationTerm object can be specified via the URL query parameters TermStoreId, TermSetId, and TermId. Server-side code can also specify the context NavigationTerm by calling the SetNavigationTerm(NavigationTerm, String[]) method.

Note: Although the context NavigationTerm object is typically a friendly URL, it is valid for it to be a SimpleLink instead. Use the FriendlyUrlTerm property to ignore such terms.

Once a context NavigationTerm is assigned, it cannot be changed for the duration of the HTTP request, which ensures that the page rendering is deterministic. Because of this behavior, care should be taken to ensure that controls are initialized in a predictable order.

Applies to