SaaS CMS has officially launched! Learn more now.

Class MvcContentRenderer

Renders a block using the TemplateResolver.

Inheritance
System.Object
MvcContentRenderer
Implements
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Web.Mvc
Assembly: EPiServer.dll
Version: 8.11.0
Syntax
[ServiceConfiguration(typeof(IContentRenderer))]
public class MvcContentRenderer : IContentRenderer

Constructors

MvcContentRenderer(DisplayOptions)

Initializes a new instance of the MvcContentRenderer class.

Declaration
public MvcContentRenderer(DisplayOptions displayOptions)
Parameters
Type Name Description
DisplayOptions displayOptions

The display options.

MvcContentRenderer(DisplayOptions, CachingViewEnginesWrapper)

Initializes a new instance of the MvcContentRenderer class.

Declaration
public MvcContentRenderer(DisplayOptions displayOptions, CachingViewEnginesWrapper cachingViewEngineWrapper)
Parameters
Type Name Description
DisplayOptions displayOptions

The display options.

CachingViewEnginesWrapper cachingViewEngineWrapper

The caching view engine wrapper.

Properties

ViewEngines

Gets or sets the System.Web.Mvc.ViewEngineCollection to be used

Declaration
[Obsolete("Pass in dependency as constructor argument CachingViewEngineWrapper instead")]
public ViewEngineCollection ViewEngines { get; set; }
Property Value
Type Description
System.Web.Mvc.ViewEngineCollection
Remarks

This is exposed mainly for unit test purposes, at runtime it returns System.Web.Mvc.ViewEngines.Engines

Methods

Render(HtmlHelper, PartialRequest, IContentData, TemplateModel)

Renders the content given by contentData using the System.Web.Mvc.HtmlHelper.ViewContext.

Both partial controllers and partial views can be rendered.

Declaration
public void Render(HtmlHelper helper, PartialRequest partialRequestHandler, IContentData contentData, TemplateModel templateModel)
Parameters
Type Name Description
System.Web.Mvc.HtmlHelper helper

The helper.

PartialRequest partialRequestHandler

The partial request handler.

IContentData contentData

The content data.

TemplateModel templateModel

The template model.

Implements

Extension Methods