Exception in template (Designs/Rapido/_parsed/Page.parsed.cshtml): System.NullReferenceException: Object reference not set to an instance of an object.
   at CompiledRazorTemplates.Dynamic.bcadedbbfeefd.Execute()
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context)
   at RazorEngine.Templating.TemplateService.Run(ITemplate template, DynamicViewBag viewBag)
   at RazorEngine.Templating.TemplateService.Parse(String razorTemplate, Object model, DynamicViewBag viewBag, String cacheName)
   at RazorEngine.Razor.Parse[T](String razorTemplate, T model, DynamicViewBag viewBag, String cacheName)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()
@inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> @* Rapido version 2.1 *@ @using Dynamicweb.Frontend @using Dynamicweb.Frontend.Devices @using Dynamicweb.Extensibility @using Dynamicweb.Content @using Dynamicweb.Security @using Dynamicweb.Core @using System @using System.Linq @using System.Web @using System.IO @functions { string productsPageId; string contentSearchPageId; string resultPageId; string searchFeedId; string searchSecondFeedId; string groupsFeedId; string searchPlaceholder; string searchType = "product-search"; string searchTemplate; string searchContentTemplate; string searchValue = HttpContext.Current.Request.QueryString.Get("Search") != null ? HttpContext.Current.Request.QueryString.Get("Search") : ""; string searchIcon; bool showGroups = true; } @{ string GoogleTagManagerID = Model.Area.Item.GetString("GoogleTagManagerID"); //General settings string favicon = Model.Area.Item.GetFile("LogoFavicon") != null ? Model.Area.Item.GetFile("LogoFavicon").PathUrlEncoded : "/Files/Images/favicon.png"; string logo = Model.Area.Item.GetFile("LogoImage") != null ? Model.Area.Item.GetFile("LogoImage").PathUrlEncoded : "/Files/Images/logo-dynamicweb.png"; string logoHeight = !String.IsNullOrEmpty(Model.Area.Item.GetString("LogoHeight")) ? Model.Area.Item.GetString("LogoHeight") : "40"; logoHeight = logoHeight != "0" ? logoHeight : "40"; if (Path.GetExtension(logo).ToLower() != ".svg") { logo = "/Admin/Public/GetImage.ashx?height=" + logoHeight + "&amp;crop=5&amp;Compression=75&amp;image=" + logo; if (Pageview.Device.ToString() == "Mobile") { logoHeight = "40"; } } string mobileLogo = Model.Area.Item.GetItem("MobileTopLayout").GetFile("MobileLayoutLogo") != null ? Model.Area.Item.GetItem("MobileTopLayout").GetFile("MobileLayoutLogo").Path : "/Files/Images/logo-dynamicweb.png"; if (Path.GetExtension(mobileLogo).ToLower() != ".svg") { //mobileLogo = "/Admin/Public/GetImage.ashx?height=40&amp;crop=5&amp;Compression=75&amp;image=" + mobileLogo; } string wireframeMode = Model.Area.Item.GetBoolean("WireframeMode").ToString(); //Font settings string navigationFont = Model.Area.Item.GetItem("NavigationFont").GetGoogleFont("FontFamily").Family.Replace(" ", "+"); string mobileNavigationFont = Model.Area.Item.GetItem("MobileNavigationFont").GetGoogleFont("FontFamily").Family.Replace(" ", "+"); string headerFont = Model.Area.Item.GetItem("ContentLayoutHeaderFont").GetGoogleFont("FontFamily").Family.Replace(" ", "+"); string subHeaderFont = Model.Area.Item.GetItem("ContentLayoutSubheaderFont").GetGoogleFont("FontFamily").Family.Replace(" ", "+"); string contentFont = Model.Area.Item.GetItem("ContentLayoutBodyText").GetGoogleFont("FontFamily").Family.Replace(" ", "+"); string newStickersFont = Model.Area.Item.GetItem("NewStickersFont").GetGoogleFont("FontFamily").Family.Replace(" ", "+"); string customStickersFont = Model.Area.Item.GetItem("CustomStickersFont").GetGoogleFont("FontFamily").Family.Replace(" ", "+"); string toolsMenuFont = Model.Area.Item.GetItem("ToolsMenuFont").GetGoogleFont("FontFamily").Family.Replace(" ", "+"); string productListPriceFont = Model.Area.Item.GetItem("ProductListGeneral").GetItem("PriceFontDesign").GetGoogleFont("FontFamily").Family.Replace(" ", "+"); string productPagePriceFont = Model.Area.Item.GetItem("ProductDetails").GetItem("ProductDetailsPriceFontDesign").GetGoogleFont("FontFamily").Family.Replace(" ", "+"); string facetsHeaderFont = Model.Area.Item.GetItem("ProductCatalogFacets").GetItem("FacetsHeaderFont").GetGoogleFont("FontFamily").Family.Replace(" ", "+"); //Icons string cartIcon = !String.IsNullOrEmpty(Model.Area.Item.GetItem("Icons").GetList("CartIcon").SelectedValue) ? Model.Area.Item.GetItem("Icons").GetList("CartIcon").SelectedValue.ToLower() : "fas fa-shopping-cart"; searchIcon = !String.IsNullOrEmpty(Model.Area.Item.GetItem("Icons").GetList("SearchIcon").SelectedValue) ? Model.Area.Item.GetItem("Icons").GetList("SearchIcon").SelectedValue.ToLower() : "fas fa-search"; //Page IDs for use in the template int pageId = Model.TopPage.ID; string firstPageId = Model.Area.FirstActivePage.ID.ToString(); int cartPageId = GetPageIdByNavigationTag("CartPage"); int miniCartFeedPageId = GetPageIdByNavigationTag("MiniCartFeed"); int cartFeedPageId = GetPageIdByNavigationTag("CartOrderlinesFeed"); int impersonationPageId = GetPageIdByNavigationTag("Impersonation"); bool stickyMenu = Pageview.Device.ToString() == "Mobile" || Pageview.Device.ToString() == "Tablet" ? false : Model.Area.Item.GetBoolean("NavigationStickyMenu"); string stickyTop = stickyMenu ? "top-container--sticky" : ""; string pagePos = stickyMenu ? "js-page-pos" : ""; string topLayout = Model.Area.Item.GetList("LayoutTop").SelectedValue; string mobileTopLayout = !String.IsNullOrEmpty(Model.Area.Item.GetItem("MobileTopLayout").GetList("MobileLayoutTop").SelectedValue) ? Model.Area.Item.GetItem("MobileTopLayout").GetList("MobileLayoutTop").SelectedValue : "nav-left"; string mobileNavigationPosition = mobileTopLayout == "nav-left" || mobileTopLayout == "nav-search-left" ? "left" : "right"; bool renderPagesInToolBar = Model.Area.Item.GetBoolean("RenderPagesInToolBar"); string toolbarText = Model.Area.Item.GetString("ToolbarText"); bool onlyPreview = Model.Area.Item.GetBoolean("OnlyPreviewForAnonymous") && Model.CurrentUser.ID == 0; string headerButtonText = Model.Area.Item.GetString("HeaderButtonText"); string headerButtonLink = Model.Area.Item.GetString("HeaderButtonLink"); string headerButtonType = "btn--" + Model.Area.Item.GetList("HeaderButtonType").SelectedName.ToLower(); string autoCssLink = "/Files/Templates/Designs/Rapido/css/rapido/rapido_" + Model.Area.ID.ToString() + ".min.css?ticks=" + Model.Area.UpdatedDate.Ticks; bool useFontAwesomePro = Model.Area.Item.GetItem("Icons").GetString("UseFontAwesomePro") != null ? Model.Area.Item.GetItem("Icons").GetBoolean("UseFontAwesomePro") : false; string userInitials = ""; if (Model.CurrentUser.ID != 0) { if (!String.IsNullOrEmpty(Model.CurrentUser.Name)) { string[] names = Model.CurrentUser.Name.Split(' '); userInitials += Model.CurrentUser.Name.Substring(0, 1); if (names.Length > 1) { userInitials += names[names.Length - 1].Substring(0, 1); } } else { userInitials += Model.CurrentUser.FirstName != null && Model.CurrentUser.FirstName != "" ? Model.CurrentUser.FirstName.Substring(0, 1) : ""; userInitials += Model.CurrentUser.LastName != null && Model.CurrentUser.LastName != "" ? Model.CurrentUser.LastName.Substring(0, 1) : ""; userInitials += userInitials.Length == 1 && Model.CurrentUser.FirstName != null && Model.CurrentUser.FirstName.Length > 1 ? Model.CurrentUser.FirstName.Substring(1, 2) : ""; userInitials += userInitials == "" && Model.CurrentUser.Email != null && Model.CurrentUser.Email.Length > 1 ? Model.CurrentUser.Email.Substring(0, 2) : ""; userInitials += userInitials == "" ? Model.CurrentUser.UserName.Substring(0, 2) : ""; } } string siteURL = Dynamicweb.Context.Current.Request.Url.Scheme + "://" + Dynamicweb.Context.Current.Request.Url.Host; string businessPhotoPath = Model.Area.Item.GetFile("BusinessPhoto") != null ? Model.Area.Item.GetFile("BusinessPhoto").PathUrlEncoded : ""; string businessName = Model.Area.Item.GetString("BusinessName"); string businessLogo = Model.Area.Item.GetFile("BusinessLogo") != null ? Model.Area.Item.GetFile("BusinessPhoto").Path : ""; string openingHours = Model.Area.Item.GetString("OpeningHours"); var address = Model.Area.Item.GetItem("Address"); string streetAddress = ""; string addressLocality = ""; string addressRegion = ""; string postalCode = ""; string addressCountry = ""; if (address != null) { streetAddress = address.GetString("StreetAddress"); addressLocality = address.GetString("City"); addressRegion = address.GetString("Region"); postalCode = address.GetString("PostalCode"); addressCountry = address.GetString("Country"); } string contactEmail = Model.Area.Item.GetString("ContactEmail"); string contactNumber = Model.Area.Item.GetString("ContactNumber"); productsPageId = Converter.ToString(GetPageIdByNavigationTag("ProductsPage")); contentSearchPageId = Converter.ToString(GetPageIdByNavigationTag("ContentSearchResults")) + "&Areaid=" + Model.Area.ID; if (Model.Area.Item.GetList("TopSearch").SelectedValue == "contentSearch") { searchFeedId = Converter.ToString(GetPageIdByNavigationTag("ContentSearchFeed")) + "&Areaid=" + Model.Area.ID + "&pagesOnly=true"; resultPageId = contentSearchPageId; searchPlaceholder = Translate("Search page"); groupsFeedId = "0"; searchType = "content-search"; searchTemplate = "SearchPagesTemplate"; showGroups = false; } else if (Model.Area.Item.GetList("TopSearch").SelectedValue == "combinedSearch") { //data-search-second-feed-id searchFeedId = productsPageId + "&feed=true"; searchSecondFeedId = Converter.ToString(GetPageIdByNavigationTag("ContentSearchFeed")) + "&Areaid=" + Model.Area.ID + "&pagesOnly=true"; resultPageId = productsPageId; searchPlaceholder = Translate("Search products or pages"); groupsFeedId = Converter.ToString(GetPageIdByNavigationTag("ProductGroupsFeed")); searchType = "combined-search"; searchTemplate = "SearchProductsTemplateWrap"; searchContentTemplate = "SearchPagesTemplateWrap"; showGroups = Model.Area.Item.GetBoolean("ShowGroupsSelector"); } else { resultPageId = productsPageId; searchFeedId = productsPageId + "&feed=true"; groupsFeedId = Converter.ToString(GetPageIdByNavigationTag("ProductGroupsFeed")); searchPlaceholder = Translate("Search products"); searchTemplate = "SearchProductsTemplate"; searchType = "product-search"; showGroups = Model.Area.Item.GetBoolean("ShowGroupsSelector"); } } <!DOCTYPE html> <html lang="@Pageview.Area.CultureInfo.TwoLetterISOLanguageName"> <head> <meta charset="utf-8" /> <title>@Model.Title</title> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1"> <meta name="robots" content="index, follow"> @Model.MetaTags @if (!string.IsNullOrWhiteSpace(GoogleTagManagerID)) { <!-- Google Tag Manager --> <script> (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','@GoogleTagManagerID'); </script> <!-- End Google Tag Manager --> } <!-- Favicon --> <link href="@favicon" rel="icon" type="image/png"> <!-- Font awesome --> @* EGWBP.VIKING *@ @*if (useFontAwesomePro) { <link rel="stylesheet" href="/Files/Templates/Designs/Rapido/css/fonts/FontAwesomePro/css/fontawesome-all.min.css" type="text/css"> } else { <link rel="stylesheet" href="/Files/Templates/Designs/Rapido/css/fonts/FontAwesomeFree/css/fontawesome-all.min.css" type="text/css"> }*@ <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous"> @* END *@ <!-- Flag icon --> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/3.1.0/css/flag-icon.min.css" type="text/css"> <!-- Base (Default, wireframe) styles --> <link rel="stylesheet" href="/Files/Templates/Designs/Rapido/css/base/base.min.css" type="text/css"> <!-- Rapido Css from Website Settings --> <link id="rapidoCss" rel="stylesheet" href="@autoCssLink" type="text/css"> <!-- Ignite Css (Custom site specific styles) --> <link id="igniteCss" type="text/css" href="/Files/Templates/Designs/Rapido/css/ignite/ignite.min.css" rel="stylesheet"> <!-- Google fonts --> @{ var fonts = new string[11] { navigationFont, mobileNavigationFont, headerFont, subHeaderFont, contentFont, newStickersFont, customStickersFont, toolsMenuFont, productListPriceFont, productPagePriceFont, facetsHeaderFont }; var family = string.Join("%7C", fonts.Distinct().Select(x => string.Format("{0}:100,200,300,400,500,600,700,800,900", x))); } <link href="https://fonts.googleapis.com/css?family=@family" rel="stylesheet"> @*EGWBP.VIKING SOBJA*@ <!--[if lte IE8]> <script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/v2-legacy.js"></script> <![endif]--> <script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/v2.js"></script> @*END*@ @if (!string.IsNullOrEmpty(businessPhotoPath) && !string.IsNullOrEmpty(businessName) && !string.IsNullOrEmpty(streetAddress) && !string.IsNullOrEmpty(addressLocality) && !string.IsNullOrEmpty(addressRegion) && !string.IsNullOrEmpty(postalCode) && !string.IsNullOrEmpty(addressCountry)) { <script type="application/ld+json"> { "@@context": "http://schema.org", "@@type": "Organization", "name" : "@businessName", "url": "@siteURL" @if (Model.Area.Item.GetItems("FooterSocialLinks").Count > 0) { <text>,"sameAs" : [</text> @(string.Join(",", Model.Area.Item.GetItems("FooterSocialLinks").Select(x => '"' + x.GetString("Link") + '"'))) <text>]</text> } }, { "@@context": "http://schema.org", "@@type": "LocalBusiness", "image": [ "@siteURL/Admin/Public/GetImage.ashx?width=400&height=400&crop=0&Compression=75&DoNotUpscale=true&image=@businessPhotoPath", "@siteURL/Admin/Public/GetImage.ashx?width=400&height=300&crop=0&Compression=75&DoNotUpscale=true&image=@businessPhotoPath", "@siteURL/Admin/Public/GetImage.ashx?width=448&height=225&crop=0&Compression=75&DoNotUpscale=true&image=@businessPhotoPath" ], "@@id": "@siteURL", "url": "@siteURL" @if (!string.IsNullOrEmpty(openingHours)) { <text>,"openingHours": "@openingHours"</text> } @if (!string.IsNullOrEmpty(businessLogo)) { <text>,"logo": "@siteURL@businessLogo"</text> } ,"name": "@businessName", "address": { "@@type": "PostalAddress", "streetAddress": "@streetAddress", "addressLocality": "@addressLocality", "addressRegion": "@addressRegion", "postalCode": "@postalCode", "addressCountry": "@addressCountry" } @if (!string.IsNullOrEmpty(contactEmail)) { <text>,"email": "@Model.Area.Item.GetString("ContactEmail")"</text> } @if (!string.IsNullOrEmpty(contactNumber)) { <text>,"telephone": "@Model.Area.Item.GetString("ContactNumber")"</text> } } </script> } </head> <body> @if (!string.IsNullOrWhiteSpace(GoogleTagManagerID)) { <!-- Google Tag Manager (noscript) --> <noscript> <iframe src="https://www.googletagmanager.com/ns.html?id=@GoogleTagManagerID" height="0" width="0" style="display:none;visibility:hidden"></iframe> </noscript> <!-- End Google Tag Manager (noscript) --> } @MobileNavigation(userInitials, mobileNavigationPosition) @LoginModal() <main class="site dw-mod"> <header class="top-container @stickyTop dw-mod" id="Top"> @if (renderPagesInToolBar && Pageview.Device.ToString() != "Mobile" && Pageview.Device.ToString() != "Tablet") { <div class="tools-navigation dw-mod"> <div class="center-container grid top-container__center-container dw-mod"> <div class="grid__cell"> <div class="u-pull--left u-margin-top">@toolbarText</div> <div class="u-pull--right"> @RenderNavigation(new { id = "topToolsNavigation", cssclass = "menu menu-tools dw-mod dwnavigation", template = "TopMenu.xslt" }) </div> </div> </div> </div> } @if (Pageview.Device.ToString() != "Mobile" && Pageview.Device.ToString() != "Tablet") { switch (topLayout) { case "condensed": //2 <!-- Main navigation --> <nav class="main-navigation dw-mod"> <div class="center-container top-container__center-container grid grid--align-center dw-mod"> @RenderLogo(firstPageId, logo, businessName) @* Navigation *@ <div class="grid__col-auto grid__col--bleed u-reset-position"> @RenderHeaderNavigation() </div> <ul class="menu dw-mod"> @RenderSignIn("inNavigation", userInitials) @RenderLanguageSelector() @RenderFavorites() @RenderMiniCart() </ul> @if (!string.IsNullOrWhiteSpace(headerButtonLink)) { <div class="u-margin-left u-inline-block"> <a class="btn @headerButtonType dw-mod u-no-margin" href="@headerButtonLink">@headerButtonText</a> </div> } </div> </nav> <!-- Searchbar --> if (!Model.Area.Item.GetBoolean("NavigationItemsHideSearch")) { <div class="u-box-shadow u-color-light-gray--bg u-inline-block u-full-width"> <div class="center-container top-container__center-container dw-mod"> @RenderSearch() </div> </div> } break; case "minimal": //4 case "minimal-right": //5 string alignClass = topLayout == "minimal-right" ? "grid--align-end" : ""; <!-- Main navigation --> <nav class="main-navigation dw-mod"> <div class="center-container top-container__center-container grid grid--align-center dw-mod"> @RenderLogo(firstPageId, logo, businessName) @* Navigation *@ <div class="grid__col-auto grid__col--bleed u-reset-position @alignClass"> @RenderHeaderNavigation() </div> <ul class="menu dw-mod"> @if (!Model.Area.Item.GetBoolean("NavigationItemsHideSearch")) { @RenderMiniSearch() } @RenderSignIn("inNavigation", userInitials) @RenderLanguageSelector() @RenderFavorites() @RenderMiniCart() </ul> @if (!string.IsNullOrWhiteSpace(headerButtonLink)) { <div class="u-margin-left u-inline-block"> <a class="btn @headerButtonType dw-mod u-no-margin" href="@headerButtonLink">@headerButtonText</a> </div> } </div> </nav> break; case "two-lines": //6 case "two-lines-centered": //7 string justifyClass = topLayout == "two-lines-centered" ? "grid--justify-center" : "grid--justify-space-between"; <!-- Main navigation --> <nav class="main-navigation dw-mod"> <div class="center-container top-container__center-container grid @justifyClass dw-mod"> <div class="grid__col--bleed grid--align-center"> @RenderLogo(firstPageId, logo, businessName) </div> @* Navigation *@ <div> <div class="grid__cell u-reset-position"> @RenderHeaderNavigation() </div> </div> <div> <div class="grid grid--align-center"> <div class="grid__cell"> <ul class="menu dw-mod"> @if (!Model.Area.Item.GetBoolean("NavigationItemsHideSearch")) { @RenderMiniSearch() } @RenderSignIn("inNavigation", userInitials) @RenderLanguageSelector() @RenderFavorites() @RenderMiniCart() </ul> </div> @if (!string.IsNullOrWhiteSpace(headerButtonLink)) { <div class="u-margin-left u-inline-block grid__cell"> <a class="btn @headerButtonType dw-mod u-no-margin" href="@headerButtonLink">@headerButtonText</a> </div> } </div> </div> </div> </nav> break; case "splitted": //3 <!-- Header --> <div class="header header-top dw-mod"> <div class="center-container top-container__center-container grid grid--align-center dw-mod"> @* Logo *@ @RenderLogo(firstPageId, logo, businessName) @if (!Model.Area.Item.GetBoolean("NavigationItemsHideSearch")) { @* Search *@ <div class="grid--align-end grid__col-auto grid__col--bleed"> <div class="typeahead u-no-margin u-margin-top u-margin-bottom u-color-inherit js-typeahead" data-page-size="7" id="TopProductSearch" data-search-feed-id="@searchFeedId" data-search-second-feed-id="@searchSecondFeedId" data-result-page-id="@resultPageId" data-groups-page-id="@groupsFeedId" data-search-type="@searchType"> @RenderSearch("right") </div> </div> } </div> </div> <!-- Main navigation --> <nav class="main-navigation dw-mod"> <div class="center-container top-container__center-container grid grid--align-center dw-mod"> <div class="grid__col-auto grid__col--bleed u-reset-position"> @RenderHeaderNavigation() </div> <ul class="menu dw-mod"> @RenderSignIn("inNavigation", userInitials) @RenderLanguageSelector() @RenderFavorites() @if (!onlyPreview) { @RenderMiniCart() } </ul> @if (!string.IsNullOrWhiteSpace(headerButtonLink)) { <div class="u-margin-left u-inline-block"> <a class="btn @headerButtonType dw-mod u-no-margin" href="@headerButtonLink">@headerButtonText</a> </div> } </div> </nav> break; case "normal": //1 default: <!-- Header --> <div class="header header-top dw-mod"> <div class="center-container top-container__center-container grid grid--align-center dw-mod"> @* Logo *@ @RenderLogo(firstPageId, logo, businessName) @if (!Model.Area.Item.GetBoolean("NavigationItemsHideSearch")) { @* Search *@ <div class="grid__col-auto grid__col--bleed"> @RenderSearch() </div> } <ul class="menu dw-mod"> @RenderSignIn("outsideNavigation", userInitials) @RenderLanguageSelector("outsideNavigation") @RenderFavorites("outsideNavigation") @if (!onlyPreview) { @RenderMiniCart("outsideNavigation") } </ul> @if (!string.IsNullOrWhiteSpace(headerButtonLink)) { <div class="u-margin-left u-inline-block"> <a class="btn @headerButtonType dw-mod u-no-margin" href="@headerButtonLink">@headerButtonText</a> </div> } </div> </div> <!-- Main navigation --> <nav class="main-navigation dw-mod"> <div class="center-container top-container__center-container grid dw-mod"> <div> @RenderHeaderNavigation() </div> </div> </nav> break; } } else { string style = (topLayout == "normal" || topLayout == "splitted" ? "main-navigation--top-style" : "main-navigation--nav-style"); switch (mobileTopLayout) { case "nav-left": <nav class="main-navigation-mobile dw-mod"> <div class="center-container top-container__center-container dw-mod"> <div class="grid"> @MobileNavigationTrigger() <div class="logo u-middle dw-mod"> <a href="/Default.aspx?ID=@firstPageId"> <img class="grid__cell-img logo__img dw-mod" src="@mobileLogo" alt="@businessName" /> </a> </div> <ul class="menu dw-mod u-pull--right"> @if (!Model.Area.Item.GetBoolean("NavigationItemsHideSearch")) { <li class="menu__item menu__item--horizontal menu__item--top-level dw-mod"> <label for="MobileSearchTrigger" class="menu__link dw-mod"> <i class="@searchIcon fa-1_5x"></i> </label> </li> } @if (!onlyPreview) { @RenderMiniCart() } </ul> </div> </div> </nav> break; case "nav-right": <nav class="main-navigation-mobile dw-mod"> <div class="center-container top-container__center-container dw-mod"> <div class="grid"> <div class="logo u-middle dw-mod"> <a href="/Default.aspx?ID=@firstPageId"> <img class="grid__cell-img logo__img dw-mod" src="@mobileLogo" alt="@businessName" /> </a> </div> <ul class="menu dw-mod u-pull--right"> @if (!Model.Area.Item.GetBoolean("NavigationItemsHideSearch")) { <li class="menu__item menu__item--horizontal menu__item--top-level dw-mod"> <label for="MobileSearchTrigger" class="menu__link dw-mod"> <i class="@searchIcon fa-1_5x"></i> </label> </li> } @if (!onlyPreview) { @RenderMiniCart() } </ul> @MobileNavigationTrigger() </div> </div> </nav> break; case "nav-search-left": <nav class="main-navigation-mobile dw-mod"> <div class="center-container top-container__center-container dw-mod"> <div class="grid"> @MobileNavigationTrigger() @if (!Model.Area.Item.GetBoolean("NavigationItemsHideSearch")) { <ul class="menu dw-mod u-pull--right"> <li class="menu__item menu__item--horizontal menu__item--top-level dw-mod"> <label for="MobileSearchTrigger" class="menu__link dw-mod"> <i class="@searchIcon fa-1_5x"></i> </label> </li> </ul> } <div class="logo u-middle dw-mod"> <a href="/Default.aspx?ID=@firstPageId"> <img class="grid__cell-img logo__img dw-mod" src="@mobileLogo" alt="@businessName" /> </a> </div> @if (!onlyPreview) { <ul class="menu dw-mod u-pull--right"> @RenderMiniCart() </ul> } </div> </div> </nav> break; case "search-left": <nav class="main-navigation-mobile dw-mod"> <div class="center-container top-container__center-container dw-mod"> <div class="grid"> @if (!Model.Area.Item.GetBoolean("NavigationItemsHideSearch")) { <ul class="menu dw-mod u-pull--right"> <li class="menu__item menu__item--horizontal menu__item--top-level dw-mod"> <label for="MobileSearchTrigger" class="menu__link dw-mod"> <i class="@searchIcon fa-1_5x"></i> </label> </li> </ul> } <div class="logo u-middle dw-mod"> <a href="/Default.aspx?ID=@firstPageId"> <img class="grid__cell-img logo__img dw-mod" src="@mobileLogo" alt="@businessName" /> </a> </div> @if (!onlyPreview) { <ul class="menu dw-mod u-pull--right"> @RenderMiniCart() </ul> } @MobileNavigationTrigger() </div> </div> </nav> break; } @* Mobile search *@ if (!Model.Area.Item.GetBoolean("NavigationItemsHideSearch")) { <input type="checkbox" id="MobileSearchTrigger" class="mobile-search-trigger" /> <div class="main-navigation-mobile typeahead-mobile dw-mod"> @if (mobileNavigationPosition == "left") { <div class="menu dw-mod u-pull--left"> <div class="menu__item menu__item--horizontal menu__item--top-level dw-mod"> <label for="MobileNavTrigger" class="mobile-nav-trigger-button menu__link dw-mod"></label> </div> </div> } else { <ul class="menu dw-mod u-pull--left"> <li class="menu__item menu__item--horizontal menu__item--top-level dw-mod"> <label for="MobileSearchTrigger" class="menu__link dw-mod"> <i class="fas fa-times fa-1_5x"></i> </label> </li> </ul> } <div> <div class="typeahead-mobile__search-field dw-mod js-typeahead" data-page-size="@(searchType == "combined-search" ? 4 : 8)" id="MobileProductSearch" data-search-feed-id="@searchFeedId" data-search-second-feed-id="@searchSecondFeedId" data-result-page-id="@resultPageId" data-search-type="@searchType"> @* EGWBP.VIKING *@ <input type="search" class="js-typeahead-search-field u-no-margin" placeholder="@searchPlaceholder" value="@searchValue"> @* END *@ @if (string.IsNullOrEmpty(searchSecondFeedId)) { <ul class="dropdown dropdown--absolute-position u-min-w220px u-full-width js-handlebars-root js-typeahead-search-content dw-mod" id="MobileProductSearchBarContent" data-template="@searchTemplate" data-json-feed="/Default.aspx?ID=@searchFeedId&feedType=productsOnly" data-init-onload="false"></ul> } else { <div class="dropdown dropdown--absolute-position dropdown--combined grid dropdown--combined-mobile grid"> <div class="js-handlebars-root js-typeahead-search-content grid__col-sm-7 grid__col--bleed-y" id="MobileProductSearchBarContent" data-template="@searchTemplate" data-json-feed="/Default.aspx?ID=@searchFeedId&feedType=productsOnly" data-init-onload="false"></div> <div class="js-handlebars-root js-typeahead-additional-search-content grid__col-sm-5 grid__col--bleed-y" id="MobileContentSearchBarContent" data-template="@searchContentTemplate" data-json-feed="/Default.aspx?ID=@searchSecondFeedId" data-init-onload="false"></div> </div> } <button type="button" class="btn btn--condensed btn--primary u-no-margin dw-mod js-typeahead-enter-btn"><i class="@searchIcon"></i></button> </div> </div> @if (mobileNavigationPosition == "right") { <div class="menu dw-mod u-pull--right"> <div class="menu__item menu__item--horizontal menu__item--top-level dw-mod"> <label for="MobileNavTrigger" class="mobile-nav-trigger-button menu__link dw-mod"></label> </div> </div> } else { <ul class="menu dw-mod u-pull--right"> <li class="menu__item menu__item--horizontal menu__item--top-level dw-mod"> <label for="MobileSearchTrigger" class="menu__link dw-mod"> <i class="fas fa-times fa-1_5x"></i> </label> </li> </ul> } </div> } } @* Impersonation bar *@ @if (Model.CurrentUser.ID > 0 && Model.SecondaryUsers.Count > 0) { <div class="u-color-warning--bg"> <div class="center-container top-container__center-container dw-mod"> @*Impersonation*@ <div class="grid"> <div class="grid--align-self-center grid__col-x"> @if (Model.CurrentSecondaryUser != null && Model.CurrentSecondaryUser.ID > 0) { string stopImpersonateTranslation = Translate("Stop impersonation"); string username = ""; if (!string.IsNullOrEmpty(Model.CurrentSecondaryUser.FirstName) && !string.IsNullOrEmpty(Model.CurrentSecondaryUser.LastName)) { username = Model.CurrentSecondaryUser.FirstName + " " + Model.CurrentSecondaryUser.LastName; } else if (!string.IsNullOrEmpty(Model.CurrentSecondaryUser.Name)) { username = Model.CurrentSecondaryUser.Name; } else if (!string.IsNullOrEmpty(Model.CurrentSecondaryUser.Email)) { username = Model.CurrentSecondaryUser.Email; } else { username = Model.CurrentSecondaryUser.UserName; } <div class="grid-cell"> <div class="u-pull--left u-bold u-margin-top"> <i class="fas fa-user-secret"></i> @username<text>&nbsp;</text>@Translate("is impersonating")<text>&nbsp;</text>@Pageview.User.UserName </div> <form method="post" class="u-pull--right u-no-margin"> <input type="submit" class="btn btn--secondary dw-mod u-no-margin" name="DwExtranetRemoveSecondaryUser" value="@stopImpersonateTranslation"> </form> </div> } else { string viewListTranslation = Translate("View the list of users you can impersonate"); <div class="grid-cell u-bold"> <i class="fas fa-user-secret"></i> <a href="/Default.aspx?ID=@impersonationPageId" title="@viewListTranslation" class="u-color-font-black">@viewListTranslation</a> </div> } </div> </div> </div> </div> } </header> <!-- Floating mini cart --> @if (!Model.Area.Item.GetBoolean("NavigationItemsHideCart")) { if (!onlyPreview && !stickyMenu && Converter.ToString(pageId) == productsPageId && Pageview.Device.ToString() != "Mobile" && Pageview.Device.ToString() != "Tablet") { <div class="floating-mini-cart u-hidden dw-mod" id="FloatingMiniCart"> <div class="mini-cart dw-mod"> <a href="/Default.aspx?ID=@cartPageId&Purge=True" class="menu-tools__link menu__link--condensed dw-mod js-mini-cart-button" onmouseover="Cart.UpdateMiniCart(event, 'SecondaryMiniCart', '/Default.aspx?ID=@miniCartFeedPageId&feedType=MiniCart')"> <i class="@cartIcon fa-4x"></i> <div class="mini-cart__counter mini-cart__counter--lg dw-mod"> <div class="js-handlebars-root js-mini-cart-counter" id="FloatingCartCounter" data-template="MiniCartCounterContent" data-json-feed="/Default.aspx?ID=@miniCartFeedPageId&feedType=Counter" data-preloader="false" data-init-onload="false"> <div class="js-mini-cart-counter-content"> @Model.Cart.TotalProductsCount </div> </div> </div> </a> <div class="mini-cart-dropdown js-handlebars-root js-mini-cart dw-mod" id="SecondaryMiniCart" data-template="MiniCartContent" data-cart-id="@miniCartFeedPageId" data-json-feed="/Default.aspx?ID=@miniCartFeedPageId&feedType=MiniCart" data-init-onload="false"></div> </div> </div> } } <!-- Render the content --> <div id="Page" class="page @pagePos"> <section class="center-container content-container dw-mod" id="content"> @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> @{ string columnClass = "12"; bool isProductPage = HttpContext.Current.Request.QueryString.Get("ProductID") != null ? true : false; string backgroundColorClass = Model.PropertyItem.GetString("BackgroundColor") != null && !isProductPage ? "u-" + Model.PropertyItem.GetList("BackgroundColor").SelectedValue + "--bg" : ""; } @if (Model.PropertyItem.GetList("ShowBreadcrumb").SelectedValue == "True") { <div class="grid__col-12 grid__col--bleed-y"> @RenderNavigation(new { id = "breadcrumb", template = "Breadcrumb.xslt" }) </div> } <div class="grid"> @if (Model.PropertyItem.GetList("LeftMenu") != null && Model.PropertyItem.GetList("LeftMenu").SelectedValue == "True" && (Pageview.Page.NavigationSettings == null || !Pageview.Page.NavigationSettings.UseEcomGroups)) { var navigationMarkup = RenderNavigation(new { id = "leftnav", cssclass = "dwnavigation", startLevel = 2, expandmode = "all", endlevel = 5, template = "LeftNavigation.xslt" }); if (!string.IsNullOrEmpty(navigationMarkup)) { <nav class="grid__col-md-3"> <div class="grid__cell"> @navigationMarkup </div> </nav> columnClass = "9"; } } <div class="grid__col-md-@columnClass grid__col--bleed"> <div class="grid"> @Model.Placeholder("dwcontent", "content", "default:true;sort:1") </div> </div> </div> @* Very small hack to make it cleanly, and easily possible to change the background color on a single page *@ @if (backgroundColorClass != "") { <script> document.getElementById("Page").classList.add("@backgroundColorClass"); </script> } </section> </div> </main> @RenderFooter() @helper RenderLogo(string pageId, string src, string alt) { <div class="logo dw-mod"> <a href="/Default.aspx?ID=@pageId" class="logo__img dw-mod u-block"> <img class="grid__cell-img logo__img dw-mod" src="@src" alt="@alt" /> </a> </div> } @helper RenderSearch(string alignment = "left") { <div class="typeahead typeahead--centered u-color-inherit js-typeahead dw-mod" data-page-size="7" id="ProductSearchBar" data-search-feed-id="@searchFeedId" data-search-second-feed-id="@searchSecondFeedId" data-result-page-id="@resultPageId" data-groups-page-id="@groupsFeedId" data-search-type="@searchType"> @if (showGroups) { <button type="button" class="btn btn--condensed u-color-light-gray--bg typeahead-group-btn dw-mod js-typeahead-groups-btn" data-group-id="all">@Translate("All")</button> <ul class="dropdown dropdown--absolute-position u-min-w220px js-handlebars-root js-typeahead-groups-content dw-mod" id="ProductSearchBarGroupsContent" data-template="SearchGroupsTemplate" data-json-feed="/Default.aspx?ID=@groupsFeedId&feedType=productGroups" data-init-onload="false" data-preloader="minimal"></ul> } <div class="typeahead-search-field"> @* EGWBP.VIKING *@ <input type="search" class="u-no-margin u-full-width u-full-height js-typeahead-search-field" placeholder="@searchPlaceholder" value="@searchValue"> @* END *@ @if (string.IsNullOrEmpty(searchSecondFeedId)) { <ul class="dropdown dropdown--absolute-position u-min-w220px u-full-width js-handlebars-root js-typeahead-search-content dw-mod" id="ProductSearchBarContent" data-template="@searchTemplate" data-json-feed="/Default.aspx?ID=@searchFeedId&feedType=productsOnly" data-init-onload="false"></ul> } else { <div class="dropdown dropdown--absolute-position dropdown--combined grid @(alignment == "right" ? "dropdown--right-aligned" : "")"> <div class="js-handlebars-root js-typeahead-search-content grid__col-sm-7 grid__col--bleed-y" id="ProductSearchBarContent" data-template="@searchTemplate" data-json-feed="/Default.aspx?ID=@searchFeedId&feedType=productsOnly" data-init-onload="false"></div> <div class="js-handlebars-root js-typeahead-additional-search-content grid__col-sm-5 grid__col--bleed-y" id="ContentSearchBarContent" data-template="@searchContentTemplate" data-json-feed="/Default.aspx?ID=@searchSecondFeedId" data-init-onload="false"></div> </div> } </div> <button type="button" class="btn btn--condensed btn--primary u-no-margin dw-mod js-typeahead-enter-btn"><i class="@searchIcon"></i></button> </div> } @helper RenderMiniSearch() { //EGWBP.VIKING SOBJA - Changed onmouseover from onmouseover="document.getElementById('headerSearch').focus()" <li class="menu__item menu__item--horizontal menu__item--top-level u-hidden-xxs is-dropdown is-dropdown--no-icon dw-mod" onmouseover="showSearch()" > <div class="menu__link u-w50px dw-mod" onmouseleave="hideSearch()"> <i class="@searchIcon fa-1_5x"></i> </div> <div class="menu menu--dropdown u-w380px top-micro-search dw-mod" id="headerDropdown" > <div class="typeahead js-typeahead" data-page-size="7" id="ProductSearchBar" data-search-feed-id="@searchFeedId" data-search-second-feed-id="@searchSecondFeedId" data-result-page-id="@resultPageId" data-search-type="@searchType"> <div class="typeahead-search-field"> @* EGWBP.VIKING *@ <input type="search" class="u-no-margin u-full-width js-typeahead-search-field" id="headerSearch" placeholder="@searchPlaceholder" value="@searchValue" onmouseover="stopTimer()" onmouseout="hideSearch()"> @* END *@ @if (string.IsNullOrEmpty(searchSecondFeedId)) { <ul class="dropdown dropdown--absolute-position u-min-w220px u-full-width js-handlebars-root js-typeahead-search-content dw-mod" id="ProductSearchBarContent" data-template="@searchTemplate" data-json-feed="/Default.aspx?ID=@searchFeedId&feedType=productsOnly" data-init-onload="false" onmouseover="stopTimer()"></ul> } else { <div class="dropdown dropdown--absolute-position dropdown--combined grid dropdown--right-aligned"> <div class="js-handlebars-root js-typeahead-search-content grid__col-sm-7 grid__col--bleed-y" id="ProductSearchBarContent" data-template="@searchTemplate" data-json-feed="/Default.aspx?ID=@searchFeedId&feedType=productsOnly" data-init-onload="false"></div> <div class="js-handlebars-root js-typeahead-additional-search-content grid__col-sm-5 grid__col--bleed-y" id="ContentSearchBarContent" data-template="@searchContentTemplate" data-json-feed="/Default.aspx?ID=@searchSecondFeedId" data-init-onload="false"></div> </div> } </div> </div> </div> </li> } <!-- Content rendering helpers --> @helper MobileNavigation(string userInitials, string position) { int pageId = Model.TopPage.ID; string mobileNavigationLevels = Model.Area.Item.GetBoolean("MobileNavigationLevels") ? Model.Area.Item.GetString("MobileNavigationLevels") : "3"; bool showCreateAccountLink = Model.Area.Item.GetBoolean("ShowCreateAccountLink"); string userIcon = !String.IsNullOrEmpty(Model.Area.Item.GetItem("Icons").GetList("SignInProfileIcon").SelectedValue) ? Model.Area.Item.GetItem("Icons").GetList("SignInProfileIcon").SelectedValue.ToLower() : "fas fa-user"; string favoriteIcon = !String.IsNullOrEmpty(Model.Area.Item.GetItem("Icons").GetList("FavoriteIcon").SelectedValue) ? "fas fa-" + Model.Area.Item.GetItem("Icons").GetList("FavoriteIcon").SelectedValue.ToLower() : "fas fa-star"; string languageIcon = !String.IsNullOrEmpty(Model.Area.Item.GetItem("Icons").GetList("LanguageIcon").SelectedValue) ? Model.Area.Item.GetItem("Icons").GetList("LanguageIcon").SelectedValue.ToLower() : "fas fa-globe"; int miniCartFeedPageId = GetPageIdByNavigationTag("MiniCartFeed"); int cartFeedPageId = GetPageIdByNavigationTag("CartOrderlinesFeed"); int createAccountPageId = GetPageIdByNavigationTag("CreateAccount"); string myProfilePageId = (Model.CurrentUser.ID <= 0) ? GetPageIdByNavigationTag("SignInPage").ToString() + "&RedirectPageId=" + GetPageIdByNavigationTag("CustomerProfile").ToString() : GetPageIdByNavigationTag("CustomerProfile").ToString(); string myOrdersPageId = (Model.CurrentUser.ID <= 0) ? GetPageIdByNavigationTag("SignInPage").ToString() + "&RedirectPageId=" + GetPageIdByNavigationTag("CustomerOrders").ToString() : GetPageIdByNavigationTag("CustomerOrders").ToString(); string myFavoritesPageId = (Model.CurrentUser.ID <= 0) ? GetPageIdByNavigationTag("SignInPage").ToString() + "&RedirectPageId=" + GetPageIdByNavigationTag("CustomerFavorites").ToString() : GetPageIdByNavigationTag("CustomerFavorites").ToString(); bool showMyProfileLink = Model.Area.Item.GetBoolean("ShowMyProfileLink"); bool showMyOrdersLink = Model.Area.Item.GetBoolean("ShowMyOrdersLink"); bool showMyFavoritesLink = Model.Area.Item.GetBoolean("ShowMyFavoritesLink"); bool renderPagesInToolBar = Model.Area.Item.GetBoolean("RenderPagesInToolBar"); bool isSlidesDesign = Model.Area.Item.GetList("MobileNavigationDesign").SelectedValue == "Slides"; string menuTemplate = isSlidesDesign ? "BaseMenuForMobileSlides.xslt" : "BaseMenuForMobileExpandable.xslt"; int startLevel = renderPagesInToolBar ? 1 : 0; bool onlyPreview = Model.Area.Item.GetBoolean("OnlyPreviewForAnonymous") && Model.CurrentUser.ID == 0; string groupID = HttpContext.Current.Request.QueryString.Get("groupid") != null ? HttpContext.Current.Request.QueryString.Get("groupid") : string.Empty; string productID = HttpContext.Current.Request.QueryString.Get("ProductID") != null ? HttpContext.Current.Request.QueryString.Get("ProductID") : string.Empty; string colorID = HttpContext.Current.Request.QueryString.Get("colorid") != null ? HttpContext.Current.Request.QueryString.Get("colorid") : string.Empty; if (Pageview.Device.ToString() == "Mobile" || Pageview.Device.ToString() == "Tablet") { <!-- Trigger for mobile navigation --> <input type="checkbox" id="MobileNavTrigger" class="mobile-nav-trigger mobile-nav-trigger--@position" autocomplete="off" /> <!-- Mobile navigation --> <nav class="mobile-navigation mobile-navigation--@position dw-mod"> @if (Model.CurrentUser.ID > 0) { string userName = Model.CurrentUser.FirstName != null ? Model.CurrentUser.FirstName : ""; userName += " " + Model.CurrentUser.LastName != null ? Model.CurrentUser.LastName : ""; userName += userName == "" && Model.CurrentUser.UserName != null ? Model.CurrentUser.UserName : ""; <ul class="menu menu-mobile"> <li class="menu-mobile__item"> <a href="/default.aspx?ID=@myProfilePageId" class="menu-mobile__link dw-mod"><i class="@userIcon menu-mobile__link-icon"></i> @userName</a> </li> </ul> } @RenderNavigation(new { id = "mobilenavigation", cssclass = "menu menu-mobile dwnavigation", startLevel = @startLevel, ecomStartLevel = @startLevel+1, endlevel = @mobileNavigationLevels, expandmode = "all", template = @menuTemplate }) @if (renderPagesInToolBar) { @RenderNavigation(new { id = "topToolsMobileNavigation", cssclass = "menu menu-mobile dwnavigation", template = "ToolsMenuForMobile.xslt" }) } <ul class="menu menu-mobile"> @if (!Model.Area.Item.GetBoolean("NavigationItemsHideSignIn")) { if (Model.CurrentUser.ID <= 0) { <li class="menu-mobile__item"> <label for="SignInModalTrigger" onclick="document.getElementById('MobileNavTrigger').checked = false;" class="menu-mobile__link dw-mod menu-mobile__link--highlighted"><i class="@userIcon menu-mobile__link-icon"></i> @Translate("Sign in")</label> </li> if (showCreateAccountLink) { <li class="menu-mobile__item"> <a class="menu-mobile__link menu-mobile__link--highlighted dw-mod" href="/Default.aspx?ID=@createAccountPageId"><i class="@userIcon menu-mobile__link-icon"></i> @Translate("Create account")</a> </li> } } else { if (showMyProfileLink) { <li class="menu-mobile__item"> <a href="/default.aspx?ID=@myProfilePageId" class="menu-mobile__link menu-mobile__link--highlighted dw-mod"><i class="@userIcon menu-mobile__link-icon"></i> @Translate("My Profile")</a> </li> } if (showMyOrdersLink) { <li class="menu-mobile__item"> <a href="/default.aspx?ID=@myOrdersPageId" class="menu-mobile__link menu-mobile__link--highlighted dw-mod"><i class="fas fa-list menu-mobile__link-icon"></i> @Translate("My Orders")</a> </li> } if (showMyFavoritesLink) { <li class="menu-mobile__item"> <a href="/default.aspx?ID=@myFavoritesPageId" class="menu-mobile__link menu-mobile__link--highlighted dw-mod"><i class="@favoriteIcon menu-mobile__link-icon"></i> @Translate("My Favorites")</a> </li> } <li class="menu-mobile__item"> <a class="menu-mobile__link menu-mobile__link--highlighted dw-mod" href="/Admin/Public/ExtranetLogoff.aspx?ID=@pageId"><i class="@userIcon menu-mobile__link-icon"></i> @Translate("Sign out")</a> </li> } } @if (Model.Languages.Count > 0) { string selectedLanguage = ""; foreach (var lang in Model.Languages) { if (lang.IsCurrent) { selectedLanguage = lang.Name; } } <li class="menu-mobile__item dw-mod"> <input id="MobileMenuCheck_Language" type="checkbox" class="expand-trigger"> <div class="menu-mobile__link__wrap"> <label for="MobileMenuCheck_Language" class="menu-mobile__link menu-mobile__link--highlighted dw-mod"><i class="@languageIcon menu-mobile__link-icon"></i> @selectedLanguage</label> <label for="MobileMenuCheck_Language" class="menu-mobile__trigger"></label> </div> <ul class="menu-mobile menu-mobile__submenu expand-menu"> @if (isSlidesDesign) { <li class="menu-mobile__item dw-mod"> <div class="menu-mobile__link__wrap"> <label for="MobileMenuCheck_Language" class="menu-mobile__trigger menu-mobile__trigger--back"></label> <label for="MobileMenuCheck_Language" class="menu-mobile__link dw-mod ">Back</label> </div> </li> } @foreach (var lang in Model.Languages) { string url = string.Format("/Default.aspx?ID={0}", lang.Page.ID); if (!String.IsNullOrEmpty(groupID)) { url = url + "&groupid=" + groupID; } if (!String.IsNullOrEmpty(productID)) { url = url + "&ProductId=" + productID; } if (!String.IsNullOrEmpty(colorID)) { url = url + "&colorid=" + colorID; } <li class="menu-mobile__item dw-mod"> <a class="menu-mobile__link menu-mobile__link--highlighted dw-mod menu-mobile__link--level-1" href="@url">@lang.Name</a> </li> } </ul> </li> } </ul> </nav> <label class="mobile-nav-trigger-off" for="MobileNavTrigger"></label> if (!onlyPreview) { <div class="u-visually-hidden js-handlebars-root js-mini-cart" id="miniCart" data-template="MiniCartContent" data-cart-id="@cartFeedPageId" data-json-feed="/Default.aspx?ID=@miniCartFeedPageId&feedType=MiniCart" data-init-onload="false"></div> } } } @helper LoginModal() { int pageId = Model.TopPage.ID; string topLayout = Model.Area.Item.GetList("LayoutTop").SelectedValue; int createAccountPageId = GetPageIdByNavigationTag("CreateAccount"); int signInProfilePageId = GetPageIdByNavigationTag("SignInPage"); string forgotPasswordPageId = signInProfilePageId.ToString() + "&LoginAction=Recovery"; string userSignedInError = !Model.LogOnFailed ? "" : "checked"; string userSignedInErrorText = ""; if (Model.LogOnFailed) { switch (Model.LogOnFailedReason) { case Dynamicweb.Security.UserManagement.LogOnFailedReason.PasswordLengthInvalid: userSignedInErrorText = Translate("Password length is invalid"); break; case Dynamicweb.Security.UserManagement.LogOnFailedReason.IncorrectLogin: userSignedInErrorText = Translate("Invalid email or password"); break; case Dynamicweb.Security.UserManagement.LogOnFailedReason.ExceededFailedLogOnLimit: userSignedInErrorText = Translate("You have exceeded the limit of allowed login attempts. The user account is temporarily locked"); break; case Dynamicweb.Security.UserManagement.LogOnFailedReason.LoginLocked: userSignedInErrorText = Translate("The user account is temporarily locked"); break; case Dynamicweb.Security.UserManagement.LogOnFailedReason.PasswordExpired: userSignedInErrorText = Translate("The password has expired and needs to be renewed"); break; default: userSignedInErrorText = Translate("An unknown error occured"); break; } } <!-- Trigger for the login modal --> <input type="checkbox" id="SignInModalTrigger" class="modal-trigger @topLayout" @userSignedInError /> <!-- Login modal --> <div class="modal-container"> <label for="SignInModalTrigger" id="SignInModalOverlay" class="modal-overlay"></label> <div class="modal modal--xs" id="SignInModal"> <div class="modal__header"> <h2>@Translate("Sign in")</h2> </div> <div class="modal__body"> <form method="post" id="LoginForm" class="u-no-margin"> <input type="hidden" name="ID" value="@pageId" /> <input type="hidden" name="DWExtranetUsernameRemember" value="True" /> <input type="hidden" name="DWExtranetPasswordRemember" value="True" /> <input type="text" class="u-full-width" id="LoginUsername" name="username" placeholder="@Translate("Email")" /> <input type="password" class="u-full-width" id="LoginPassword" name="password" placeholder="@Translate("Password")" /> <div class="field-error dw-mod">@userSignedInErrorText</div> <label> <input type="checkbox" id="RememberMe" name="Autologin" checked="checked" value="True"> <span>@Translate("Remember me", "Remember me")</span> </label> <button type="submit" class="btn btn--primary btn--full dw-mod" name="LoginAction" value="Login" onclick="Buttons.LockButton(event)">@Translate("Sign in")</button> <a class="btn btn--link-clean dw-mod" href="/Default.aspx?id=@forgotPasswordPageId">@Translate("Forgot your password?", "Forgot your password?")</a> <a class="btn btn--link-clean dw-mod" href="/default.aspx?ID=@createAccountPageId">@Translate("Create account")?</a> </form> </div> </div> </div> } @helper RenderHeaderNavigation() { bool megaMenu = Model.Area.Item.GetList("NavigationMegaMenu").SelectedValue.ToLower() == "true" ? true : false; string megamenuPromotionImage = Model.Area.Item.GetFile("NavigationMegamenuPromotionImage") != null ? Model.Area.Item.GetFile("NavigationMegamenuPromotionImage").PathUrlEncoded : ""; bool renderPagesInToolBar = Model.Area.Item.GetBoolean("RenderPagesInToolBar"); int startLevel = renderPagesInToolBar ? 1 : 0; if (Pageview.Device.ToString() != "Mobile" && Pageview.Device.ToString() != "Tablet") { if (!megaMenu) { @RenderNavigation(new { id = "topnavigation", cssclass = "menu dw-mod dwnavigation u-full-max-width", startLevel = @startLevel, ecomStartLevel = @startLevel+1, endlevel = 5, expandmode="all", template = "BaseMenuWithDropdown.xslt" }); } else { @RenderNavigation(new { id = "topnavigation", cssclass = "menu dw-mod dwnavigation u-full-max-width", startLevel = @startLevel, ecomStartLevel = @startLevel+1, endlevel = 5, promotionImage = megamenuPromotionImage, promotionLink = Model.Area.Item.GetString("NavigationMegamenuPromotionLink"), expandmode = "all", template = "BaseMegaMenu.xslt" }); } } } @helper MobileNavigationTrigger() { @* Mobile navigation trigger *@ if (Pageview.Device.ToString() == "Mobile" || Pageview.Device.ToString() == "Tablet") { <div class="menu dw-mod u-pull--left"> <div class="menu__item menu__item--horizontal menu__item--top-level dw-mod"> <label for="MobileNavTrigger" class="mobile-nav-trigger-button menu__link dw-mod"></label> </div> </div> } } @helper RenderLanguageSelector(string type = "inNavigation") { string liClasses = type == "inNavigation" ? "menu__item menu__item--horizontal menu__item--top-level dw-mod u-hidden-xxs" : "menu__item menu__item--horizontal menu--clean dw-mod"; string menuLinkClass = type == "inNavigation" ? "menu__link" : "header-menu__link"; string languageIcon = !String.IsNullOrEmpty(Model.Area.Item.GetItem("Icons").GetList("LanguageIcon").SelectedValue) ? Model.Area.Item.GetItem("Icons").GetList("LanguageIcon").SelectedValue.ToLower() : "fas fa-globe"; string languageViewType = !String.IsNullOrEmpty(Model.Area.Item.GetList("LanguageSelectorViewType").SelectedValue) ? Model.Area.Item.GetList("LanguageSelectorViewType").SelectedValue.ToLower() : ""; string groupID = HttpContext.Current.Request.QueryString.Get("groupid") != null ? HttpContext.Current.Request.QueryString.Get("groupid") : string.Empty; string productID = HttpContext.Current.Request.QueryString.Get("ProductID") != null ? HttpContext.Current.Request.QueryString.Get("ProductID") : string.Empty; string colorID = HttpContext.Current.Request.QueryString.Get("colorid") != null ? HttpContext.Current.Request.QueryString.Get("colorid") : string.Empty; @* Language selector *@ if (Model.Languages.Count > 1) { <li class="@liClasses is-dropdown is-dropdown--no-icon"> <div class="@menuLinkClass u-w50px dw-mod"> <i class="@languageIcon fa-1_5x"></i> </div> <div class="menu menu--dropdown dw-mod"> @foreach (var lang in Model.Languages) { string langInfo = "<span class=\"flag-icon flag-icon-" + Dynamicweb.Services.Areas.GetArea(lang.ID).EcomCountryCode.ToLower() + " u-margin-right\"></span>" + lang.Name; if (languageViewType == "flag") { langInfo = "<span class=\"flag-icon flag-icon-" + Dynamicweb.Services.Areas.GetArea(lang.ID).EcomCountryCode.ToLower() + "\"></span>"; } if (languageViewType == "name") { langInfo = lang.Name; } string langID = Dynamicweb.Services.Areas.GetArea(lang.ID).EcomLanguageId; string url = SearchEngineFriendlyURLs.GetFriendlyUrl(lang.Page.ID); if (!String.IsNullOrEmpty(groupID)) { url += Dynamicweb.Frontend.UrlProviders.Handler.GetUrlFromQueryString("groupid", groupID, langID).Replace(".aspx", string.Empty); } if (!String.IsNullOrEmpty(productID)) { url += Dynamicweb.Frontend.UrlProviders.Handler.GetUrlFromQueryString("ProductId", productID, langID).Replace(".aspx", string.Empty); } if (!String.IsNullOrEmpty(colorID)) { url += "?colorid=" + colorID; } <a href="@url" class="menu-dropdown__item menu-dropdown__item--link dw-mod">@langInfo</a> } </div> </li> } } @helper RenderMiniCart(string type = "inNavigation") { bool onlyPreview = Model.Area.Item.GetBoolean("OnlyPreviewForAnonymous") && Model.CurrentUser.ID == 0; string cartIcon = !String.IsNullOrEmpty(Model.Area.Item.GetItem("Icons").GetList("CartIcon").SelectedValue) ? Model.Area.Item.GetItem("Icons").GetList("CartIcon").SelectedValue.ToLower() : "fas fa-shopping-cart"; if (!onlyPreview && !Model.Area.Item.GetBoolean("NavigationItemsHideCart")) { string liClasses = type == "inNavigation" ? "menu__item menu__item--horizontal menu__item--top-level dw-mod" : "menu__item menu__item--horizontal menu--clean dw-mod"; string menuLinkClass = type == "inNavigation" ? "menu__link" : "header-menu__link"; int miniCartFeedPageId = GetPageIdByNavigationTag("MiniCartFeed"); int cartFeedPageId = GetPageIdByNavigationTag("CartOrderlinesFeed"); int cartPageId = GetPageIdByNavigationTag("CartPage"); double cartProductsCount = Model.Cart.TotalProductsCount; @* Mini cart *@ <li class="@liClasses" onmouseenter="Cart.UpdateMiniCart(event, 'miniCart', '/Default.aspx?ID=@miniCartFeedPageId&feedType=MiniCart')"> <div class="mini-cart dw-mod"> <a href="/Default.aspx?ID=@cartPageId&Purge=True" id="miniCartCounterWrap" class="@menuLinkClass dw-mod js-mini-cart-button u-w50px"> <i class="@cartIcon fa-1_5x"></i> <div class="mini-cart__counter mini-cart__counter--inline dw-mod"> <div class="js-handlebars-root js-mini-cart-counter" id="cartCounter" data-template="MiniCartCounterContent" data-json-feed="/Default.aspx?ID=@miniCartFeedPageId&feedType=Counter" data-init-onload="false" data-preloader="false"> <div class="js-mini-cart-counter-content"> @cartProductsCount </div> </div> </div> </a> @if (Pageview.Device.ToString() != "Mobile" && Pageview.Device.ToString() != "Tablet") { <div class="mini-cart-dropdown js-handlebars-root js-mini-cart dw-mod" id="miniCart" data-template="MiniCartContent" data-cart-id="@miniCartFeedPageId" data-json-feed="/Default.aspx?ID=@miniCartFeedPageId&feedType=MiniCart" data-init-onload="false"></div> } </div> </li> } } @helper RenderSignIn (string type = "inNavigation", string userInitials = "") { if (!Model.Area.Item.GetBoolean("NavigationItemsHideSignIn")) { string liClasses = type == "inNavigation" ? "menu__item menu__item--horizontal menu__item--top-level dw-mod u-hidden-xxs" : "menu__item menu__item--horizontal menu__item--clean dw-mod"; string menuLinkClass = type == "inNavigation" ? "menu__link" : "header-menu__link"; string userIcon = !String.IsNullOrEmpty(Model.Area.Item.GetItem("Icons").GetList("SignInProfileIcon").SelectedValue) ? Model.Area.Item.GetItem("Icons").GetList("SignInProfileIcon").SelectedValue.ToLower() : "fas fa-user"; string favoriteIcon = !String.IsNullOrEmpty(Model.Area.Item.GetItem("Icons").GetList("FavoriteIcon").SelectedValue) ? "fas fa-" + Model.Area.Item.GetItem("Icons").GetList("FavoriteIcon").SelectedValue.ToLower() : "fas fa-star"; int pageId = Model.TopPage.ID; string myProfilePageId = (Model.CurrentUser.ID <= 0) ? GetPageIdByNavigationTag("SignInPage").ToString() + "&RedirectPageId=" + GetPageIdByNavigationTag("CustomerProfile").ToString() : GetPageIdByNavigationTag("CustomerProfile").ToString(); string myOrdersPageId = (Model.CurrentUser.ID <= 0) ? GetPageIdByNavigationTag("SignInPage").ToString() + "&RedirectPageId=" + GetPageIdByNavigationTag("CustomerOrders").ToString() : GetPageIdByNavigationTag("CustomerOrders").ToString(); int myDashboardPageId = GetPageIdByNavigationTag("CustomerDashboard"); string myFavoritesPageId = (Model.CurrentUser.ID <= 0) ? GetPageIdByNavigationTag("SignInPage").ToString() + "&RedirectPageId=" + GetPageIdByNavigationTag("CustomerFavorites").ToString() : GetPageIdByNavigationTag("CustomerFavorites").ToString(); string mySavedCardsPageId = (Model.CurrentUser.ID <= 0) ? GetPageIdByNavigationTag("SignInPage").ToString() + "&RedirectPageId=" + GetPageIdByNavigationTag("SavedCards").ToString() : GetPageIdByNavigationTag("SavedCards").ToString(); int createAccountPageId = GetPageIdByNavigationTag("CreateAccount"); int signInProfilePageId = GetPageIdByNavigationTag("SignInPage"); string forgotPasswordPageId = signInProfilePageId.ToString() + "&LoginAction=Recovery"; bool showCreateAccountLink = Model.Area.Item.GetBoolean("ShowCreateAccountLink"); bool showMyProfileLink = Model.Area.Item.GetBoolean("ShowMyProfileLink"); bool showMyOrdersLink = Model.Area.Item.GetBoolean("ShowMyOrdersLink"); bool showMyFavoritesLink = Model.Area.Item.GetBoolean("ShowMyFavoritesLink"); bool showMySavedCardsLink = Model.Area.Item.GetBoolean("ShowMySavedCardsLink"); @* Sign in + Customer center links *@ <li class="@liClasses is-dropdown is-dropdown--no-icon"> <div class="@menuLinkClass u-w50px dw-mod"> @if (Model.CurrentUser.ID <= 0) { <i class="@userIcon fa-1_5x"></i> } else { <a href="/default.aspx?ID=@myDashboardPageId" class="u-color-inherit"><div class="circle-icon-btn">@userInitials.ToUpper()</div></a> } </div> <div class="menu menu--dropdown sign-in-dropdown dw-mod"> <ul class="list list--clean dw-mod"> @if (Model.CurrentUser.ID <= 0) { <li> <label for="SignInModalTrigger" class="btn btn--primary btn--full u-no-margin sign-in-modal-trigger-button dw-mod" onclick="setTimeout(function () { document.getElementById('LoginUsername').focus() }, 10)">@Translate("Sign in")</label> </li> if (showCreateAccountLink) { <li> <a href="/default.aspx?ID=@createAccountPageId" class="list__link dw-mod">@Translate("Create account")</a> </li> } <li> <a href="/default.aspx?ID=@forgotPasswordPageId" class="list__link dw-mod">@Translate("Forgot your password?")</a> </li> if (showMyProfileLink || showMyOrdersLink || showMyFavoritesLink || showMySavedCardsLink) { <li class="list__seperator dw-mod"></li> } } @if (showMyProfileLink) { <li> <a href="/default.aspx?ID=@myProfilePageId" class="list__link dw-mod"><i class="@userIcon u-margin-right"></i>@Translate("My Profile")</a> </li> } @if (showMyOrdersLink) { <li> <a href="/default.aspx?ID=@myOrdersPageId" class="list__link dw-mod"><i class="fas fa-list u-margin-right"></i>@Translate("My Orders")</a> </li> } @if (showMyFavoritesLink) { <li> <a href="/default.aspx?ID=@myFavoritesPageId" class="list__link dw-mod"><i class="@favoriteIcon u-margin-right"></i>@Translate("My Favorites")</a> </li> } @if (showMySavedCardsLink) { <li> <a href="/default.aspx?ID=@mySavedCardsPageId" class="list__link dw-mod"><i class="fas fa-credit-card u-margin-right"></i>@Translate("My Saved cards")</a> </li> } @if (Model.CurrentUser.ID > 0) { if (showMyProfileLink || showMyOrdersLink || showMyFavoritesLink || showMySavedCardsLink) { <li class="list__seperator dw-mod"></li> } <li> <a href="/Admin/Public/ExtranetLogoff.aspx?ID=@pageId" class="list__link dw-mod">@Translate("Sign out")</a> </li> } </ul> </div> </li> } } @helper RenderFavorites(string type = "inNavigation") { if (!Model.Area.Item.GetBoolean("NavigationItemsHideFavorites")) { string liClasses = type == "inNavigation" ? "menu__item menu__item--horizontal menu__item--top-level dw-mod u-hidden-xxs" : "menu__item menu__item--horizontal menu--clean dw-mod"; string menuLinkClass = type == "inNavigation" ? "menu__link" : "header-menu__link"; string favoriteIcon = !String.IsNullOrEmpty(Model.Area.Item.GetItem("Icons").GetList("FavoriteIcon").SelectedValue) ? "fas fa-" + Model.Area.Item.GetItem("Icons").GetList("FavoriteIcon").SelectedValue.ToLower() : "fas fa-star"; string myFavoritesPageId = GetPageIdByNavigationTag("CustomerFavorites").ToString(); @* Favorites *@ if (Model.CurrentUser.ID > 0) { <li class="@liClasses"> <a href="/Default.aspx?ID=@myFavoritesPageId" class="@menuLinkClass u-w50px dw-mod"> <i class="@favoriteIcon fa-1_5x"></i> </a> </li> } } } @helper RenderFooter() { string footerColumnOneContent = !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterColumnOne")) ? Model.Area.Item.GetString("FooterColumnOne") : ""; string footerColumnTwoContent = !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterColumnTwo")) ? Model.Area.Item.GetString("FooterColumnTwo") : ""; string footerColumnThreeContent = !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterColumnThree")) ? Model.Area.Item.GetString("FooterColumnThree") : ""; string footerColumnOneHeader = Model.Area.Item.GetString("FooterColumnOneHeader"); string footerColumnTwoHeader = Model.Area.Item.GetString("FooterColumnTwoHeader"); string footerColumnThreeHeader = Model.Area.Item.GetString("FooterColumnThreeHeader"); int newsletterSignUpPageId = GetPageIdByNavigationTag("NewsletterSignUp"); <!-- Footer section --> <footer class="footer dw-mod"> <div class="center-container top-container__center-container dw-mod"> <div class="grid grid--external-bleed-x"> @if (!string.IsNullOrEmpty(footerColumnOneContent) || !string.IsNullOrEmpty(footerColumnOneHeader)) { <div class="grid__col-md-auto"> <h3 class="footer__heading dw-mod">@footerColumnOneHeader</h3> <div class="footer__content dw-mod"> @footerColumnOneContent </div> </div> } @if (!string.IsNullOrEmpty(footerColumnTwoContent) || !string.IsNullOrEmpty(footerColumnTwoHeader)) { <div class="grid__col-md-auto"> <h3 class="footer__heading dw-mod">@footerColumnTwoHeader</h3> <div class="footer__content dw-mod"> @footerColumnTwoContent </div> </div> } @if (!string.IsNullOrEmpty(footerColumnThreeContent) || !string.IsNullOrEmpty(footerColumnThreeHeader)) { <div class="grid__col-md-auto"> <h3 class="footer__heading dw-mod">@footerColumnThreeHeader</h3> <div class="footer__content dw-mod"> @footerColumnThreeContent </div> </div> } @* EGWBP.VIKING changed SOBJA - added hubspot *@ @if (Model.Area.Item.GetBoolean("FooterNewsletterSignUp")) { @*<div class="grid__col-md-auto"> <h3 class="footer__heading dw-mod">@Translate("Mailing list")</h3> <div class="footer__content dw-mod"> <p>@Translate("Sign up if you would like to receive occasional treats from us", "Sign up if you would like to receive occasional treats from us").</p> <form class="form dw-mod" name="NewsletterRedirect" action='/Default.aspx' method="get" enctype="multipart/form-data"> <input name="ID" id="ID" value="@newsletterSignUpPageId" type="hidden" /> <div class="form__field-combi"> <input name="NewsletterEmail" id="NewsletterEmail" type="text" placeholder='@Translate("Your email address", "Your email address")' /> <input class="btn btn--primary btn--condensed dw-mod" type="submit" id="Submitter" value='@Translate("Go", "Go")' /> </div> </form> </div> </div>*@ } else { <div class="grid__col-md-auto"> <h3 class="footer__heading dw-mod">@Translate("Mailing list", "Mailing list")</h3> <div class="footer__content dw-mod"> <p>@Translate("Sign up if you would like to receive occasional treats from us", "Sign up if you would like to receive occasional treats from us").</p> <div id="Hubspot" class="hubspot"> </div> </div> </div> } @* end *@ @if (Model.Area.Item.GetItems("FooterSocialLinks").Count > 0) { <div class="grid__col-md-auto"> <h3 class="footer__heading dw-mod">@Translate("Social links")</h3> <div class="footer__content dw-mod"> <div class="collection dw-mod"> @foreach (var socialitem in Model.Area.Item.GetItems("FooterSocialLinks")) { var socialIcon = socialitem.GetValue("Icon") as Dynamicweb.Frontend.ListViewModel; string socialIconClass = socialIcon.SelectedValue; string socialIconTitle = socialIcon.SelectedName; string socialLink = socialitem.GetString("Link"); <a href="@socialLink" target="_blank" title="@socialIconTitle" class="u-margin-bottom-5px"><i class="@socialIconClass fa-2x"></i></a> } </div> </div> </div> } @if (Model.Area.Item.GetItems("FooterPayments").Count > 0) { <div class="grid__col-12"> <div class="footer__content dw-mod"> <div class="collection dw-mod"> @foreach (var payment in Model.Area.Item.GetItems("FooterPayments")) { var paymentItem = payment.GetValue("CardTypeOrVerifiedPayment") as Dynamicweb.Frontend.ListViewModel; string paymentImage = null; string paymentTitle = paymentItem.SelectedName; ListOptionViewModel selected = paymentItem.SelectedOptions.FirstOrDefault(); if(selected != null) { paymentImage = selected.Icon; } <div class="footer__card-type"> <img src="/Admin/Public/GetImage.ashx?width=60&Compression=75&image=@paymentImage" alt="@paymentTitle" title="@paymentTitle" /> </div> } </div> </div> </div> } <div class="grid__col-12 footer__copyright dw-mod"> <p>@Model.Area.Item.GetString("FooterCopyrightText")</p> </div> </div> </div> </footer> } @* Templates for Typeahead *@ @if (!Model.Area.Item.GetBoolean("NavigationItemsHideSearch")) { <script id="SearchGroupsTemplate" type="text/x-template"> {{#.}} <li class="dropdown__item dw-mod" onclick="Search.UpdateGroupSelection(this)" data-group-id="{{id}}">{{name}}</li> {{/.}} </script> <script id="SearchProductsTemplate" type="text/x-template"> {{#each .}} {{#Product}} {{#ifCond template "!==" "SearchMore"}} <li class="dropdown__item dropdown__item--seperator dw-mod"> <div> <a href="{{link}}" class="js-typeahead-link u-color-inherit u-pull--left"> @* EGWBP.VIKING sobja removed "u-hidden-xs u-hidden-xxs" *@ <div class="u-margin-right u-pull--left {{noimage}}"><img src="/Admin/Public/GetImage.ashx?width=45&height=36&crop=5&FillCanvas=True&Compression=75&image={{image}}" alt="{{name}}"></div> <div class="u-pull--left"> <div class="u-bold u-max-w220px u-truncate-text js-typeahead-name">{{name}}</div> @if (!onlyPreview) { <div class="{{onlyPreview}}">{{price}}</div> } </div> </a> <div class="u-margin-left u-pull--right u-w78px"> <button class="btn btn--primary btn--condensed btn--full u-no-margin dw-mod {{hideBuyOptions}} js-ignore-click-outside" onclick="Cart.AddToCart(event, '{{productId}}', '1')"><i class="@cartIcon js-ignore-click-outside"></i></button> <a href="{{link}}" class="btn btn--secondary btn--condensed btn--full u-no-margin dw-mod {{hideViewMore}} js-ignore-click-outside">@Translate("View")</a> </div> </div> </li> {{/ifCond}} {{#ifCond template "===" "SearchMore"}} {{>SearchMoreProducts}} {{/ifCond}} {{/Product}} {{else}} <li class="dropdown__item dropdown__item--seperator dw-mod"> @Translate("Your search gave 0 results") </li> {{/each}} </script> <script id="SearchMoreProducts" type="text/x-template"> <li class="dropdown__item dropdown__item--not-selectable {{stickToBottom}} dw-mod"> <a href="/Default.aspx?ID=@productsPageId&Search={{searchParameter}}&GroupID={{groupId}}" class="btn btn--primary btn--full u-no-margin dw-mod js-typeahead-link"> @Translate("View all") </a> </li> </script> <script id="SearchMorePages" type="text/x-template"> <li class="dropdown__item dropdown__item--not-selectable {{stickToBottom}} dw-mod"> <a href="/Default.aspx?ID=@contentSearchPageId&Search={{searchParameter}}" class="btn btn--primary btn--full u-no-margin dw-mod js-typeahead-link"> @Translate("View all") </a> </li> </script> <script id="SearchPagesTemplate" type="text/x-template"> {{#each .}} {{#ifCond template "!==" "SearchMore"}} <li class="dropdown__item dropdown__item--seperator dw-mod"> <div> <a href="/Default.aspx?ID={{id}}" class="js-typeahead-link u-pull--left u-color-inherit"> <div class="u-margin-right u-pull--left"><i class="fa {{icon}} u-w20px u-ta-center"></i></div> <div class="u-pull--left"> <div class="u-bold u-truncate-text u-max-w220px js-typeahead-name">{{name}}</div> </div> </a> </div> </li> {{/ifCond}} {{#ifCond template "===" "SearchMore"}} {{>SearchMorePages}} {{/ifCond}} {{else}} <li class="dropdown__item dropdown__item--seperator dw-mod"> @Translate("Your search gave 0 results") </li> {{/each}} </script> <script id="SearchPagesTemplateWrap" type="text/x-template"> <div class="dropdown__column-header">@Translate("Pages")</div> <ul class="dropdown__list u-min-w220px u-full-width u-margin-bottom dw-mod"> {{>SearchPagesTemplate}} </ul> </script> <script id="SearchProductsTemplateWrap" type="text/x-template"> <div class="dropdown__column-header">@Translate("Products")</div> <ul class="dropdown__list u-min-w220px u-full-width u-margin-bottom dw-mod"> {{>SearchProductsTemplate}} </ul> </script> } @* Templates for the mini cart *@ @if (!Model.Area.Item.GetBoolean("NavigationItemsHideCart")) { <script id="MiniCartCounterContent" type="text/x-template"> {{#.}} <div class="js-mini-cart-counter-content dw-mod"> {{numberofproducts}} </div> {{/.}} </script> <script id="MiniCartContent" type="text/x-template"> {{#.}} <div class="mini-cart-dropdown__inner {{isempty}} dw-mod"> <h4 class="u-ta-center u-no-margin u-margin-bottom u-margin-top">@Translate("Shopping cart")</h4> <div class="mini-cart-dropdown__body dw-mod"> <table class="table mini-cart-table dw-mod"> <thead> <tr> <td>&nbsp;</td> <td>@Translate("Product")</td> <td class="u-ta-right">@Translate("Qty")</td> <td class="u-ta-right" width="120">@Translate("Price")</td> </tr> </thead> {{#OrderLines}} {{#ifCond template "===" "CartOrderline"}} {{>MiniCartOrderline}} {{/ifCond}} {{#ifCond template "===" "CartOrderlineMobile"}} {{>MiniCartOrderlineMobile}} {{/ifCond}} {{#ifCond template "===" "CartOrderlineDiscount"}} {{>MiniCartOrderlineDiscount}} {{/ifCond}} {{/OrderLines}} <tr> <td><i class="fas fa-credit-card"></i></td> <td>{{paymentmethod}}</td> <td colspan="2" class="u-ta-right" width="130">{{paymentfee}}</td> </tr> <tr> <td><i class="fas fa-truck"></i></td> <td>{{shippingmethod}}</td> <td colspan="2" class="u-ta-right" width="130">{{shippingfee}}</td> </tr> <tr class="mini-cart-totals dw-mod"> <td colspan="2">@Translate("Total")</td> <td class="u-ta-right">{{numberofproducts}}</td> <td class="u-ta-right" width="130">{{totalprice}}</td> </tr> </table> </div> <table class="table mini-cart-table dw-mod"> <tr class="mini-cart-orderlines__footer dw-mod"> <td colspan="2"><button type="button" class="btn btn--secondary u-pull--left u-no-margin dw-mod btn--sm" onclick="Cart.EmptyCart(event)">@Translate("Empty cart")</button></td> <td colspan="2" class="u-ta-right"><a href="/Default.aspx?ID=@cartPageId" class="btn btn--primary u-pull--right u-no-margin dw-mod btn--sm">@Translate("Proceed to checkout")</a></td> </tr> </table> </div> {{/.}} </script> <script id="MiniCartOrderline" type="text/x-template"> <tr class="{{isempty}}"> @* EGWBP.VIKING SOBJA - added image link /Images/Ecom/Products/{{image}} *@ <td><a href="{{link}}" class="{{hideimage}}"><img src="/Admin/Public/GetImage.ashx?width=50&height=50&crop=5&Compression=75&image=/Images/Ecom/Products/{{image}}" alt="{{name}}"></a></td> <td> <a href="{{link}}" class="mini-cart-orderlines__name" title="{{name}}">{{name}}</a> {{#if variantname}} <a href="{{link}}" class="mini-cart-orderlines__name mini-cart-orderlines__name--small">{{variantname}}</a> {{/if}} {{#if unitname}} <div class="mini-cart-orderlines__name mini-cart-orderlines__name--small">{{unitname}}</div> {{/if}} </td> <td class="u-ta-right">{{quantity}}</td> <td class="u-ta-right">{{totalprice}}</td> </tr> </script> <script id="MiniCartOrderlineMobile" type="text/x-template"> <tr class="{{isempty}}"> @* EGWBP.VIKING SOBJA - added image link /Images/Ecom/Products/{{image}} *@ <td><a href="{{link}}" class="{{hideimage}}"><img src="/Admin/Public/GetImage.ashx?width=50&height=50&crop=5&Compression=75&image=/Images/Ecom/Products/{{image}}" alt="{{name}}"></a></td> <td> <a href="{{link}}" class="mini-cart-orderlines__name">{{name}}</a> {{#if variantname}} <a href="{{link}}" class="mini-cart-orderlines__name mini-cart-orderlines__name--small">{{variantname}}</a> {{/if}} {{#if unitname}} <div class="mini-cart-orderlines__name mini-cart-orderlines__name--small">{{unitname}}</div> {{/if}} </td> <td class="u-ta-right">{{quantity}}</td> <td class="u-ta-right">{{totalprice}}</td> </tr> </script> <script id="MiniCartOrderlineDiscount" type="text/x-template"> <tr class="table__row--no-border {{isempty}}"> <td>&nbsp;</td> @* EGWBP.VIKING SOBJA - added translate *@ <td><div class="mini-cart-orderlines__name dw-mod">@Translate("Voucher")</div></td> @*<td><div class="mini-cart-orderlines__name dw-mod">{{name}}</div></td>*@ <td class="u-ta-right">&nbsp;</td> <td class="u-ta-right">{{totalprice}}</td> </tr> </script> } <!-- Javascript --> <script src="/Files/Templates/Designs/Rapido/js/handlebars-v4.0.11.js"></script> <script src="/Files/Templates/Designs/Rapido/js/master.js"></script> <script> </script> @if (Model.Area.Item.GetBoolean("UseCustomJavascript")) { <script src="/Files/Templates/Designs/Rapido/js/custom.min.js"></script> } <script> Wireframe.Init(@wireframeMode.ToLower()); </script> <!--@Javascripts--> </body> </html>