Class RazorPageExtensions
Version: 21.x
Extensions to support Razor pages and views.
Inheritance
System.Object
RazorPageExtensions
Namespace: Sitecore.AspNet.RenderingEngine.Extensions
Assembly: Sitecore.AspNet.RenderingEngine.dll
Syntax
Methods
SitecoreComponent(IRazorPage)
Gets the current Sitecore Component.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| Microsoft.AspNetCore.Mvc.Razor.IRazorPage | page |
The current Microsoft.AspNetCore.Mvc.Razor.IRazorPage. |
Returns
SitecoreContext(IRazorPage)
Gets the current Sitecore Context.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| Microsoft.AspNetCore.Mvc.Razor.IRazorPage | page |
The current Microsoft.AspNetCore.Mvc.Razor.IRazorPage. |
Returns
SitecoreRoute(IRazorPage)
Gets the current Sitecore Route data.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| Microsoft.AspNetCore.Mvc.Razor.IRazorPage | page |
The current Microsoft.AspNetCore.Mvc.Razor.IRazorPage. |