SaaS CMS has officially launched! Learn more now.

Class ContentController<T>

Provides the base implementation for for content controllers.

Inheritance
System.Object
ContentController<T>
Namespace: EPiServer.Web.Mvc
Assembly: EPiServer.Cms.AspNetCore.Mvc.dll
Version: 12.0.3
Syntax
[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 RedirectToContentResult with the values provided.

Declaration
public virtual RedirectToContentResult RedirectToContent(ContentReference contentLink, string actionName)
Parameters
Type Name Description
ContentReference contentLink

The content link

System.String actionName

The name of the action to use for generating the URL.

Returns
Type Description
RedirectToContentResult

RedirectToContent(ContentReference, String, String)

Initializes a new instance of the RedirectToContentResult with the values provided.

Declaration
public virtual RedirectToContentResult RedirectToContent(ContentReference contentLink, string actionName, string language)
Parameters
Type Name Description
ContentReference contentLink

The content link

System.String actionName

The name of the action to use for generating the URL.

System.String language

The language

Returns
Type Description
RedirectToContentResult

Implements

Extension Methods