Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more

Class IContentDataExtensions

Contains extension methods related to IContentData for Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper.

Inheritance
System.Object
IContentDataExtensions
Namespace: EPiServer.Web.Mvc.Html
Assembly: EPiServer.Cms.AspNetCore.HtmlHelpers.dll
Version: 12.0.3
Syntax
public static class IContentDataExtensions : Object

Fields

InsideContentAreaMarker

Key that is used to define if a content instance is rendererd inside a content area.

Declaration
public const string InsideContentAreaMarker = "EPi:InsideContentArea"
Field Value
Type Description
System.String

Methods

RenderContentData(IHtmlHelper, IContentData, Boolean)

Calls the render of the block to render the block context to the stream.

Declaration
public static void RenderContentData(this IHtmlHelper html, IContentData contentData, bool isContentInContentArea)
Parameters
Type Name Description
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper html

The HTML.

IContentData contentData

The content data.

System.Boolean isContentInContentArea

Flag that indicates if the content is rendered inside a content area.

RenderContentData(IHtmlHelper, IContentData, Boolean, TemplateModel, IContentRenderer)

Calls the render of the block to render the block context to the stream.

Declaration
public static void RenderContentData(this IHtmlHelper html, IContentData contentData, bool isContentInContentArea, TemplateModel templateModel, IContentRenderer contentRenderer)
Parameters
Type Name Description
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper html

The HTML.

IContentData contentData

The content data.

System.Boolean isContentInContentArea

Flag that indicates if the content is rendered inside a content area

TemplateModel templateModel

The template model.

IContentRenderer contentRenderer

The content renderer.

RenderContentData(IHtmlHelper, IContentData, Boolean, IEnumerable<String>)

Calls the renderer of the block to render the block context to the stream.

Declaration
public static void RenderContentData(this IHtmlHelper html, IContentData contentData, bool isContentInContentArea, IEnumerable<string> templateTags)
Parameters
Type Name Description
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper html

The HTML.

IContentData contentData

The content data.

System.Boolean isContentInContentArea

A flag indicating if the content is rendered inside a content area.

System.Collections.Generic.IEnumerable<System.String> templateTags

Tags used to resolve the content template to use.

RenderContentData(IHtmlHelper, IContentData, Boolean, String)

Calls the renderer of the block to render the block context to the stream.

Declaration
public static void RenderContentData(this IHtmlHelper html, IContentData contentData, bool isContentInContentArea, string templateTag)
Parameters
Type Name Description
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper html

The HTML.

IContentData contentData

The content data.

System.Boolean isContentInContentArea

A flag indicating if the content is rendered inside a content area.

System.String templateTag

A tag used to resolve the content template to use.