Header
Header defines the top navigation configuration for pages.
Props
Header id in the CMS.
Owner/creator identifier. Set automatically on create. Read-only afterwards.
Internal label used in the CMS UI.
Optional CTA buttons rendered on the right side of the header.
Optional list of brands used by the header (implementation-specific rendering).
Relationship to top-level header menu items.
Ordered list of HeaderMenuItem ids. Source of truth for menu item order.
Optional theme override for the header.
Whether the gross/net price-mode switch is shown in the header. This lets users override a CMS PRICE_MODE archive default during the current interaction.
Price mode switch
Set priceModeSwitchEnabled to true when users should be able to switch
between gross and net prices from the header. Price-bearing archives may also
define an initial mode with the CMS PRICE_MODE query default; the user can
still override that initial value with this switch.
Ordering behavior
menuItemsOrder and menuItems are kept in sync (same pattern as Page.bannersOrder):
- If
menuItemsOrderis explicitly set: menuItemsis overwritten to match that order (connecton create,seton update).- If
menuItemsOrderis untouched butmenuItemschanges: setreplaces the full orderdisconnectAllclears the orderdisconnectremoves ids from the orderconnectappends new ids to the end (preserving existing order)
HeaderMenuItem
HeaderMenuItem represents a menu entry. It can be either:
- a direct link (
hasSubmenu = false,linkrequired), or - a submenu container (
hasSubmenu = true,linkmust be empty)
Props
Menu item id in the CMS.
Owner/creator identifier. Set automatically on create. Read-only afterwards.
Visible menu label.
Back-reference to headers using this menu item.
Parent menu item (set for submenu entries).
Direct link when hasSubmenu is false.
If true, this item is a submenu container and must not have a direct link.
Direct children of this menu item.
Ordered list of submenu ids. Source of truth for submenu ordering.
Validation rules
- If
hasSubmenu = truethenlinkmust be empty. - If
hasSubmenu = falsethenlinkmust be set.
Ordering behavior (submenu)
subMenuItemsOrder and subMenuItems follow the same sync pattern as menuItemsOrder.
Deletion cleanup
On delete, the removed menu item id is purged from:
- every
Header.menuItemsOrder - every
HeaderMenuItem.subMenuItemsOrder