TaxonomyNavigation.GetWebNavigationSettings method

Returns the navigation settings for the specified SPWeb object as a read-only instance of the WebNavigationSettings class that is efficiently obtained from the taxonomy navigation cache.

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

Syntax

'Declaration
Public Shared Function GetWebNavigationSettings ( _
    web As SPWeb _
) As WebNavigationSettings
'Usage
Dim web As SPWeb
Dim returnValue As WebNavigationSettings

returnValue = TaxonomyNavigation.GetWebNavigationSettings(web)
public static WebNavigationSettings GetWebNavigationSettings(
    SPWeb web
)

Parameters

Return value

Type: Microsoft.SharePoint.Publishing.Navigation.WebNavigationSettings
A read-only, cached WebNavigationSettings object.

Remarks

Since this object is fetched from the cache, the GetWebNavigationSettings(SPWeb) method is more efficient than calling the constructor for the WebNavigationSettings object. If the WebNavigationSettings object is not already in the cache, the system adds it. However, if the settings were recently changed during the same HTTP request, the returned settings may be out of data until the cache has been refreshed.

The GetWebNavigationSettings(Microsoft.SharePoint.SPWeb) method returns null if there are no settings defined in the SPWeb object, or if the settings are invalid.

See also

Reference

TaxonomyNavigation class

TaxonomyNavigation members

Microsoft.SharePoint.Publishing.Navigation namespace