Loads the specified version. Default base class implementation has no versioning support so it uses GetPage(PageReference, ILanguageSelector) to get page. If versioning is to be supported this method should be overriden.

Namespace:  EPiServer.Core
Assembly:  EPiServer (in EPiServer.dll) Version: 5.2.375.236

Syntax

C#
public virtual PageVersion LoadVersion(
	PageReference pageLink
)

Parameters

pageLink
Type: EPiServer.Core..::.PageReference
The page link.

Return Value

Specific PageVersion.

Implements

IPageStore..::.LoadVersion(PageReference)

Examples

The following code sample is an implementation of LoadVersion() for XmlPageProvider.
CopyC#
public override PageVersion LoadVersion(PageReference pageLink)
{
    XElement page = GetPageNode(pageLink);
    PageVersion pv = new PageVersion(pageLink,
                                       GetPropertyValue("PageName", page),
                                      (VersionStatus)int.Parse(GetPropertyValue("PageWorkStatus", page)),
                                      DateTime.Parse(GetPropertyValue("PageChanged", page) == null ? GetPropertyValue("PageCreated", page) : GetPropertyValue("PageChanged", page)),
                                      "",
                                      "",
                                      0);
    pv.LanguageBranch = GetPropertyValue("PageLanguageBranch", page);
    return pv;
}

See Also