Share via


SwitchableSiteMapProvider.GetCurrentWrappedProvider method

Returns the wrapped SiteMapProvider object as specified by the navigation settings for the current SPWeb object (from the SPContext object).

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

Syntax

'Declaration
Public Function GetCurrentWrappedProvider As SiteMapProvider
'Usage
Dim instance As SwitchableSiteMapProvider
Dim returnValue As SiteMapProvider

returnValue = instance.GetCurrentWrappedProvider()
public SiteMapProvider GetCurrentWrappedProvider()

Return value

Type: System.Web.SiteMapProvider

Remarks

The target provider is fetched by name from the global Providers table.

The GetCurrentWrappedProvider method never returns null. For minor configuration problems, it returns an “error site map” that contains the error message as its only SiteMapNode object. This behavior prevents a minor configuration error from bringing down the entire SharePoint site, including the control panels that could otherwise be used to fix the problem.

See also

Reference

SwitchableSiteMapProvider class

SwitchableSiteMapProvider members

Microsoft.SharePoint.Publishing.Navigation namespace