Skip to Content
ExplanationThe banner pipeline

The banner pipeline

Audience: CMS editors and developers.

A banner uses one shared type contract across the CMS, backend, and frontend. A change is complete only when each layer can store, copy, load, validate, and render its data.

Define the shared type

The CMS, backend, and frontend share the @haendlerapp/types contract. The shared type keeps the other layers consistent.

Add CMS fields

These definitions make the banner available in the CMS and show its fields in the Admin UI. They enforce required values and supply MCP metadata for correct banner creation and updates.

SHOP_BANNER_TYPENAMES connects shop banner types to feature control. Without this registration, the CMS does not hide the banner when shop is disabled. Backend filtering also becomes inconsistent.

CAR_DEALER_BANNER_TYPENAMES connects car-dealer banner types to the same control mechanism. Without this registration, the CMS does not hide the banner when the car-dealer feature is disabled. Backend filtering also becomes inconsistent.

CustomerAccountLoginBanner and CustomerAccountBanner are shop banners because the account implementation uses Shopify.

Preserve duplication

Banner duplication copies the registered keys from the stored bannerConfig. For fields stored outside bannerConfig, the duplication query and copy code must include each field.

Add backend queries and resolvers

The service layer requires single and batch queries for rendering and efficient page requests.

Map backend data

The backend service normalizes raw CMS GraphQL responses. It produces frontend banner objects that are valid at runtime.

Register the frontend renderer

The page renderer selects the visual component through bannerData.typename. It cannot render a banner without this registration.

Set media loading priority

The evaluator controls eager and lazy loading. Missing cases can cause unnecessary eager loading or delay LCP content.

For the implementation sequence, see add a banner type.

Last updated on