Class ContentController<T>
Provides the base implementation for for content controllers.
Namespace: EPiServer.Web.Mvc
Assembly: EPiServer.Cms.AspNetCore.Mvc.dll
Version: 12.0.3Syntax
[RequireClientResources]
[VisitorGroupImpersonation]
[TemplateDescriptor]
public abstract class ContentController<T> : ActionControllerBase, IRenderTemplate<T>, IRenderTemplate where T : IContent
Type Parameters
Name | Description |
---|---|
T |
Remarks
The ContentController class is small, containing only a few methods and properties for handling two basic tasks:
- Support for access checks.
- Setting up the capability of impersonating visitor groups.
Constructors
ContentController()
Declaration
protected ContentController()
Methods
RedirectToContent(ContentReference, String)
Initializes a new instance of the Redirect
Declaration
public virtual RedirectToContentResult RedirectToContent(ContentReference contentLink, string actionName)
Parameters
Type | Name | Description |
---|---|---|
Content |
contentLink | The content link |
System. |
actionName | The name of the action to use for generating the URL. |
Returns
Type | Description |
---|---|
Redirect |
RedirectToContent(ContentReference, String, String)
Initializes a new instance of the Redirect
Declaration
public virtual RedirectToContentResult RedirectToContent(ContentReference contentLink, string actionName, string language)
Parameters
Type | Name | Description |
---|---|---|
Content |
contentLink | The content link |
System. |
actionName | The name of the action to use for generating the URL. |
System. |
language | The language |
Returns
Type | Description |
---|---|
Redirect |