Class RenderingEngineOptionsExtensions
Extensions to help configure RenderingEngineOptions.
Inheritance
System.Object
RenderingEngineOptionsExtensions
Namespace: Sitecore.AspNet.RenderingEngine.Extensions
Assembly: Sitecore.AspNet.RenderingEngine.dll
Syntax
Methods
AddDefaultComponentRenderer(RenderingEngineOptions)
Maps a default IComponentRenderer.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| RenderingEngineOptions | options | The RenderingEngineOptions to configure. |
Returns
| Type | Description |
|---|---|
| RenderingEngineOptions | The RenderingEngineOptions so that additional calls can be chained. |
AddDefaultComponentRenderer(RenderingEngineOptions)
Maps a default IComponentRenderer.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| RenderingEngineOptions | options | The RenderingEngineOptions to configure. |
Returns
| Type | Description |
|---|---|
| RenderingEngineOptions | The RenderingEngineOptions so that additional calls can be chained. |
Type Parameters
| Name | Description |
|---|---|
| T | The IComponentRenderer to use for the default renderer. |
AddDefaultPartialView(RenderingEngineOptions, String)
Maps any unmatched Sitecore layout component to a default partial view. This provides a visual appearance when the Sitecore layout service returns a component name that no implementation exists for. The view will receive a Component model. Ensure this is registered last as this mapping will override any subsequent component registrations.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| RenderingEngineOptions | options | The RenderingEngineOptions to configure. |
| System.String | partialViewPath | The path of the partial view. |
Returns
| Type | Description |
|---|---|
| RenderingEngineOptions | The RenderingEngineOptions so that additional calls can be chained. |
AddModelBoundView(RenderingEngineOptions, Predicate, String)
Maps a Sitecore layout component name to a partial view rendering, using the default Sitecore view component to model bind it.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| RenderingEngineOptions | options | The RenderingEngineOptions to configure. |
| System.Predicate < System.String > | match | A predicate to use when attempting to match a layout component. |
| System.String | viewName | The view name. |
Returns
| Type | Description |
|---|---|
| RenderingEngineOptions | The RenderingEngineOptions so that additional calls can be chained. |
Type Parameters
| Name | Description |
|---|---|
| TModel | The model type to use for view binding. |
AddModelBoundView(RenderingEngineOptions, String)
Maps a Sitecore layout component name to a partial view rendering, using the default Sitecore view component to model bind it.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| RenderingEngineOptions | options | The RenderingEngineOptions to configure. |
| System.String | viewName | The view name and layout component name. If the view name is a full path, the view's file name will be the layout component name. |
Returns
| Type | Description |
|---|---|
| RenderingEngineOptions | The RenderingEngineOptions so that additional calls can be chained. |
Type Parameters
| Name | Description |
|---|---|
| TModel | The model type to use for view binding. |
AddModelBoundView(RenderingEngineOptions, String, String)
Maps a Sitecore layout component name to a partial view rendering, using the default Sitecore view component to model bind it.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| RenderingEngineOptions | options | The RenderingEngineOptions to configure. |
| System.String | layoutComponentName | The name of the layout component. |
| System.String | viewName | The view name. |
Returns
| Type | Description |
|---|---|
| RenderingEngineOptions | The RenderingEngineOptions so that additional calls can be chained. |
Type Parameters
| Name | Description |
|---|---|
| TModel | The model type to use for view binding. |
AddPartialView(RenderingEngineOptions, Predicate, String)
Maps a Sitecore layout component name to a partial view rendering. The view will receive a Component model.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| RenderingEngineOptions | options | The RenderingEngineOptions to configure. |
| System.Predicate < System.String > | match | The predicate to use when attempting to match a layout component. |
| System.String | partialViewPath | The path of the partial view. |
Returns
| Type | Description |
|---|---|
| RenderingEngineOptions | The RenderingEngineOptions so that additional calls can be chained. |
AddPartialView(RenderingEngineOptions, String)
Maps a Sitecore layout component name to a partial view rendering. The view will receive a Component model.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| RenderingEngineOptions | options | The RenderingEngineOptions to configure. |
| System.String | partialViewPath | The path of the partial view. The file name of the partial view will be the registered Sitecore layout component name. |
Returns
| Type | Description |
|---|---|
| RenderingEngineOptions | The RenderingEngineOptions so that additional calls can be chained. |
AddPartialView(RenderingEngineOptions, String, String)
Maps a Sitecore layout component name to a partial view rendering. The view will receive a Component model.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| RenderingEngineOptions | options | The RenderingEngineOptions to configure. |
| System.String | layoutComponentName | The name of the layout component. |
| System.String | partialViewPath | The path of the partial view. |
Returns
| Type | Description |
|---|---|
| RenderingEngineOptions | The RenderingEngineOptions so that additional calls can be chained. |
AddPostRenderingAction(RenderingEngineOptions, Action)
Adds post rendering action to be executed after Rendering engine logic.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| RenderingEngineOptions | options | The RenderingEngineOptions to configure. |
| System.Action < Microsoft.AspNetCore.Http.HttpContext > | postAction | The action to execute after rendering engine/>. |
Returns
| Type | Description |
|---|---|
| RenderingEngineOptions | The RenderingEngineOptions so that additional calls can be chained. |
AddViewComponent(RenderingEngineOptions, Predicate, String)
Maps a Sitecore layout component name to a view component rendering.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| RenderingEngineOptions | options | The RenderingEngineOptions to configure. |
| System.Predicate < System.String > | match | A predicate to use when attempting to match a layout component. |
| System.String | viewComponentName | The view component name. |
Returns
| Type | Description |
|---|---|
| RenderingEngineOptions | The RenderingEngineOptions so that additional calls can be chained. |
AddViewComponent(RenderingEngineOptions, String)
Maps a Sitecore layout component name to a view component rendering.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| RenderingEngineOptions | options | The RenderingEngineOptions to configure. |
| System.String | viewComponentName | The view component name. This is also used as the layout component registration name. |
Returns
| Type | Description |
|---|---|
| RenderingEngineOptions | The RenderingEngineOptions so that additional calls can be chained. |
AddViewComponent(RenderingEngineOptions, String, String)
Maps a Sitecore layout component name to a view component rendering.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| RenderingEngineOptions | options | The RenderingEngineOptions to configure. |
| System.String | layoutComponentName | The name of the layout component. |
| System.String | viewComponentName | The view component name. |
Returns
| Type | Description |
|---|---|
| RenderingEngineOptions | The RenderingEngineOptions so that additional calls can be chained. |
MapToRequest(RenderingEngineOptions, Action<HttpRequest, SitecoreLayoutRequest>)
Adds SitecoreLayoutRequest mapping action.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| RenderingEngineOptions | options | The RenderingEngineOptions to configure. |
| System.Action < Microsoft.AspNetCore.Http.HttpRequest , SitecoreLayoutRequest > | mapAction | The mapping action to configure SitecoreLayoutRequest. |
Returns
| Type | Description |
|---|---|
| RenderingEngineOptions | The RenderingEngineOptions so that additional calls can be chained. |