Table of Contents

Class PagesAppConfigurationExtensions

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

Configuration helpers for Pages functionality.

public static class PagesAppConfigurationExtensions
Inheritance
PagesAppConfigurationExtensions
Inherited Members

Methods

AddSitecorePagesHandler(ISitecoreLayoutClientBuilder)

Registers an HTTP request handler for the Sitecore layout service client.

public static ISitecoreLayoutClientBuilder AddSitecorePagesHandler(this ISitecoreLayoutClientBuilder builder)

Parameters

builder ISitecoreLayoutClientBuilder

The ISitecoreLayoutClientBuilder to configure.

Returns

ISitecoreLayoutClientBuilder

The ILayoutRequestHandlerBuilder<THandler> so that additional calls can be chained.

UseSitecorePages(WebApplication, PagesOptions)

Registers the Sitecore Experience Editor middleware into the IApplicationBuilder.

public static IApplicationBuilder UseSitecorePages(this WebApplication app, PagesOptions options)

Parameters

app WebApplication

The instance of the IApplicationBuilder to extend.

options PagesOptions

The Pages options used to configure Pages MetaData editing.

Returns

IApplicationBuilder

The IApplicationBuilder so that additional calls can be chained.

WithSitecorePages(ISitecoreRenderingEngineBuilder, string, Action<PagesOptions>?)

Adds the Sitecore Experience Editor support services to the IServiceCollection.

public static ISitecoreRenderingEngineBuilder WithSitecorePages(this ISitecoreRenderingEngineBuilder serviceBuilder, string contextId, Action<PagesOptions>? options = null)

Parameters

serviceBuilder ISitecoreRenderingEngineBuilder

The ISitecoreRenderingEngineBuilder to add services to.

contextId string

The ContextId for the environment being used.

options Action<PagesOptions>

Configures the PagesOptions options.

Returns

ISitecoreRenderingEngineBuilder

The IServiceCollection so that additional calls can be chained.