@using Nop.Core @using Nop.Services.Configuration @inject IStoreContext storeContext @inject ISettingService settingService @{ var controllerName = Url.ActionContext.RouteData.Values["controller"].ToString(); var actionName = Url.ActionContext.RouteData.Values["action"].ToString(); var isHomePage = controllerName.Equals("home", StringComparison.InvariantCultureIgnoreCase) && actionName.Equals("index", StringComparison.InvariantCultureIgnoreCase); var currentStore = await storeContext.GetCurrentStoreAsync(); int storeId = currentStore.Id; bool isHomeSliderFullWidth = await settingService.GetSettingByKeyAsync("pavilionthemesettings.ishomepagemainsliderfullwidth", false, storeId, true); bool stickyCategoryMenuFlyout = await settingService.GetSettingByKeyAsync("pavilionthemesettings.StickyCategoryMenuFlyout", true, storeId, true); bool showCategoriesInSideMenu = await settingService.GetSettingByKeyAsync("pavilionthemesettings.ShowCategoriesInSideMenu", true, storeId, true); }
@await Component.InvokeAsync("Widget", new { widgetZone = "header" })
@await Component.InvokeAsync("AdminHeaderLinks") @{ var taxTypeSelectorHtml = await Component.InvokeAsync("TaxTypeSelector"); var currencySelectorHtml = await Component.InvokeAsync("CurrencySelector"); var languageSelectorHtml = await Component.InvokeAsync("LanguageSelector"); var headerSelectorWidgetHtml = await Component.InvokeAsync("Widget", new { widgetZone = "header_selectors" }); } @if (!String.IsNullOrEmpty(await taxTypeSelectorHtml.RenderHtmlContentAsync()) || !String.IsNullOrEmpty(await currencySelectorHtml.RenderHtmlContentAsync()) || !String.IsNullOrEmpty(await languageSelectorHtml.RenderHtmlContentAsync()) || !String.IsNullOrEmpty(await headerSelectorWidgetHtml.RenderHtmlContentAsync())) {
@taxTypeSelectorHtml @currencySelectorHtml @languageSelectorHtml @headerSelectorWidgetHtml
}
@T("SevenSpikes.Themes.Common.CloseMenu")
@{ var menuHtml = await Component.InvokeAsync("Widget", new { widgetZone = "theme_header_menu" }); } @if (!String.IsNullOrEmpty(await menuHtml.RenderHtmlContentAsync())) { @menuHtml } else { @await Component.InvokeAsync("TopMenu") }
@await Component.InvokeAsync("FlyoutShoppingCart")
@if (showCategoriesInSideMenu) { @T("SevenSpikes.Themes.Pavilion.Header.AllCategories") if (!isHomePage || isHomeSliderFullWidth) {
    } }
    @if (isHomePage) { var homePageSliderCss = isHomeSliderFullWidth ? "slider-fullwidth" : "slider-right-column";
    @if (isHomeSliderFullWidth) { @await Component.InvokeAsync("Widget", new { widgetZone = "home_page_main_slider" }); @await Component.InvokeAsync("Widget", new { widgetZone = "home_page_search_widget" }) }
    @if (showCategoriesInSideMenu && !isHomeSliderFullWidth) {
      } @await Component.InvokeAsync("Widget", new { widgetZone = "homepage_sidebar_after" })
      @if (!isHomeSliderFullWidth) { @await Component.InvokeAsync("Widget", new { widgetZone = "home_page_main_slider" }); @await Component.InvokeAsync("Widget", new { widgetZone = "home_page_search_widget" }) } @await Component.InvokeAsync("Widget", new { widgetZone = "homepage_slider_after" })
      }