Class ViewContentRetriever
Gets pages from IContentRepository and modifies the result if the page has a shortcut to another page.
Inheritance
Inherited Members
Namespace: EPiServer.Web
Assembly: EPiServer.dll
Version: 7.19.2Syntax
public class ViewContentRetriever
Constructors
ViewContentRetriever(IContentRepository, LanguageSelectorFactory)
Initializes a new instance of the ViewContentRetriever class.
Declaration
public ViewContentRetriever(IContentRepository contentRepository, LanguageSelectorFactory languageSelectorFactory)
Parameters
| Type | Name | Description |
|---|---|---|
| IContentRepository | contentRepository | The page repository used to get pages. |
| LanguageSelectorFactory | languageSelectorFactory | The language selector factory. |
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.