Skip to Content
ReferenceShared typesBanner buttons

Banner buttons

Audience: CMS editors, integrators, and developers.

Banner actions use one required group object. All group and item properties are required. Item IDs are unique within a group. The order of items is the display order. CMS editors can reorder items with the up and down arrow buttons.

Layout

items●
BannerButtonConfig[] | BannerButton[]
required

Ordered actions. CMS writes use IDs; public responses contain resolved resources.

align●
'left' | 'center' | 'right'
required

Alignment of the button group. Heading alignment is a separate setting.

width●
'intrinsic' | 'stretch'
required

Keep each button at its content width, or expand buttons to fill their row.

overflow●
'wrap' | 'stack'
required

Wrap buttons into additional rows, or change the whole group to one column when the complete row cannot fit.

CMS group

Use BannerButtonsConfig in CMS and MCP writes. Store the group in Banner.bannerConfig.buttons. Each HeroSlide has its own buttons JSON field.

type BannerButtonConfig = { id: string; action: BannerButtonAction; text: string | null; ctaLinkId: string | null; contactFormId: string | null; themeId: string | null; style: 'primary' | 'secondary' | 'tertiary'; }; type BannerButtonsConfig = { items: BannerButtonConfig[]; align: 'left' | 'center' | 'right'; width: 'intrinsic' | 'stretch'; overflow: 'wrap' | 'stack'; };

themeId: null explicitly inherits the surrounding theme. Style is always explicit; null is invalid. Unused resource IDs must be null. The CMS checks resource existence and access before saving. It prevents deletion of a Link, ContactForm, or Theme while a button references that record.

{ "items": [ { "id": "offers", "action": "link", "text": "View offers", "ctaLinkId": "link-id", "contactFormId": null, "themeId": null, "style": "primary" } ], "align": "center", "width": "intrinsic", "overflow": "wrap" }

Public group

The backend returns BannerButtons. Each item contains resolved resources. Send the CMS format above when you create or update content.

type BannerButton = { id: string; action: BannerButtonAction; text: string | null; style: 'primary' | 'secondary' | 'tertiary'; theme: Theme | null; url: DynamicLink | null; contactForm: DynamicForm | null; }; type BannerButtons = { items: BannerButton[]; align: 'left' | 'center' | 'right'; width: 'intrinsic' | 'stretch'; overflow: 'wrap' | 'stack'; };

See Theme, DynamicLink, and DynamicForm for the resolved resource types. Item text and style control ordinary CTA labels and appearance. Link rows and breadcrumbs retain their image navigation.

Actions

BannerButtonAction permits these values. Each owner permits only the actions listed in the next table. Fixed actions can occur only once in a group.

ActionCMS resourceText
linkRequired ctaLinkIdRequired nonempty text
contactFormRequired contactFormIdRequired nonempty text
customerLoginRequired ctaLinkId for the OAuth return targetRequired nonempty text
customerAccountRequired ctaLinkId for the signed-in destinationRequired nonempty text
archiveSearchctaLinkId, or null for inline resultsText or explicit null
entityContactRequired contactFormId; the owner supplies entity contextText or explicit null
consumptionInfoThe banner’s vehicle; both resource IDs are nullText or explicit null
checkoutThe live cart; both resource IDs are nullText or explicit null

Null text explicitly selects the fixed action’s built-in translated label. It is valid only for archiveSearch, entityContact, consumptionInfo, and checkout. The banner controller retains loading states, tracking, login state selection, search filters, and form context.

Owner limits

The @haendlerapp/shared/cms entry exports getBannerFieldDefinition and HERO_SLIDE_BUTTON_FIELD. The lookup reads each banner’s buttons field from the shared field registry. The HeroSlide definition supplies its nested group. These definitions supply the CMS, editor, and MCP metadata with min, amount, and actions. A null amount means no maximum. Add is disabled at the maximum. Empty groups are valid only where the minimum is zero. Groups are never truncated or repaired.

OwnerFieldMinimumMaximumActions
Button Blockbuttons0Unlimitedlink, contactForm
Headlinebuttons03link, contactForm
Tile cardbuttons12link, contactForm
HeroSlidebuttons03link, contactForm
Pricingbuttons02link, contactForm
Link row and breadcrumbsbuttons0Unlimitedlink
Customer account loginbuttons22One customerLogin and one customerAccount
Cartbuttons11checkout
Consumption informationbuttons11consumptionInfo
Deal, inventory, product, and collection search archivesbuttons11archiveSearch
Contact person and inventory vehiclebuttons01entityContact
Dealbuttons11entityContact

The application accepts only this group format. Before deployment, follow the manual migration plan .

Last updated on