PublishingWeb.GetVariation method (VariationLabel, Boolean)

Get the peer variation PublishingWeb object of this PublishingWeb object for the given label.

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

public PublishingWeb GetVariation(
	VariationLabel varlabel,
	bool forceRefresh
)

Parameters

varlabel
Type: Microsoft.SharePoint.Publishing.VariationLabel

The variation label to use to search for the variation peer PublishingWeb object of the current PublishingWeb object.

forceRefresh
Type: System.Boolean

A flag to indicate whether finding the peer PublishingWeb object is using cache.

Return value

Type: Microsoft.SharePoint.Publishing.PublishingWeb
Returns PublishingWeb object that is a variation peer of the current PublishingWeb object in the requested Label object..

Caller should call the Close() method on the returned object when it is not longer needed. It frees up the resources that are allocated to the PublishingWeb object.

Show: