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.
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