Table of Contents

Class RazorPageExtensions

Namespace
Sitecore.AspNetCore.SDK.RenderingEngine.Extensions
Assembly
Sitecore.AspNetCore.SDK.RenderingEngine.dll

Extensions to support Razor pages and views.

public static class RazorPageExtensions
Inheritance
RazorPageExtensions
Inherited Members

Methods

SitecoreComponent(IRazorPage)

Gets the current Sitecore Component.

public static Component? SitecoreComponent(this IRazorPage page)

Parameters

page IRazorPage

The current IRazorPage.

Returns

Component

The current instance of Component.

SitecoreContext(IRazorPage)

Gets the current Sitecore Context.

public static Context? SitecoreContext(this IRazorPage page)

Parameters

page IRazorPage

The current IRazorPage.

Returns

Context

The current instance of Context.

SitecoreRoute(IRazorPage)

Gets the current Sitecore Route data.

public static Route? SitecoreRoute(this IRazorPage page)

Parameters

page IRazorPage

The current IRazorPage.

Returns

Route

The current instance of Route.