SaaS CMS has officially launched! Learn more now.

Class PartialContentController<TContentData>

Provides the base implementation for for partial content controllers.

Inheritance
System.Object
PartialContentController<TContentData>
Implements
IRenderTemplate<TContentData>
Namespace: EPiServer.Web.Mvc
Assembly: EPiServer.dll
Version: 8.11.0
Syntax
[VisitorGroupImpersonation]
[AuthorizeContent]
public abstract class PartialContentController<TContentData> : ActionControllerBase, IRenderTemplate<TContentData>, IRenderTemplate where TContentData : IContentData
Type Parameters
Name Description
TContentData

The type of the content data.

Examples

The following code example demonstrates two simple block controllers.

Constructors

PartialContentController()

Declaration
protected PartialContentController()

Methods

Index(TContentData)

Default action, which tries to find a partial view with the same name as the content type.

Declaration
public virtual ActionResult Index(TContentData currentContent)
Parameters
Type Name Description
TContentData currentContent

The current content instance.

Returns
Type Description
System.Web.Mvc.ActionResult

Content from the view

Implements

Extension Methods