Interface IComponentRenderer

Version: 21.x

Supports rendering HTML content that can be used in a web page.

Namespace: Sitecore.AspNet.RenderingEngine.Rendering
Assembly: Sitecore.AspNet.RenderingEngine.Abstractions.dll
Syntax
RequestResponse
public interface IComponentRenderer

Methods

Render(ISitecoreRenderingContext, ViewContext)

Generates the output HTML.

Declaration
RequestResponse
Task<IHtmlContent> Render(ISitecoreRenderingContext renderingContext, ViewContext viewContext)
Parameters
TypeNameDescription
ISitecoreRenderingContextrenderingContext

The current ISitecoreRenderingContext.

Microsoft.AspNetCore.Mvc.Rendering.ViewContextviewContext

The current Microsoft.AspNetCore.Mvc.Rendering.ViewContext.

Returns
TypeDescription
System.Threading.Tasks.Task<Microsoft.AspNetCore.Html.IHtmlContent>

The HTML content to render.

Do you have some feedback for us?

If you have suggestions for improving this article,