Class ViewContentRetriever
Gets pages from IContentRepository and modifies the result if the page has a shortcut to another page.
Inheritance
Implements
Inherited Members
Namespace: EPiServer.Web
Assembly: EPiServer.dll
Version: 9.12.2Syntax
[ServiceConfiguration]
[ServiceConfiguration(typeof(IViewContentRetriever), IncludeServiceAccessor = false)]
public class ViewContentRetriever : IViewContentRetriever
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, CultureInfo)
Gets the IContent object with corresponding contentLink
and culture
Declaration
public IContent GetContent(ContentReference contentLink, CultureInfo culture)
Parameters
Type | Name | Description |
---|---|---|
ContentReference | contentLink | The content link. |
System.Globalization.CultureInfo | culture | The language |
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, CultureInfo)
Gets a page that is shown in view mode by PageReference and culture.
Declaration
public virtual PageData GetPage(PageReference pageLink, CultureInfo culture)
Parameters
Type | Name | Description |
---|---|---|
PageReference | pageLink | The page link to the page. |
System.Globalization.CultureInfo | culture | The language 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 culture
is null
, AutoDetect(Boolean) is used.
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.