NavBar renders the storefront header navigation:Mega menus (Vertical/Horizontal)Burger menu (desktop overlay + fixed panel)Simple menu (classic dropdown behavior)SectionHeader).{
"unReadAnnouncements": 0,
"navigations": [
{
"navigationTitle": "Sample navigation title",
"url": "/sample",
"image": {},
"banners": [],
"bannersLink": "",
"bannersText": "Sample text",
"menuIcon": {},
"navigations": [
{
"navigationTitle": "Sample navigation title",
"url": "/sample",
"image": {
"id": "Image Id",
"link": "https://example.com/media/sample.jpg"
},
"banners": [
{
"image": {
"id": "Banner image Id",
"link": "https://example.com/media/sample-banner.jpg"
}
},
"..."
],
"bannersLink": "",
"bannersText": "Sample text",
"menuIcon": {},
"navigations": [
{
"navigationTitle": "Sample navigation title",
"url": "/sample",
"image": {
"id": "Image Id",
"link": "https://example.com/media/sample.jpg"
},
"banners": [],
"bannersLink": "",
"bannersText": "",
"menuIcon": {},
"navigations": [
{
"navigationTitle": "Sample navigation title",
"url": "/sample",
"image": {
"id": "Image Id"
},
"banners": [],
"bannersLink": "",
"bannersText": "",
"menuIcon": {}
},
"..."
]
},
"..."
]
},
"..."
]
},
"..."
],
"name": "NavBar",
"view": "Default",
"section": "SectionHeader",
"settings": {
"showSearch": true,
"showLanguage": false,
"showMenuIcons": false,
"displayCategoryImages": false,
"menuType": "Mega",
"menuOrientation": "Vertical",
"subMenuLevels": "AllLevels",
"menuHelperText": "Sample text",
"id": "Component Id",
"section": "SectionHeader",
"type": "NoirNavBar",
"name": "NavBar",
"configuredInContentApi": true,
"view": "Default",
"displayName": "",
"cssClass": "",
"header": "",
"alignment": "Left"
},
"translations": {
"navbarLogoFor": "Sample text",
"goToHomepage": "Sample text",
"openLoginModal": "Sample text",
"...": "..."
}
}model.Settings.Idmodel.Settings.showSearchmodel.Settings.menuTypemodel.Settings.menuOrientationmodel.Settings.subMenuLevelsid="comp-{{ id }}".Mega, Burger, Simple (and anything else treated as “not simple” in some branches).menuType == 'Mega' to change layout and which submenu types open on click. Values used: Vertical / Horizontal.OneLevel, TwoLevels, AllLevels).navigations[] (the template supports deep nesting up to level 4).navigationTitleurlmenuIcon.link (used only for Burger menu + when showMenuIcons = true)image.link (used for category image previews in Mega Horizontal when displayCategoryImages = true)banners[] (used for Mega Vertical to show promotional banners to the side)bannersText, bannersLink (note: the template checks these, but the link is referenced as nav.bannerLink in one place—see Notes)$store.announcements$store.loginModal$store.shoppingLists$store.cartmodel.Settings.CssClassmodel.Settings.menuHelperTextmodel.Settings.showLanguagemodel.Settings.showMenuIconsmodel.Settings.displayCategoryImagesGlobalData.Settings.logo.link, logoLight.link, favicon.linkGlobalData.Settings.noImage.link (fallback) + theme fallback Assets/images/no-image.svgGlobalData.Company.Name, GlobalData.Company.LanguagesGlobalData.CurrentLanguage / GlobalData.Company.DefaultLanguageGlobalData.Settings.EnableShoppingLists, EnableWishlistComponents/NavBar/Default.js defines a global Alpine factory object navbardefault.navbardefault.initComponent(menuType, menuOrientation)isMenuVisible controls whether the element should be present/visible at all.isMenuOpen controls the slide-in/out class toggles.init()resize listener: updates isMobile, then re-measures heights after 500msscroll listener: re-measures heights (keeps sticky/fixed layout calculations correct)searchComponent()search()servicesreusabledefault.findProductsByCriteria(criteria)resultProducts (if non-empty)searchLoading = false in finallyredirectToSearch()/search?s=<encoded query>triggerVoiceSearch()sendSelectEvent(product, listName, position)toggleMenu()isMenuVisible = trueisMenuOpen = truedocument.body.style.overflow = "hidden")languageHeightisMenuOpen = true immediatelyisMenuOpen = falsetransitionend (menu slide-out), then:hiddenSiblingsisMenuVisible = falseisMenuVisible = false)childHover(submenuIndex, hovered)getMaxSubmenuHeight(index)submenu${index} (including nested .navbar__menu__sub elements).height: auto / maxHeight: noneclone.scrollHeightComponents/NavBar/Default.js this function wraps its work in setTimeout(..., 300) and the return is inside that callback.undefined).this.submenuHeight to actually get a numeric value, refactor to either:setTimeout), orawait it.getMaxBannersHeight(index)#submenu${index} .banners-wrap > div) using scrollHeight.setTimeout(..., 300) so it does not return a value synchronously.toggleSubmenuLevel1(index)toggleSubmenuLevel2(index), toggleSubmenuLevel3(index), toggleSubmenuLevel4(index)submenuVisibleLevelN (controls display)submenuOpenLevelN (controls the slide transition state)submenuVisibleLevelN.visible keeps the element in the DOM for animation.open controls translate classes.handleResize()resetMenu()@click.away="resetMenu" in Liquid).handleResize() but doesn’t recompute isMobile.navbardefault.handleLogout(logout, modalMessageText, modalButtonCancel)Alpine.store("modal").open(...).cartToken, cartData, checkoutTokennavbardefault.handleLogout(...) to show a confirmation modal.findProductsByCriteria).sendGAEvent(...)prepareListProducts(...)1440px.GlobalData.Settings.logo.link or logoLight.link exists, the navbar renders <img> logo(s).isMobile = window.innerWidth < 1440)menuOrientation and subMenuLevelssubmenuOpenLevel1, submenuVisibleLevel2submenuOpenLevel2, submenuVisibleLevel3submenuOpenLevel3, submenuVisibleLevel4submenuOpenLevel4display: styles based on open/visible properties.<input type="search"> bound to searchText.GlobalData.Company.Languages.size > 1):x-data="{ open: false }".