Class ViewContentRetriever

Gets pages from IContentRepository and modifies the result if the page has a shortcut to another page.

Inheritance
System.Object
ViewContentRetriever
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Web
Assembly: EPiServer.dll
Version: 8.11.0
Syntax
public class ViewContentRetriever

Constructors

ViewContentRetriever(IContentRepository)

Initializes a new instance of the ViewContentRetriever class.

Declaration
public ViewContentRetriever(IContentRepository contentRepository)
Parameters
Type Name Description
IContentRepository contentRepository

The page repository used to get pages.

Methods

GetContent(ContentReference)

Gets the IContent object with corresponding contentLink

Declaration
public IContent GetContent(ContentReference contentLink)
Parameters
Type Name Description
ContentReference contentLink

The content link.

Returns
Type Description
IContent

GetContent(ContentReference, String)

Gets the IContent object with corresponding contentLink and languageId

Declaration
public IContent GetContent(ContentReference contentLink, string languageId)
Parameters
Type Name Description
ContentReference contentLink

The content link.

System.String languageId

The language id.

Returns
Type Description
IContent

GetPage(PageReference)

Gets a page that is shown in view mode by PageReference.

Declaration
public virtual PageData GetPage(PageReference pageLink)
Parameters
Type Name Description
PageReference pageLink

The page link to the page.

Returns
Type Description
PageData

The page shown in view mode

Remarks

This method respects shortcuts between pages and returns the PageData of any page that a shortcut points to.

GetPage(PageReference, String)

Gets a page that is shown in view mode by PageReference and language id.

Declaration
public virtual PageData GetPage(PageReference pageLink, string languageId)
Parameters
Type Name Description
PageReference pageLink

The page link to the page.

System.String languageId

The language id of the page.

Returns
Type Description
PageData

The page shown in view mode.

Remarks

This method respects shortcuts between pages and returns the PageData of any page that a shortcut points to.

If languageId is null or empty, AutoDetect(Boolean) is used.

Extension Methods

See Also