TaxonomyNavigation.GetTermSetForWeb method

Returns efficiently from the taxonomy navigation cache a read-only instance of a NavigationTermSet object for the specified SPWeb object.

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

Syntax

'Declaration
Public Shared Function GetTermSetForWeb ( _
    web As SPWeb, _
    siteMapProviderName As String, _
    includeInheritedSettings As Boolean _
) As NavigationTermSet
'Usage
Dim web As SPWeb
Dim siteMapProviderName As String
Dim includeInheritedSettings As Boolean
Dim returnValue As NavigationTermSet

returnValue = TaxonomyNavigation.GetTermSetForWeb(web, _
    siteMapProviderName, includeInheritedSettings)
public static NavigationTermSet GetTermSetForWeb(
    SPWeb web,
    string siteMapProviderName,
    bool includeInheritedSettings
)

Parameters

  • includeInheritedSettings
    Type: System.Boolean

    Specifies whether the parent SPWeb objects should be considered if the SiteMapProvider is configured to inherit its settings via the StandardNavigationSource.InheritFromParentWeb enumeration; otherwise, null is returned when these configurations are encountered.

Return value

Type: Microsoft.SharePoint.Publishing.Navigation.NavigationTermSet
A NavigationTermSet object for the specified SPWeb object if managed navigation is configured for the site; otherwise, a null reference (Nothing in Visual Basic).

Remarks

If the NavigationTermSet object is not already in the cache, returning it may involve loading the WebNavigationSettings object from Properties and then loading the TermSet.object.

See also

Reference

TaxonomyNavigation class

TaxonomyNavigation members

Microsoft.SharePoint.Publishing.Navigation namespace