Error executing template "Designs/Rapido/_parsed/Page.parsed.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
   at CompiledRazorTemplates.Dynamic.RazorEngine_7c4a173ef37b445cb1ce2d00470a7f01.Execute() in C:\inetpub\wwwroot\DW9\Solutions\CroataR211\Files\Templates\Designs\Rapido\_parsed\Page.parsed.cshtml:line 945
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader)
   at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 2 3 @* Rapido version 2.1.1 *@ 4 5 @using Dynamicweb.Frontend 6 @using Dynamicweb.Frontend.Devices 7 @using Dynamicweb.Extensibility 8 @using Dynamicweb.Content 9 @using Dynamicweb.Security 10 @using Dynamicweb.Core 11 @using System 12 @using System.Linq 13 @using System.Web 14 @using System.IO 15 @using Dynamicweb.Security.UserManagement.Common.CustomFields 16 17 @functions { 18 string productsPageId; 19 string contentSearchPageId; 20 string resultPageId; 21 string searchFeedId; 22 string searchSecondFeedId; 23 string groupsFeedId; 24 string searchPlaceholder; 25 string searchType = "product-search"; 26 string searchTemplate; 27 string searchContentTemplate; 28 string searchValue = HttpContext.Current.Request.QueryString.Get("Search") != null ? HttpContext.Current.Request.QueryString.Get("Search") : ""; 29 string searchIcon; 30 bool showGroups = true; 31 } 32 @{ 33 string GoogleTagManagerID = Model.Area.Item.GetString("GoogleTagManagerID"); 34 //General settings 35 string favicon = Model.Area.Item.GetFile("LogoFavicon") != null ? Model.Area.Item.GetFile("LogoFavicon").Path : "/Files/Images/favicon.png"; 36 string logo = Model.Area.Item.GetFile("LogoImage") != null ? Model.Area.Item.GetFile("LogoImage").PathUrlEncoded : "/Files/Images/logo-dynamicweb.png"; 37 logo = "/Files/DigitalAssets/Logo/croata_logo_web.svg"; 38 string logoHeight = !String.IsNullOrEmpty(Model.Area.Item.GetString("LogoHeight")) ? Model.Area.Item.GetString("LogoHeight") : "40"; 39 logoHeight = logoHeight != "0" ? logoHeight : "40"; 40 if (Path.GetExtension(logo).ToLower() != ".svg") 41 { 42 logo = "/Admin/Public/GetImage.ashx?height=" + logoHeight + "&amp;crop=5&amp;Compression=75&amp;image=" + logo; 43 44 if (Pageview.Device.ToString() == "Mobile") 45 { 46 logoHeight = "40"; 47 } 48 } 49 string mobileLogo = Model.Area.Item.GetItem("MobileTopLayout").GetFile("MobileLayoutLogo") != null ? Model.Area.Item.GetItem("MobileTopLayout").GetFile("MobileLayoutLogo").PathUrlEncoded : "/Files/Images/logo-dynamicweb.png"; 50 mobileLogo = "%2fFiles%2fDigitalAssets%2fLogo%2fcroata_logo_web.svg"; 51 if (Path.GetExtension(mobileLogo).ToLower() != ".svg") 52 { 53 mobileLogo = "/Admin/Public/GetImage.ashx?height=40&amp;crop=5&amp;Compression=75&amp;image=" + mobileLogo; 54 } 55 else 56 { 57 mobileLogo = HttpUtility.UrlDecode(mobileLogo); 58 } 59 60 string wireframeMode = Model.Area.Item.GetBoolean("WireframeMode").ToString(); 61 62 //Font settings 63 string navigationFont = Model.Area.Item.GetItem("NavigationFont").GetGoogleFont("FontFamily").Family.Replace(" ", "+"); 64 string mobileNavigationFont = Model.Area.Item.GetItem("MobileNavigationFont").GetGoogleFont("FontFamily").Family.Replace(" ", "+"); 65 string headerFont = Model.Area.Item.GetItem("ContentLayoutHeaderFont").GetGoogleFont("FontFamily").Family.Replace(" ", "+"); 66 string subHeaderFont = Model.Area.Item.GetItem("ContentLayoutSubheaderFont").GetGoogleFont("FontFamily").Family.Replace(" ", "+"); 67 string contentFont = Model.Area.Item.GetItem("ContentLayoutBodyText").GetGoogleFont("FontFamily").Family.Replace(" ", "+"); 68 string newStickersFont = Model.Area.Item.GetItem("NewStickersFont").GetGoogleFont("FontFamily").Family.Replace(" ", "+"); 69 string customStickersFont = Model.Area.Item.GetItem("CustomStickersFont").GetGoogleFont("FontFamily").Family.Replace(" ", "+"); 70 string toolsMenuFont = Model.Area.Item.GetItem("ToolsMenuFont").GetGoogleFont("FontFamily").Family.Replace(" ", "+"); 71 string productListPriceFont = Model.Area.Item.GetItem("ProductListGeneral").GetItem("PriceFontDesign").GetGoogleFont("FontFamily").Family.Replace(" ", "+"); 72 string productPagePriceFont = Model.Area.Item.GetItem("ProductDetails").GetItem("ProductDetailsPriceFontDesign").GetGoogleFont("FontFamily").Family.Replace(" ", "+"); 73 string facetsHeaderFont = Model.Area.Item.GetItem("ProductCatalogFacets").GetItem("FacetsHeaderFont").GetGoogleFont("FontFamily").Family.Replace(" ", "+"); 74 75 //Icons 76 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"; 77 searchIcon = !String.IsNullOrEmpty(Model.Area.Item.GetItem("Icons").GetList("SearchIcon").SelectedValue) ? Model.Area.Item.GetItem("Icons").GetList("SearchIcon").SelectedValue.ToLower() : "fas fa-search"; 78 79 80 //Page IDs for use in the template 81 82 int logoutPageId = 10359; 83 int pageId = Model.TopPage.ID; 84 string firstPageId = Model.Area.FirstActivePage.ID.ToString(); 85 int cartPageId = GetPageIdByNavigationTag("CartPage"); 86 int miniCartFeedPageId = GetPageIdByNavigationTag("MiniCartFeed"); 87 int cartFeedPageId = GetPageIdByNavigationTag("CartOrderlinesFeed"); 88 89 int impersonationPageId = GetPageIdByNavigationTag("Impersonation"); 90 91 bool stickyMenu = Pageview.Device.ToString() == "Mobile" || Pageview.Device.ToString() == "Tablet" ? false : Model.Area.Item.GetBoolean("NavigationStickyMenu"); 92 string stickyTop = stickyMenu ? "top-container--sticky" : ""; 93 string pagePos = stickyMenu ? "js-page-pos" : ""; 94 string topLayout = Model.Area.Item.GetList("LayoutTop").SelectedValue; 95 string mobileTopLayout = !String.IsNullOrEmpty(Model.Area.Item.GetItem("MobileTopLayout").GetList("MobileLayoutTop").SelectedValue) ? Model.Area.Item.GetItem("MobileTopLayout").GetList("MobileLayoutTop").SelectedValue : "nav-left"; 96 string mobileNavigationPosition = mobileTopLayout == "nav-left" || mobileTopLayout == "nav-search-left" ? "left" : "right"; 97 bool renderPagesInToolBar = Model.Area.Item.GetBoolean("RenderPagesInToolBar"); 98 string toolbarText = Model.Area.Item.GetString("ToolbarText"); 99 bool onlyPreview = Model.Area.Item.GetBoolean("OnlyPreviewForAnonymous") && Model.CurrentUser.ID == 0; 100 101 string headerButtonText = Model.Area.Item.GetString("HeaderButtonText"); 102 string headerButtonLink = Model.Area.Item.GetString("HeaderButtonLink"); 103 string headerButtonType = "btn--" + Model.Area.Item.GetList("HeaderButtonType").SelectedName.ToLower(); 104 105 string autoCssLink = "/Files/Templates/Designs/Rapido/css/rapido/rapido_" + Model.Area.ID.ToString() + ".min.css?ticks=" + Model.Area.UpdatedDate.Ticks; 106 bool useFontAwesomePro = Model.Area.Item.GetItem("Icons").GetString("UseFontAwesomePro") != null ? Model.Area.Item.GetItem("Icons").GetBoolean("UseFontAwesomePro") : false; 107 108 string siteURL = Dynamicweb.Context.Current.Request.Url.Scheme + "://" + Dynamicweb.Context.Current.Request.Url.Host; 109 string baseURL = "https://" + Dynamicweb.Context.Current.Request.Url.Host; 110 string pageURL = Dynamicweb.Context.Current.Request.RawUrl; 111 if (pageURL.Length >=6){ 112 pageURL = pageURL.Substring(6,pageURL.Length - 6).Split('?')[0]; 113 } 114 115 116 pageURL = (baseURL.Substring(baseURL.Length-3,3) == "com" ? "/in-en" : "/hr-hr") + pageURL; 117 118 string pageDomain = Pageview.Area.UrlName; 119 string userInitials = ""; 120 string userDomain = ""; 121 if (Model.CurrentUser.ID != 0) 122 { 123 if (!String.IsNullOrEmpty(Model.CurrentUser.Name)) 124 { 125 string[] names = Model.CurrentUser.Name.Split(' '); 126 userInitials += Model.CurrentUser.Name.Substring(0, 1); 127 128 if (names.Length > 1) 129 { 130 userInitials += names[names.Length - 1].Substring(0, 1); 131 } 132 } 133 else 134 { 135 userInitials += Model.CurrentUser.FirstName != null && Model.CurrentUser.FirstName != "" ? Model.CurrentUser.FirstName.Substring(0, 1) : ""; 136 userInitials += Model.CurrentUser.LastName != null && Model.CurrentUser.LastName != "" ? Model.CurrentUser.LastName.Substring(0, 1) : ""; 137 userInitials += userInitials.Length == 1 && Model.CurrentUser.FirstName != null && Model.CurrentUser.FirstName.Length > 1 ? Model.CurrentUser.FirstName.Substring(1, 2) : ""; 138 userInitials += userInitials == "" && Model.CurrentUser.Email != null && Model.CurrentUser.Email.Length > 1 ? Model.CurrentUser.Email.Substring(0, 2) : ""; 139 userInitials += userInitials == "" ? Model.CurrentUser.UserName.Substring(0, 2) : ""; 140 } 141 foreach (CustomFieldValue val in (Pageview.User.CustomFieldValues)) 142 { 143 if (val.CustomField.Name == "PageDomain") 144 { 145 userDomain = val.Value.ToString(); 146 } 147 } 148 149 } 150 151 if(Model.CurrentUser.ID <= 0) 152 { 153 if (pageDomain == "b2i-hr" || pageDomain == "b2b-hr" || pageDomain == "b2ball-hr") 154 { 155 156 int loginPage = GetPageIdByNavigationTag("SignInPage"); 157 HttpContext.Current.Response.Redirect(siteURL + "/"+ pageDomain + "/Default.aspx?ID=" + loginPage); 158 } 159 } 160 161 162 163 164 if (userDomain != "" && userDomain != pageDomain) 165 { 166 string userC = Pageview.User.Currency; 167 HttpContext.Current.Response.Redirect(siteURL + "/" + userDomain + "/?CurrencyCode=" + userC + "&cartcmd=emptycart"); 168 } 169 170 string businessPhotoPath = Model.Area.Item.GetFile("BusinessPhoto") != null ? Model.Area.Item.GetFile("BusinessPhoto").PathUrlEncoded : ""; 171 string businessName = Model.Area.Item.GetString("BusinessName"); 172 string businessLogo = Model.Area.Item.GetFile("BusinessLogo") != null ? Model.Area.Item.GetFile("BusinessPhoto").Path : ""; 173 string openingHours = Model.Area.Item.GetString("OpeningHours"); 174 var address = Model.Area.Item.GetItem("Address"); 175 string streetAddress = ""; 176 string addressLocality = ""; 177 string addressRegion = ""; 178 string postalCode = ""; 179 string addressCountry = ""; 180 if (address != null) 181 { 182 streetAddress = address.GetString("StreetAddress"); 183 addressLocality = address.GetString("City"); 184 addressRegion = address.GetString("Region"); 185 postalCode = address.GetString("PostalCode"); 186 addressCountry = address.GetString("Country"); 187 } 188 string contactEmail = Model.Area.Item.GetString("ContactEmail"); 189 string contactNumber = Model.Area.Item.GetString("ContactNumber"); 190 191 productsPageId = Converter.ToString(GetPageIdByNavigationTag("ProductsPage")); 192 contentSearchPageId = Converter.ToString(GetPageIdByNavigationTag("ContentSearchResults")) + "&Areaid=" + Model.Area.ID; 193 194 if (Model.Area.Item.GetList("TopSearch").SelectedValue == "contentSearch") 195 { 196 searchFeedId = Converter.ToString(GetPageIdByNavigationTag("ContentSearchFeed")) + "&Areaid=" + Model.Area.ID + "&pagesOnly=true"; 197 resultPageId = contentSearchPageId; 198 searchPlaceholder = Translate("Have something special in mind?"); 199 groupsFeedId = "0"; 200 searchType = "content-search"; 201 searchTemplate = "SearchPagesTemplate"; 202 showGroups = false; 203 } 204 else if (Model.Area.Item.GetList("TopSearch").SelectedValue == "combinedSearch") 205 { 206 //data-search-second-feed-id 207 searchFeedId = productsPageId + "&feed=true"; 208 searchSecondFeedId = Converter.ToString(GetPageIdByNavigationTag("ContentSearchFeed")) + "&Areaid=" + Model.Area.ID + "&pagesOnly=true"; 209 resultPageId = productsPageId; 210 searchPlaceholder = Translate("Have something special in mind?"); 211 groupsFeedId = Converter.ToString(GetPageIdByNavigationTag("ProductGroupsFeed")); 212 searchType = "combined-search"; 213 searchTemplate = "SearchProductsTemplateWrap"; 214 searchContentTemplate = "SearchPagesTemplateWrap"; 215 showGroups = Model.Area.Item.GetBoolean("ShowGroupsSelector"); 216 } 217 else 218 { 219 resultPageId = productsPageId; 220 searchFeedId = productsPageId + "&feed=true"; 221 groupsFeedId = Converter.ToString(GetPageIdByNavigationTag("ProductGroupsFeed")); 222 searchPlaceholder = Translate("Have something special in mind?"); 223 searchTemplate = "SearchProductsTemplate"; 224 searchType = "product-search"; 225 showGroups = Model.Area.Item.GetBoolean("ShowGroupsSelector"); 226 } 227 } 228 <!DOCTYPE html> 229 230 <html lang="@Pageview.Area.CultureInfo.TwoLetterISOLanguageName"> 231 <head> 232 <meta charset="utf-8" /> 233 <title>@Model.Title</title> 234 <!--<base href="https://www.croata.hr/">--> 235 <base href="@baseURL"> 236 <link rel="canonical" href="@baseURL@pageURL" /> 237 @Model.MetaTags 238 <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=10 minimum-scale=.25, user-scalable=yes"> 239 <meta name="robots" content="index, follow"> 240 241 242 <!-- Google Tag Manager --> 243 <script> 244 (function (w, d, s, l, i) { 245 w[l] = w[l] || []; w[l].push({ 'gtm.start': new Date().getTime(), event: 'gtm.js' }); var f = d.getElementsByTagName(s)[0], 246 j = d.createElement(s), dl = l != 'dataLayer' ? '&l=' + l : ''; j.async = true; j.src = 247 'https://www.googletagmanager.com/gtm.js?id=' + i + dl; f.parentNode.insertBefore(j, f); 248 })(window, document, 'script', 'dataLayer', 'GTM-MM2P57B');</script> 249 <!-- End Google Tag Manager --> 250 251 @*@Model.MetaTags*@ 252 253 @if (!string.IsNullOrWhiteSpace(GoogleTagManagerID)) 254 { 255 <!-- Google Tag Manager --> 256 @*<script> 257 (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': 258 new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], 259 j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 260 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); 261 })(window,document,'script','dataLayer','@GoogleTagManagerID'); 262 </script>*@ 263 <!-- End Google Tag Manager --> 264 } 265 266 267 <!-- Google Tag Manager --> 268 <script async src="https://www.googletagmanager.com/gtag/js?id=UA-20818351-1"></script> 269 <script> 270 window.dataLayer = window.dataLayer || []; 271 function gtag() { dataLayer.push(arguments); } 272 gtag('js', new Date()); 273 274 gtag('config', 'UA-20818351-1'); 275 </script> 276 <!-- End Google Tag Manager --> 277 <!-- Facebook Pixel Code --> 278 <script> 279 !function (f, b, e, v, n, t, s) { 280 if (f.fbq) return; n = f.fbq = function () { 281 n.callMethod ? 282 n.callMethod.apply(n, arguments) : n.queue.push(arguments) 283 }; 284 if (!f._fbq) f._fbq = n; n.push = n; n.loaded = !0; n.version = '2.0'; 285 n.queue = []; t = b.createElement(e); t.async = !0; 286 t.src = v; s = b.getElementsByTagName(e)[0]; 287 s.parentNode.insertBefore(t, s) 288 }(window, document, 'script', 289 'https://connect.facebook.net/en_US/fbevents.js'); 290 fbq('init', '343128439663295'); 291 fbq('track', 'PageView'); 292 293 /**/</script> 294 <noscript> 295 <img height="1" width="1" 296 src="https://www.facebook.com/tr?id=343128439663295&ev=PageView&noscript=1" alt="Facebook noscript image" /> 297 </noscript> 298 <!-- End Facebook Pixel Code --> 299 300 <script> 301 function displayLanguageSelector() { 302 var inputs = document.getElementsByTagName('input'); 303 for (var i = 0; i < inputs.length; i++) { 304 if (inputs[i].type == 'checkbox') { 305 inputs[i].checked = false; 306 } 307 } 308 document.getElementById("MobileNavTrigger").checked = true; 309 document.getElementById("MobileMenuCheck_Language").checked = true; 310 } 311 312 /**/</script> 313 <!-- Favicon --> 314 <link href="@favicon" rel="icon" type="image/png"> 315 316 <!-- Font awesome --> 317 @if (useFontAwesomePro) 318 { 319 <link rel="stylesheet" href="/Files/Templates/Designs/Rapido/css/fonts/FontAwesomePro/css/fontawesome-all.min.css" type="text/css"> 320 } 321 else 322 { 323 <link rel="stylesheet" href="/Files/Templates/Designs/Rapido/css/fonts/FontAwesomeFree/css/fontawesome-all.min.css" type="text/css"> 324 } 325 326 <!-- Flag icon --> 327 <!--<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/3.1.0/css/flag-icon.min.css" type="text/css">--> 328 <!-- Base (Default, wireframe) styles --> 329 <link rel="stylesheet" href="/Files/Templates/Designs/Rapido/css/base/base.min.css" type="text/css"> 330 331 <!-- Rapido Css from Website Settings --> 332 <link id="rapidoCss" rel="stylesheet" href="@autoCssLink" type="text/css"> 333 334 <!-- Ignite Css (Custom site specific styles) --> 335 <link id="igniteCss" type="text/css" href="/Files/Templates/Designs/Rapido/css/ignite/ignite.min.css" rel="stylesheet" /> 336 <link href="/Files/Templates/Designs/Rapido/css/ignite/ignite-blogs.min.css" rel="stylesheet" /> 337 <link href="/Files/Templates/Designs/Rapido/css/ignite/easyzoom.css" rel="stylesheet" /> 338 <!-- Google fonts --> 339 @{ 340 var fonts = new string[11] { navigationFont, mobileNavigationFont, headerFont, subHeaderFont, contentFont, newStickersFont, customStickersFont, toolsMenuFont, productListPriceFont, productPagePriceFont, facetsHeaderFont }; 341 var family = string.Join("%7C", fonts.Distinct().Select(x => string.Format("{0}:100,200,300,400,500,600,700,800,900", x))); 342 } 343 <link href="https://fonts.googleapis.com/css?family=@family" rel="stylesheet"> 344 345 @if (!string.IsNullOrEmpty(businessPhotoPath) && 346 !string.IsNullOrEmpty(businessName) && 347 !string.IsNullOrEmpty(streetAddress) && 348 !string.IsNullOrEmpty(addressLocality) && 349 !string.IsNullOrEmpty(addressRegion) && 350 !string.IsNullOrEmpty(postalCode) && 351 !string.IsNullOrEmpty(addressCountry)) 352 { 353 <script type="application/ld+json"> 354 { 355 "@@context": "http://schema.org", 356 "@@type": "Organization", 357 "name" : "@businessName", 358 "url": "@siteURL" 359 @if (Model.Area.Item.GetItems("FooterSocialLinks").Count > 0) 360 { 361 <text>,"sameAs" : [</text> 362 @(string.Join(",", Model.Area.Item.GetItems("FooterSocialLinks").Select(x => '"' + x.GetString("Link") + '"'))) 363 <text>]</text> 364 } 365 }, 366 { 367 "@@context": "http://schema.org", 368 "@@type": "LocalBusiness", 369 "image": [ 370 "@siteURL/Admin/Public/GetImage.ashx?width=400&height=400&crop=0&Compression=75&DoNotUpscale=true&image=@businessPhotoPath", 371 "@siteURL/Admin/Public/GetImage.ashx?width=400&height=300&crop=0&Compression=75&DoNotUpscale=true&image=@businessPhotoPath", 372 "@siteURL/Admin/Public/GetImage.ashx?width=448&height=225&crop=0&Compression=75&DoNotUpscale=true&image=@businessPhotoPath" 373 ], 374 "@@id": "@siteURL", 375 "url": "@siteURL" 376 @if (!string.IsNullOrEmpty(openingHours)) 377 { 378 <text>,"openingHours": "@openingHours"</text> 379 } 380 @if (!string.IsNullOrEmpty(businessLogo)) 381 { 382 <text>,"logo": "@siteURL@businessLogo"</text> 383 } 384 ,"name": "@businessName", 385 "address": { 386 "@@type": "PostalAddress", 387 "streetAddress": "@streetAddress", 388 "addressLocality": "@addressLocality", 389 "addressRegion": "@addressRegion", 390 "postalCode": "@postalCode", 391 "addressCountry": "@addressCountry" 392 } 393 @if (!string.IsNullOrEmpty(contactEmail)) 394 { 395 <text>,"email": "@Model.Area.Item.GetString("ContactEmail")"</text> 396 } 397 @if (!string.IsNullOrEmpty(contactNumber)) 398 { 399 <text>,"telephone": "@Model.Area.Item.GetString("ContactNumber")"</text> 400 } 401 } 402 </script> 403 } 404 </head> 405 406 <body> 407 <!-- Google Tag Manager (noscript) --> 408 <noscript> 409 <iframe src="https://www.googletagmanager.com/ns.html?id=GTM-MM2P57B" 410 height="0" width="0" style="display:none;visibility:hidden"></iframe> 411 </noscript> 412 <!-- End Google Tag Manager (noscript) --> 413 414 @MobileNavigation(userInitials, mobileNavigationPosition) 415 416 @LoginModal() 417 418 <main class="site dw-mod"> 419 <header class="top-container @stickyTop dw-mod" id="Top"> 420 @if (renderPagesInToolBar && Pageview.Device.ToString() != "Mobile" && Pageview.Device.ToString() != "Tablet") 421 { 422 string pageSubDomain = Dynamicweb.Frontend.PageView.Current().Area.UrlName; 423 <div id="toolsNavigation" class="tools-navigation dw-mod"> 424 <div class="center-container grid top-container__center-container dw-mod"> 425 <div class="grid__cell"> 426 <div class="u-pull--left u-margin-top"> 427 <a href="/@pageSubDomain/terms-and-conditions?paragraph=tabs-2&button=button-2">@toolbarText</a> 428 <a href="#" id="btnCloseToolsNavigation" class="u-pull--right"> 429 <img class="grid--external-bleed-y" src="/Files/DigitalAssets/icons8-multiply-50.png" width="24" height="24" alt="Multiply icon" /> 430 </a> 431 </div> 432 </div> 433 </div> 434 </div> 435 } 436 437 @if (Pageview.Device.ToString() != "Mobile" && Pageview.Device.ToString() != "Tablet") 438 { 439 switch (topLayout) 440 { 441 case "condensed": //2 442 <!-- Main navigation --> 443 <nav class="main-navigation dw-mod"> 444 <div class="center-container top-container__center-container grid grid--align-center dw-mod"> 445 @RenderLogo(firstPageId, logo, businessName) 446 447 @* Navigation *@ 448 <div style="margin:0 auto"> 449 @RenderHeaderNavigation() 450 </div> 451 452 <ul class="menu dw-mod" style="position:absolute;bottom:0px; right:35px;"> 453 @RenderSignIn("inNavigation", userInitials) 454 @RenderLanguageSelector() 455 @RenderFavorites() 456 @RenderMiniCart() 457 </ul> 458 @if (!string.IsNullOrWhiteSpace(headerButtonLink)) 459 { 460 <div class="u-margin-left u-inline-block"> 461 <a class="btn @headerButtonType dw-mod u-no-margin" href="@headerButtonLink">@headerButtonText</a> 462 </div> 463 } 464 </div> 465 </nav> 466 467 <!-- Searchbar --> 468 if (!Model.Area.Item.GetBoolean("NavigationItemsHideSearch")) 469 { 470 <div class="u-box-shadow u-color-light-gray--bg u-inline-block u-full-width"> 471 <div class="center-container top-container__center-container dw-mod"> 472 @RenderSearch() 473 </div> 474 </div> 475 } 476 477 break; 478 case "minimal": //4 479 case "minimal-right": //5 480 string alignClass = topLayout == "minimal-right" ? "grid--align-end" : ""; 481 482 <!-- Main navigation --> 483 <nav class="main-navigation dw-mod"> 484 <div class="center-container top-container__center-container grid grid--align-center dw-mod"> 485 @RenderLogo(firstPageId, logo, businessName) 486 487 @* Navigation *@ 488 <div class="@alignClass" style="margin:0 auto"> 489 @RenderHeaderNavigation() 490 </div> 491 <div class="DropDownRightContent"> 492 <div id="rightMenuButton" class="menu_dropdown menu__link u-w50px dw-mod" style="position:absolute;bottom:0px; right:35px;"><i class="fa fa-bars fa-2x"></i></div> 493 <ul class="right-menu menu dw-mod" style="position:absolute;bottom:0px; right:35px;"> 494 @if (!Model.Area.Item.GetBoolean("NavigationItemsHideSearch")) 495 { 496 @RenderMiniSearch() 497 } 498 499 @RenderSignIn("inNavigation", userInitials) 500 501 @if (Model.CurrentUser.ID == 0) 502 { 503 @RenderLanguageSelector() 504 } 505 @RenderFavorites() 506 @RenderMiniCart() 507 </ul> 508 </div> 509 @if (!string.IsNullOrWhiteSpace(headerButtonLink)) 510 { 511 <div class="u-margin-left u-inline-block"> 512 <a class="btn @headerButtonType dw-mod u-no-margin" href="@headerButtonLink">@headerButtonText</a> 513 </div> 514 } 515 </div> 516 </nav> 517 break; 518 case "two-lines": //6 519 case "two-lines-centered": //7 520 string justifyClass = topLayout == "two-lines-centered" ? "grid--justify-center" : "grid--justify-space-between"; 521 522 <!-- Main navigation --> 523 <nav class="main-navigation dw-mod"> 524 <div class="center-container top-container__center-container grid @justifyClass dw-mod"> 525 <div class="grid__col--bleed grid--align-center"> 526 @RenderLogo(firstPageId, logo, businessName) 527 </div> 528 @* Navigation *@ 529 <div> 530 <div class="grid__cell u-reset-position"> 531 @RenderHeaderNavigation() 532 </div> 533 </div> 534 <div> 535 <div class="grid grid--align-center"> 536 <div class="grid__cell"> 537 <ul class="menu dw-mod"> 538 @if (!Model.Area.Item.GetBoolean("NavigationItemsHideSearch")) 539 { 540 @RenderMiniSearch() 541 } 542 @RenderSignIn("inNavigation", userInitials) 543 @RenderLanguageSelector() 544 @RenderFavorites() 545 @RenderMiniCart() 546 </ul> 547 </div> 548 @if (!string.IsNullOrWhiteSpace(headerButtonLink)) 549 { 550 <div class="u-margin-left u-inline-block grid__cell"> 551 <a class="btn @headerButtonType dw-mod u-no-margin" href="@headerButtonLink">@headerButtonText</a> 552 </div> 553 } 554 </div> 555 </div> 556 </div> 557 </nav> 558 break; 559 case "splitted": //3 560 <!-- Header --> 561 <div class="header header-top dw-mod"> 562 <div class="center-container top-container__center-container grid grid--align-center dw-mod"> 563 564 @* Logo *@ 565 @RenderLogo(firstPageId, logo, businessName) 566 567 @if (!Model.Area.Item.GetBoolean("NavigationItemsHideSearch")) 568 { 569 @* Search *@ 570 <div class="grid--align-end grid__col-auto grid__col--bleed"> 571 <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"> 572 @RenderSearch("right") 573 </div> 574 </div> 575 576 577 } 578 </div> 579 </div> 580 <!-- Main navigation --> 581 <nav class="main-navigation dw-mod"> 582 <div class="center-container top-container__center-container grid grid--align-center dw-mod"> 583 <div style="margin:0 auto"> 584 @RenderHeaderNavigation() 585 </div> 586 <ul class="menu dw-mod" style="position:absolute;bottom:0px; right:35px;"> 587 @RenderSignIn("inNavigation", userInitials) 588 @RenderLanguageSelector() 589 @RenderFavorites() 590 @if (!onlyPreview) 591 { 592 @RenderMiniCart() 593 } 594 </ul> 595 @if (!string.IsNullOrWhiteSpace(headerButtonLink)) 596 { 597 <div class="u-margin-left u-inline-block"> 598 <a class="btn @headerButtonType dw-mod u-no-margin" href="@headerButtonLink">@headerButtonText</a> 599 </div> 600 } 601 </div> 602 </nav> 603 604 break; 605 case "normal": //1 606 default: 607 <!-- Header --> 608 <div class="header header-top dw-mod"> 609 <div class="center-container top-container__center-container grid grid--align-center dw-mod"> 610 @* Logo *@ 611 @RenderLogo(firstPageId, logo, businessName) 612 613 @if (!Model.Area.Item.GetBoolean("NavigationItemsHideSearch")) 614 { 615 @* Search *@ 616 <div class="grid__col-auto grid__col--bleed"> 617 @RenderSearch() 618 </div> 619 } 620 621 <ul class="menu dw-mod"> 622 @RenderSignIn("outsideNavigation", userInitials) 623 @RenderLanguageSelector("outsideNavigation") 624 @RenderFavorites("outsideNavigation") 625 @if (!onlyPreview) 626 { 627 @RenderMiniCart("outsideNavigation") 628 } 629 </ul> 630 631 @if (!string.IsNullOrWhiteSpace(headerButtonLink)) 632 { 633 <div class="u-margin-left u-inline-block"> 634 <a class="btn @headerButtonType dw-mod u-no-margin" href="@headerButtonLink">@headerButtonText</a> 635 </div> 636 } 637 </div> 638 </div> 639 640 <!-- Main navigation --> 641 <nav class="main-navigation dw-mod"> 642 <div class="center-container top-container__center-container grid dw-mod"> 643 <div> 644 @RenderHeaderNavigation() 645 </div> 646 </div> 647 </nav> 648 649 break; 650 } 651 } 652 else 653 { 654 string style = (topLayout == "normal" || topLayout == "splitted" ? "main-navigation--top-style" : "main-navigation--nav-style"); 655 656 657 switch (mobileTopLayout) 658 { 659 660 case "nav-left": 661 <nav class="main-navigation-mobile dw-mod"> 662 <div class="center-container top-container__center-container dw-mod"> 663 <div class="grid"> 664 @MobileNavigationTrigger() 665 666 <div class="logo u-middle dw-mod logo-mobile"> 667 <a href="/Default.aspx?ID=@firstPageId"> 668 <img class="grid__cell-img logo__img dw-mod" src="@mobileLogo" alt="@businessName" /> 669 </a> 670 </div> 671 672 <ul class="menu dw-mod u-pull--right"> 673 @if (!Model.Area.Item.GetBoolean("NavigationItemsHideSearch")) 674 { 675 <li class="menu__item menu__item--horizontal menu__item--top-level dw-mod"> 676 <label for="MobileSearchTrigger" class="menu__link dw-mod"> 677 <i class="@searchIcon fa-1x"></i> 678 </label> 679 </li> 680 } 681 682 @if (!onlyPreview) 683 { 684 @RenderMiniCart() 685 } 686 </ul> 687 </div> 688 </div> 689 </nav> 690 break; 691 case "nav-right": 692 <nav class="main-navigation-mobile dw-mod"> 693 <div class="center-container top-container__center-container dw-mod"> 694 <div class="grid"> 695 <div class="logo u-middle dw-mod logo-mobile"> 696 <a href="/Default.aspx?ID=@firstPageId"> 697 <img class="grid__cell-img logo__img dw-mod" src="@mobileLogo" alt="@businessName" /> 698 </a> 699 </div> 700 701 <ul class="menu dw-mod u-pull--right"> 702 @if (!Model.Area.Item.GetBoolean("NavigationItemsHideSearch")) 703 { 704 <li class="menu__item menu__item--horizontal menu__item--top-level dw-mod"> 705 <label for="MobileSearchTrigger" class="menu__link dw-mod"> 706 <i class="@searchIcon fa-1_5x"></i> 707 </label> 708 </li> 709 } 710 711 @if (!onlyPreview) 712 { 713 @RenderMiniCart() 714 } 715 </ul> 716 717 @MobileNavigationTrigger() 718 </div> 719 </div> 720 </nav> 721 break; 722 case "nav-search-left": 723 <nav class="main-navigation-mobile dw-mod"> 724 <div class="center-container top-container__center-container dw-mod"> 725 <div class="grid"> 726 @MobileNavigationTrigger() 727 728 @if (!Model.Area.Item.GetBoolean("NavigationItemsHideSearch")) 729 { 730 <ul class="menu dw-mod u-pull--right grid--align-self-center"> 731 <li class="menu__item menu__item--horizontal menu__item--top-level dw-mod" 732 onclick="displayLanguageSelector()"> 733 <label class="menu__link dw-mod"> 734 <i class="fal fa-globe fa-1x"></i> 735 </label> 736 </li> 737 </ul> 738 } 739 740 <div class="logo u-middle dw-mod logo-mobile"> 741 <a href="/Default.aspx?ID=@firstPageId"> 742 <img class="grid__cell-img logo__img dw-mod" src="@mobileLogo" alt="@businessName" /> 743 </a> 744 </div> 745 746 @if (!onlyPreview) 747 { 748 <ul class="menu dw-mod u-pull--right grid--align-self-center"> 749 @RenderMiniCart() 750 </ul> 751 } 752 </div> 753 </div> 754 </nav> 755 break; 756 case "search-left": 757 <nav class="main-navigation-mobile dw-mod"> 758 <div class="center-container top-container__center-container dw-mod"> 759 <div class="grid"> 760 761 @if (!Model.Area.Item.GetBoolean("NavigationItemsHideSearch")) 762 { 763 <ul class="menu dw-mod u-pull--right"> 764 <li class="menu__item menu__item--horizontal menu__item--top-level dw-mod"> 765 <label for="MobileSearchTrigger" class="menu__link dw-mod"> 766 <i class="@searchIcon fa-1_5x"></i> 767 </label> 768 </li> 769 </ul> 770 } 771 772 <div class="logo u-middle dw-mod logo-mobile"> 773 <a href="/Default.aspx?ID=@firstPageId"> 774 <img class="grid__cell-img logo__img dw-mod" src="@mobileLogo" alt="@businessName" /> 775 </a> 776 </div> 777 778 @if (!onlyPreview) 779 { 780 <ul class="menu dw-mod u-pull--right"> 781 @RenderMiniCart() 782 </ul> 783 } 784 785 @MobileNavigationTrigger() 786 </div> 787 </div> 788 </nav> 789 break; 790 } 791 792 @* Mobile search *@ 793 if (!Model.Area.Item.GetBoolean("NavigationItemsHideSearch")) 794 { 795 <input type="checkbox" id="MobileSearchTrigger" class="mobile-search-trigger" /> 796 797 <div class="main-navigation-mobile typeahead-mobile dw-mod"> 798 @if (mobileNavigationPosition == "left") 799 { 800 <div class="menu dw-mod u-pull--left"> 801 <div class="menu__item menu__item--horizontal menu__item--top-level dw-mod"> 802 <label for="MobileNavTrigger" class="mobile-nav-trigger-button menu__link dw-mod"></label> 803 </div> 804 </div> 805 } 806 else 807 { 808 <ul class="menu dw-mod u-pull--left"> 809 <li class="menu__item menu__item--horizontal menu__item--top-level dw-mod"> 810 <label for="MobileSearchTrigger" class="menu__link dw-mod"> 811 <i class="fas fa-times fa-1_5x"></i> 812 </label> 813 </li> 814 </ul> 815 } 816 817 @if (mobileNavigationPosition == "right") 818 { 819 <div class="menu dw-mod u-pull--right"> 820 <div class="menu__item menu__item--horizontal menu__item--top-level dw-mod"> 821 <label for="MobileNavTrigger" class="mobile-nav-trigger-button menu__link dw-mod"></label> 822 </div> 823 </div> 824 } 825 else 826 { 827 <ul class="menu dw-mod u-pull--right"> 828 <li class="menu__item menu__item--horizontal menu__item--top-level dw-mod"> 829 <label for="MobileSearchTrigger" class="menu__link dw-mod"> 830 <i class="fas fa-times fa-1_5x"></i> 831 </label> 832 </li> 833 </ul> 834 } 835 836 <div> 837 <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"> 838 <input type="text" class="js-typeahead-search-field u-no-margin" placeholder="@searchPlaceholder" value="@searchValue"> 839 @if (string.IsNullOrEmpty(searchSecondFeedId)) 840 { 841 <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> 842 } 843 else 844 { 845 <div class="dropdown dropdown--absolute-position dropdown--combined grid dropdown--combined-mobile grid"> 846 <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> 847 <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> 848 </div> 849 } 850 <button type="button" class="btn btn--condensed btn--primary u-no-margin dw-mod js-typeahead-enter-btn"><i class="@searchIcon" style="color:white;"></i></button> 851 </div> 852 </div> 853 854 855 </div> 856 } 857 } 858 859 @* Impersonation bar *@ 860 @if (Model.CurrentUser.ID > 0 && Model.SecondaryUsers.Count > 0) 861 { 862 <div class="u-color-warning--bg"> 863 <div class="center-container top-container__center-container dw-mod"> 864 @*Impersonation*@ 865 <div class="grid"> 866 <div class="grid--align-self-center grid__col-x"> 867 @if (Model.CurrentSecondaryUser != null && Model.CurrentSecondaryUser.ID > 0) 868 { 869 string stopImpersonateTranslation = Translate("Stop impersonation"); 870 string username = ""; 871 if (!string.IsNullOrEmpty(Model.CurrentSecondaryUser.FirstName) && !string.IsNullOrEmpty(Model.CurrentSecondaryUser.LastName)) 872 { 873 username = Model.CurrentSecondaryUser.FirstName + " " + Model.CurrentSecondaryUser.LastName; 874 } 875 else if (!string.IsNullOrEmpty(Model.CurrentSecondaryUser.Name)) 876 { 877 username = Model.CurrentSecondaryUser.Name; 878 } 879 else if (!string.IsNullOrEmpty(Model.CurrentSecondaryUser.Email)) 880 { 881 username = Model.CurrentSecondaryUser.Email; 882 } 883 else 884 { 885 username = Model.CurrentSecondaryUser.UserName; 886 } 887 <div class="grid-cell"> 888 <div class="u-pull--left u-bold u-margin-top"> 889 <i class="fas fa-user-secret"></i> 890 @Pageview.User.UserName<text>&nbsp;</text>@Translate("is impersonating")<text>&nbsp;</text>@username 891 </div> 892 <form method="post" class="u-pull--right u-no-margin"> 893 <input type="submit" class="btn btn--secondary dw-mod u-no-margin" name="DwExtranetRemoveSecondaryUser" value="@stopImpersonateTranslation"> 894 </form> 895 </div> 896 } 897 else 898 { 899 string viewListTranslation = Translate("View the list of users you can impersonate"); 900 <div class="grid-cell u-bold"> 901 <i class="fas fa-user-secret"></i> 902 <a href="/Default.aspx?ID=@impersonationPageId" title="@viewListTranslation" class="u-color-font-black">@viewListTranslation</a> 903 </div> 904 } 905 </div> 906 </div> 907 </div> 908 </div> 909 } 910 </header> 911 912 <!-- Floating mini cart --> 913 @if (!Model.Area.Item.GetBoolean("NavigationItemsHideCart")) 914 { 915 if (!onlyPreview && !stickyMenu && Converter.ToString(pageId) == productsPageId && Pageview.Device.ToString() != "Mobile" && Pageview.Device.ToString() != "Tablet") 916 { 917 <div class="floating-mini-cart u-hidden dw-mod" id="FloatingMiniCart"> 918 <div class="mini-cart dw-mod"> 919 <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')"> 920 <i class="@cartIcon fa-4x"></i> 921 <div class="mini-cart__counter mini-cart__counter--lg dw-mod"> 922 <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"> 923 <div class="js-mini-cart-counter-content"> 924 @Model.Cart.TotalProductsCount 925 </div> 926 </div> 927 </div> 928 </a> 929 930 <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> 931 </div> 932 </div> 933 } 934 } 935 936 <!-- Render the content --> 937 <div id="Page" class="page @pagePos"> 938 <section class="center-container content-container dw-mod" id="content"> 939 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 940 941 942 @{ 943 string columnClass = "12"; 944 bool isProductPage = HttpContext.Current.Request.QueryString.Get("ProductID") != null ? true : false; 945 string backgroundColorClass = Model.PropertyItem.GetString("BackgroundColor") != null && !isProductPage ? "u-" + Model.PropertyItem.GetList("BackgroundColor").SelectedValue + "--bg" : ""; 946 } 947 948 @if (Model.PropertyItem.GetList("ShowBreadcrumb").SelectedValue == "True") 949 { 950 <div class="grid__col-12 grid__col--bleed-y"> 951 @RenderNavigation(new 952 { 953 id = "breadcrumb", 954 template = "Breadcrumb.xslt" 955 }) 956 </div> 957 } 958 959 <div class="grid"> 960 @if (Model.PropertyItem.GetList("LeftMenu") != null && Model.PropertyItem.GetList("LeftMenu").SelectedValue == "True" && (Pageview.Page.NavigationSettings == null || !Pageview.Page.NavigationSettings.UseEcomGroups)) 961 { 962 var navigationMarkup = RenderNavigation(new 963 { 964 id = "leftnav", 965 cssclass = "dwnavigation", 966 startLevel = 2, 967 expandmode = "all", 968 endlevel = 5, 969 template = "LeftNavigation.xslt" 970 }); 971 972 if (!string.IsNullOrEmpty(navigationMarkup)) 973 { 974 <nav class="grid__col-md-3"> 975 <div class="grid__cell"> 976 @navigationMarkup 977 </div> 978 </nav> 979 columnClass = "9"; 980 } 981 } 982 <div class="grid__col-md-@columnClass grid__col--bleed"> 983 <div class="grid"> 984 @Model.Placeholder("dwcontent", "content", "default:true;sort:1") 985 </div> 986 </div> 987 </div> 988 989 990 @* Very small hack to make it cleanly, and easily possible to change the background color on a single page *@ 991 @if (backgroundColorClass != "") 992 { 993 <script> 994 document.getElementById("Page").classList.add("@backgroundColorClass"); 995 </script> 996 } 997 </section> 998 </div> 999 </main> 1000 1001 @RenderFooter() 1002 1003 1004 1005 @helper RenderLogo(string pageId, string src, string alt) 1006 { 1007 <div class="logo dw-mod"> 1008 <a href="/Default.aspx?ID=@pageId" class="logo__img dw-mod u-block"> 1009 <img class="grid__cell-img logo__img dw-mod" src="@src" alt="@alt" /> 1010 </a> 1011 </div> 1012 } 1013 1014 @helper RenderSearch(string alignment = "left") 1015 { 1016 <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"> 1017 @if (showGroups) 1018 { 1019 <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> 1020 <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> 1021 } 1022 <div class="typeahead-search-field"> 1023 <input type="text" class="u-no-margin u-full-width u-full-height js-typeahead-search-field" placeholder="@searchPlaceholder" value="@searchValue"> 1024 @if (string.IsNullOrEmpty(searchSecondFeedId)) 1025 { 1026 int productGroupsPageId = GetPageIdByNavigationTag("ProductGroupsFeed"); 1027 <li class="menu__item--top-level u-hidden-xxs dw-mod search-element" onmouseover="document.getElementById('headerSearch').focus()"> 1028 <div class="menu__link is-dropdown is-dropdown--no-icon dw-mod u-w120px" style="margin:auto 0; padding: 0 0.5em; color:black;"> 1029 @Translate("SEARCH")<i class="fa fa-1x u-pull--right"><img id="searchIcon" class="u-margin-top" style="width:20.8125px; height:20.8125px;" src="/Admin/Public/GetImage.ashx?width=54&height=54&image=/Files/DigitalAssets/povecalo2.png" alt="Search icon" /></i> 1030 <div class="menu menu--dropdown u-w400px top-micro-search dw-mod" id="searchBox"> 1031 <div class="typeahead js-typeahead" data-page-size="10" id="ProductSearchBar" data-search-page-id="@searchFeedId&feed=true" data-result-page-id="@productsPageId" data-groups-page-id="@productGroupsPageId"> 1032 <div class="typeahead-search-field"> 1033 <div class="search-input-field"> 1034 <input type="text" class="u-no-margin js-typeahead-search-field" id="headerSearch" placeholder="@searchPlaceholder" value="@searchValue" style="display:inline;"> 1035 <i class="u-pull--right" style="padding-top:6px;"><img src="/Admin/Public/GetImage.ashx?width=20.8&height=20.8&image=/Files/DigitalAssets/povecalo2.png" alt="Magnifier icon"/></i> 1036 </div> 1037 <div style="display:none;"><ul class="dropdown dropdown--absolute-position u-min-w220px u-full-width js-handlebars-root js-typeahead-search-content" id="ProductSearchBarContent" data-template="SearchContentTemplate" data-json-feed="/Default.aspx?ID=@searchFeedId&feedType=productsOnly&feed=true" data-init-onload="false" data-preloader="minimal"></ul></div> 1038 </div> 1039 </div> 1040 </div> 1041 </div> 1042 </li> 1043 1044 <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> 1045 } 1046 else 1047 { 1048 <div class="dropdown dropdown--absolute-position dropdown--combined grid @(alignment == "right" ? "dropdown--right-aligned" : "")"> 1049 <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> 1050 <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> 1051 </div> 1052 } 1053 </div> 1054 <button type="button" class="btn btn--condensed btn--primary u-no-margin dw-mod js-typeahead-enter-btn"><i class="@searchIcon"></i></button> 1055 </div> 1056 } 1057 1058 @helper RenderMiniSearch() 1059 { 1060 1061 int productGroupsPageId = GetPageIdByNavigationTag("ProductGroupsFeed"); 1062 <li class="menu__item--top-level u-hidden-xxs dw-mod search-element" style="margin-bottom:0;" onmouseover="document.getElementById('headerSearch').focus()"> 1063 <div class="menu__link is-dropdown is-dropdown--no-icon dw-mod grid--align-self-center" style="margin:auto 0; padding: 0 0.5em; color:black;"> 1064 @Translate("SEARCH")<i class="fa fa-1x u-pull--right"><img id="searchIcon" class="u-margin-top" style="width:20.8125px; height:20.8125px;" src="/Admin/Public/GetImage.ashx?width=54&height=54&image=/Files/DigitalAssets/povecalo2.png" alt="Magnifier icon" /></i> 1065 <div class="menu menu--dropdown u-w400px top-micro-search dw-mod" id="searchBox"> 1066 <div class="typeahead js-typeahead" data-page-size="10" id="ProductSearchBar" data-search-page-id="@searchFeedId&feed=true" data-result-page-id="@productsPageId" data-groups-page-id="@productGroupsPageId"> 1067 <div class="typeahead-search-field"> 1068 <div class="search-input-field"> 1069 <input type="text" class="u-no-margin js-typeahead-search-field" id="headerSearch" placeholder="@searchPlaceholder" value="@searchValue" style="display:inline;"> 1070 <i class="u-pull--right" style="padding-top:6px;"><img src="/Admin/Public/GetImage.ashx?width=20.8&height=20.8&image=/Files/DigitalAssets/povecalo2.png" alt="Magnifier icon" /></i> 1071 </div> 1072 <div style="display:none;"><ul class="dropdown dropdown--absolute-position u-min-w220px u-full-width js-handlebars-root js-typeahead-search-content" id="ProductSearchBarContent" data-template="SearchProductsTemplate" data-json-feed="/Default.aspx?ID=@searchFeedId&feedType=productsOnly&feed=true" data-init-onload="false" data-preloader="minimal"></ul></div> 1073 </div> 1074 </div> 1075 </div> 1076 </div> 1077 </li> 1078 1079 1080 @* 1081 <li class="menu__item menu__item--horizontal menu__item--top-level u-hidden-xxs is-dropdown is-dropdown--no-icon dw-mod" onmouseover="document.getElementById('headerSearch').focus()"> 1082 1083 <div class="menu__link u-w50px dw-mod"> 1084 <i class="@searchIcon fa-1_5x"></i> 1085 </div> 1086 <div class="menu menu--dropdown u-w380px top-micro-search dw-mod"> 1087 <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"> 1088 <div class="typeahead-search-field"> 1089 <input type="text" class="u-no-margin u-full-width js-typeahead-search-field" id="headerSearch" placeholder="@searchPlaceholder" value="@searchValue"> 1090 @if (string.IsNullOrEmpty(searchSecondFeedId)) 1091 { 1092 <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> 1093 } 1094 else 1095 { 1096 <div class="dropdown dropdown--absolute-position dropdown--combined grid dropdown--right-aligned"> 1097 <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> 1098 <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> 1099 </div> 1100 } 1101 </div> 1102 </div> 1103 </div> 1104 </li> 1105 *@ 1106 1107 } 1108 1109 1110 <!-- Content rendering helpers --> 1111 1112 @helper MobileNavigation(string userInitials, string position) 1113 { 1114 int pageId = Model.TopPage.ID; 1115 int logoutPageId = 10359; 1116 string mobileNavigationLevels = Model.Area.Item.GetBoolean("MobileNavigationLevels") ? Model.Area.Item.GetString("MobileNavigationLevels") : "3"; 1117 1118 bool showCreateAccountLink = Model.Area.Item.GetBoolean("ShowCreateAccountLink"); 1119 1120 string userIcon = !String.IsNullOrEmpty(Model.Area.Item.GetItem("Icons").GetList("SignInProfileIcon").SelectedValue) ? Model.Area.Item.GetItem("Icons").GetList("SignInProfileIcon").SelectedValue.ToLower() : "fas fa-user"; 1121 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"; 1122 string languageIcon = !String.IsNullOrEmpty(Model.Area.Item.GetItem("Icons").GetList("LanguageIcon").SelectedValue) ? Model.Area.Item.GetItem("Icons").GetList("LanguageIcon").SelectedValue.ToLower() : "fas fa-globe"; 1123 1124 int miniCartFeedPageId = GetPageIdByNavigationTag("MiniCartFeed"); 1125 int cartFeedPageId = GetPageIdByNavigationTag("CartOrderlinesFeed"); 1126 int createAccountPageId = GetPageIdByNavigationTag("CreateAccount"); 1127 int loginPageId = GetPageIdByNavigationTag("SignInPage"); 1128 1129 string myProfilePageId = (Model.CurrentUser.ID <= 0) ? GetPageIdByNavigationTag("SignInPage").ToString() + "&RedirectPageId=" + GetPageIdByNavigationTag("CustomerProfile").ToString() : GetPageIdByNavigationTag("CustomerProfile").ToString(); 1130 string myOrdersPageId = (Model.CurrentUser.ID <= 0) ? GetPageIdByNavigationTag("SignInPage").ToString() + "&RedirectPageId=" + GetPageIdByNavigationTag("CustomerOrders").ToString() : GetPageIdByNavigationTag("CustomerOrders").ToString(); 1131 string myFavoritesPageId = (Model.CurrentUser.ID <= 0) ? GetPageIdByNavigationTag("SignInPage").ToString() + "&RedirectPageId=" + GetPageIdByNavigationTag("CustomerFavorites").ToString() : GetPageIdByNavigationTag("CustomerFavorites").ToString(); 1132 bool showMyProfileLink = Model.Area.Item.GetBoolean("ShowMyProfileLink"); 1133 bool showMyOrdersLink = Model.Area.Item.GetBoolean("ShowMyOrdersLink"); 1134 bool showMyFavoritesLink = Model.Area.Item.GetBoolean("ShowMyFavoritesLink"); 1135 1136 bool renderPagesInToolBar = Model.Area.Item.GetBoolean("RenderPagesInToolBar"); 1137 bool isSlidesDesign = Model.Area.Item.GetList("MobileNavigationDesign").SelectedValue == "Slides"; 1138 string menuTemplate = isSlidesDesign ? "BaseMenuForMobileSlides.xslt" : "BaseMenuForMobileExpandable.xslt"; 1139 int startLevel = renderPagesInToolBar ? 1 : 0; 1140 1141 bool onlyPreview = Model.Area.Item.GetBoolean("OnlyPreviewForAnonymous") && Model.CurrentUser.ID == 0; 1142 1143 string pageDomain = Pageview.Area.UrlName; 1144 string languageDesc = ""; 1145 switch (pageDomain) 1146 { 1147 case "hr-hr": 1148 languageDesc = "Hrvatska (HRK)"; 1149 break; 1150 case "eu-en": 1151 languageDesc = "European Union (EUR)"; 1152 break; 1153 case "na-en": 1154 languageDesc = "US & Canada (USD)"; 1155 break; 1156 case "ch-en": 1157 languageDesc = "China (CNY)"; 1158 break; 1159 case "sa-en": 1160 languageDesc = "Latin America (USD)"; 1161 break; 1162 case "uk-en": 1163 languageDesc = "United Kingdom (GBP)"; 1164 break; 1165 case "au-en": 1166 languageDesc = "Australia (AUD)"; 1167 break; 1168 case "in-en": 1169 languageDesc = "International (USD)"; 1170 break; 1171 case "jp-en": 1172 languageDesc = "Japan (JPY)"; 1173 break; 1174 1175 default: 1176 languageDesc = pageDomain; 1177 break; 1178 } 1179 1180 if (Pageview.Device.ToString() == "Mobile" || Pageview.Device.ToString() == "Tablet") 1181 { 1182 <!-- Trigger for mobile navigation --> 1183 <input type="checkbox" id="MobileNavTrigger" class="mobile-nav-trigger mobile-nav-trigger--@position" autocomplete="off" /> 1184 1185 <!-- Mobile navigation --> 1186 <nav class="mobile-navigation mobile-navigation--@position dw-mod"> 1187 @if (Model.CurrentUser.ID > 0) 1188 { 1189 string userName = Model.CurrentUser.FirstName != null ? Model.CurrentUser.FirstName : ""; 1190 userName += " " + Model.CurrentUser.LastName != null ? Model.CurrentUser.LastName : ""; 1191 userName += userName == "" && Model.CurrentUser.UserName != null ? Model.CurrentUser.UserName : ""; 1192 1193 <ul class="menu menu-mobile"> 1194 <li class="menu-mobile__item"> 1195 <a href="/default.aspx?ID=@myProfilePageId" class="menu-mobile__link dw-mod"><i class="@userIcon menu-mobile__link-icon"></i> @userName</a> 1196 </li> 1197 </ul> 1198 } 1199 1200 @RenderNavigation( 1201 new 1202 { 1203 id = "mobilenavigation", 1204 cssclass = "menu menu-mobile dwnavigation", 1205 startLevel = @startLevel - 1, 1206 ecomStartLevel = @startLevel, 1207 endlevel = 4, 1208 expandmode = "all", 1209 template = "BaseMenuForMobileExpandable.xslt" 1210 } 1211 ) 1212 1213 @RenderNavigation( 1214 new 1215 { 1216 id = "mobilenavigation", 1217 cssclass = "menu menu-mobile dwnavigation", 1218 startLevel = @startLevel, 1219 ecomStartLevel = @startLevel, 1220 endlevel = 4, 1221 expandmode = "all", 1222 template = "BaseMenuForMobileExpandableProducts.xslt" 1223 } 1224 ) 1225 1226 1227 @if (renderPagesInToolBar) 1228 { 1229 @RenderNavigation( 1230 new 1231 { 1232 id = "topToolsMobileNavigation", 1233 cssclass = "menu menu-mobile dwnavigation", 1234 template = "ToolsMenuForMobile.xslt" 1235 } 1236 ) 1237 } 1238 1239 <ul class="menu menu-mobile"> 1240 @if (!Model.Area.Item.GetBoolean("NavigationItemsHideSignIn")) 1241 { 1242 if (Model.CurrentUser.ID <= 0) 1243 { 1244 <li class="menu-mobile__item"> 1245 <a class="menu-mobile__link dw-mod" href="/Default.aspx?ID=@loginPageId"><i class="@userIcon menu-mobile__link-icon"></i> @Translate("Sign in")</a> 1246 </li> 1247 if (showCreateAccountLink) 1248 { 1249 <li class="menu-mobile__item"> 1250 <a class="menu-mobile__link dw-mod" href="/Default.aspx?ID=@createAccountPageId"><i class="@userIcon menu-mobile__link-icon"></i> @Translate("Create account")</a> 1251 </li> 1252 } 1253 } 1254 else 1255 { 1256 if (showMyProfileLink) 1257 { 1258 <li class="menu-mobile__item"> 1259 <a href="/default.aspx?ID=@myProfilePageId" class="menu-mobile__link dw-mod"><i class="@userIcon menu-mobile__link-icon"></i> @Translate("My Profile")</a> 1260 </li> 1261 } 1262 if (showMyOrdersLink) 1263 { 1264 <li class="menu-mobile__item"> 1265 <a href="/default.aspx?ID=@myOrdersPageId" class="menu-mobile__link dw-mod"><i class="fas fa-list menu-mobile__link-icon"></i> @Translate("My Orders")</a> 1266 </li> 1267 } 1268 if (showMyFavoritesLink) 1269 { 1270 <li class="menu-mobile__item"> 1271 <a href="/default.aspx?ID=@myFavoritesPageId" class="menu-mobile__link dw-mod"><i class="@favoriteIcon menu-mobile__link-icon"></i> @Translate("My Favorites")</a> 1272 </li> 1273 } 1274 <li class="menu-mobile__item"> 1275 <a class="menu-mobile__link dw-mod" href="/Admin/Public/ExtranetLogoff.aspx?ID=@logoutPageId?CurrencyCode=USD&cartcmd=emptycart"><i class="@userIcon menu-mobile__link-icon"></i> @Translate("Sign out")</a> 1276 </li> 1277 } 1278 } 1279 1280 <li class="menu-mobile__item" onclick="getElementById('MobileNavTrigger').click();"> 1281 <label for="MobileSearchTrigger" class="menu-mobile__link dw-mod"> 1282 <i class="fas fa-search fa-1x menu-mobile__link-icon"></i>@Translate("Search") 1283 </label> 1284 </li> 1285 1286 @*Render language selectors*@ 1287 1288 <li class="menu-mobile__item dw-mod is-submenu"> 1289 <input id="MobileMenuCheck_Language" type="checkbox" class="expand-trigger"> 1290 <div class="menu-mobile__link__wrap"> 1291 <span class="menu-mobile__link dw-mod">@Translate("Location"): @languageDesc</span> 1292 <label for="MobileMenuCheck_Language" class="menu-mobile__trigger"> 1293 <text> 1294 </text> 1295 </label> 1296 </div> 1297 <ul class="menu-mobile menu-mobile__submenu"> 1298 <a class="menu-mobile__link dw-mod menu-mobile__link--level-2" href="https://www.croata.com/eu-en/frontpage?CurrencyCode=EUR&cartcmd=emptycart">European Union</a> 1299 </ul> 1300 <ul class="menu-mobile menu-mobile__submenu"> 1301 <a class="menu-mobile__link dw-mod menu-mobile__link--level-2" href="https://www.croata.com/na-en/frontpage?CurrencyCode=USD&cartcmd=emptycart">US & Canada</a> 1302 </ul> 1303 <ul class="menu-mobile menu-mobile__submenu"> 1304 <a class="menu-mobile__link dw-mod menu-mobile__link--level-2" href="https://www.croata.com/ch-en/frontpage?CurrencyCode=CNY&cartcmd=emptycart">China</a> 1305 </ul> 1306 <ul class="menu-mobile menu-mobile__submenu"> 1307 <a class="menu-mobile__link dw-mod menu-mobile__link--level-2" href="https://www.croata.hr/hr-hr/frontpage?CurrencyCode=HRK&cartcmd=emptycart">Croatia (Hrvatska)</a> 1308 </ul> 1309 <ul class="menu-mobile menu-mobile__submenu"> 1310 <a class="menu-mobile__link dw-mod menu-mobile__link--level-2" href="https://www.croata.com/jp-en/frontpage?CurrencyCode=JPY&cartcmd=emptycart">Japan</a> 1311 </ul> 1312 <ul class="menu-mobile menu-mobile__submenu"> 1313 <a class="menu-mobile__link dw-mod menu-mobile__link--level-2" href="https://www.croata.com/sa-en/frontpage?CurrencyCode=USD&cartcmd=emptycart">Latin America</a> 1314 </ul> 1315 <ul class="menu-mobile menu-mobile__submenu"> 1316 <a class="menu-mobile__link dw-mod menu-mobile__link--level-2" href="https://www.croata.com/uk-en/frontpage?CurrencyCode=GBP&cartcmd=emptycart">United Kingdom</a> 1317 </ul> 1318 <ul class="menu-mobile menu-mobile__submenu"> 1319 <a class="menu-mobile__link dw-mod menu-mobile__link--level-2" href="https://www.croata.com/au-en/frontpage?CurrencyCode=AUD&cartcmd=emptycart">Australia</a> 1320 </ul> 1321 <ul class="menu-mobile menu-mobile__submenu"> 1322 <a class="menu-mobile__link dw-mod menu-mobile__link--level-2" href="https://www.croata.com/in-en/frontpage?CurrencyCode=USD&cartcmd=emptycart">International (Other)</a> 1323 </ul> 1324 </li> 1325 </ul> 1326 </nav> 1327 <label class="mobile-nav-trigger-off" for="MobileNavTrigger"></label> 1328 1329 if (!onlyPreview) 1330 { 1331 <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> 1332 } 1333 } 1334 } 1335 1336 @helper LoginModal() 1337 { 1338 int pageId = Model.TopPage.ID; 1339 string topLayout = Model.Area.Item.GetList("LayoutTop").SelectedValue; 1340 int createAccountPageId = GetPageIdByNavigationTag("CreateAccount"); 1341 int signInProfilePageId = GetPageIdByNavigationTag("SignInPage"); 1342 string forgotPasswordPageId = signInProfilePageId.ToString() + "&LoginAction=Recovery"; 1343 string userSignedInError = !Model.LogOnFailed ? "" : "checked"; 1344 string userSignedInErrorText = ""; 1345 1346 if (Model.LogOnFailed) 1347 { 1348 switch (Model.LogOnFailedReason) 1349 { 1350 case Dynamicweb.Security.UserManagement.LogOnFailedReason.PasswordLengthInvalid: 1351 userSignedInErrorText = Translate("Password length is invalid"); 1352 break; 1353 case Dynamicweb.Security.UserManagement.LogOnFailedReason.IncorrectLogin: 1354 userSignedInErrorText = Translate("Invalid email or password"); 1355 break; 1356 case Dynamicweb.Security.UserManagement.LogOnFailedReason.ExceededFailedLogOnLimit: 1357 userSignedInErrorText = Translate("You have exceeded the limit of allowed login attempts. The user account is temporarily locked"); 1358 break; 1359 case Dynamicweb.Security.UserManagement.LogOnFailedReason.LoginLocked: 1360 userSignedInErrorText = Translate("The user account is temporarily locked"); 1361 break; 1362 case Dynamicweb.Security.UserManagement.LogOnFailedReason.PasswordExpired: 1363 userSignedInErrorText = Translate("The password has expired and needs to be renewed"); 1364 break; 1365 default: 1366 userSignedInErrorText = Translate("An unknown error occured"); 1367 break; 1368 } 1369 } 1370 1371 <!-- Trigger for the login modal --> 1372 <input type="checkbox" id="SignInModalTrigger" class="modal-trigger @topLayout" @userSignedInError /> 1373 1374 <!-- Login modal --> 1375 <div class="modal-container"> 1376 <label for="SignInModalTrigger" id="SignInModalOverlay" class="modal-overlay"></label> 1377 <div class="modal modal--xs u-border" id="SignInModal"> 1378 <div class="modal__header"> 1379 <h2>@Translate("Sign in")</h2> 1380 <span style="position:absolute;top:5px;right:5px;cursor:pointer;" onclick="getElementById('SignInModalTrigger').checked = false">X</span> 1381 </div> 1382 <div class="modal__body"> 1383 <form method="post" id="LoginForm" class="u-no-margin"> 1384 1385 <input type="hidden" name="ID" value="@pageId" /> 1386 <input type="hidden" name="DWExtranetUsernameRemember" value="True" /> 1387 <input type="hidden" name="DWExtranetPasswordRemember" value="True" /> 1388 <input type="text" class="u-full-width" id="LoginUsername" name="username" placeholder="@Translate("Email")" /> 1389 <input type="password" class="u-full-width" id="LoginPassword" name="password" placeholder="@Translate("Password")" /> 1390 <div class="field-error dw-mod">@userSignedInErrorText</div> 1391 1392 <button type="submit" class="btn btn--primary btn--full dw-mod" name="LoginAction" value="Login" onclick="Buttons.LockButton(event)">@Translate("Sign in")</button> 1393 1394 <a class="btn btn--link-clean dw-mod" href="/Default.aspx?id=@forgotPasswordPageId">@Translate("Forgot your password?", "Forgot your password?")</a> 1395 1396 <a class="btn btn--link-clean dw-mod" href="/default.aspx?ID=@createAccountPageId">@Translate("Create account")?</a> 1397 </form> 1398 </div> 1399 </div> 1400 </div> 1401 } 1402 1403 @helper RenderHeaderNavigation() 1404 { 1405 bool megaMenu = Model.Area.Item.GetList("NavigationMegaMenu").SelectedValue.ToLower() == "true" ? true : false; 1406 string megamenuPromotionImage = Model.Area.Item.GetFile("NavigationMegamenuPromotionImage") != null ? Model.Area.Item.GetFile("NavigationMegamenuPromotionImage").PathUrlEncoded : ""; 1407 bool renderPagesInToolBar = Model.Area.Item.GetBoolean("RenderPagesInToolBar"); 1408 int startLevel = renderPagesInToolBar ? 1 : 0; 1409 1410 if (Pageview.Device.ToString() != "Mobile" && Pageview.Device.ToString() != "Tablet") 1411 { 1412 if (!megaMenu) 1413 { 1414 @RenderNavigation(new 1415 { 1416 id = "topnavigation", 1417 cssclass = "menu dw-mod dwnavigation u-full-max-width", 1418 startLevel = @startLevel, 1419 ecomStartLevel = @startLevel + 1, 1420 endlevel = 5, 1421 expandmode = "all", 1422 template = "BaseMenuWithDropdown.xslt" 1423 }); 1424 } 1425 else 1426 { 1427 1428 <ul class="menu dw-mod dwnavigation u-full-max-width" id="topnavigation"> 1429 1430 @RenderNavigation(new 1431 { 1432 id = "topnavigation", 1433 cssclass = "menu dw-mod dwnavigation u-full-max-width", 1434 startLevel = 0, 1435 ecomStartLevel = 1, 1436 endlevel = 4, 1437 promotionImage = megamenuPromotionImage, 1438 promotionLink = Model.Area.Item.GetString("NavigationMegamenuPromotionLink"), 1439 expandmode = "all", 1440 template = "BaseMegaMenuPages.xslt" 1441 }) 1442 1443 @RenderNavigation(new 1444 { 1445 id = "topnavigation2", 1446 cssclass = "menu dw-mod dwnavigation u-full-max-width", 1447 startLevel = @startLevel, 1448 ecomStartLevel = @startLevel + 1, 1449 endlevel = 5, 1450 promotionImage = megamenuPromotionImage, 1451 promotionLink = Model.Area.Item.GetString("NavigationMegamenuPromotionLink"), 1452 expandmode = "all", 1453 template = "BaseMegaMenuProducts.xslt" 1454 }) 1455 </ul> 1456 1457 } 1458 } 1459 } 1460 1461 @helper MobileNavigationTrigger() 1462 { 1463 @* Mobile navigation trigger *@ 1464 1465 if (Pageview.Device.ToString() == "Mobile" || Pageview.Device.ToString() == "Tablet") 1466 { 1467 <div class="menu dw-mod u-pull--left grid--align-self-center"> 1468 <div class="menu__item menu__item--horizontal menu__item--top-level dw-mod"> 1469 <label for="MobileNavTrigger" class="mobile-nav-trigger-button menu__link dw-mod"></label> 1470 </div> 1471 </div> 1472 } 1473 } 1474 1475 @helper RenderLanguageSelector(string type = "inNavigation") 1476 { 1477 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"; 1478 string menuLinkClass = type == "inNavigation" ? "menu__link" : "header-menu__link"; 1479 string languageIcon = !String.IsNullOrEmpty(Model.Area.Item.GetItem("Icons").GetList("LanguageIcon").SelectedValue) ? Model.Area.Item.GetItem("Icons").GetList("LanguageIcon").SelectedValue.ToLower() : "fas fa-globe"; 1480 string languageViewType = !String.IsNullOrEmpty(Model.Area.Item.GetList("LanguageSelectorViewType").SelectedValue) ? Model.Area.Item.GetList("LanguageSelectorViewType").SelectedValue.ToLower() : ""; 1481 string pageDomain = Pageview.Area.UrlName; 1482 string languageDesc = ""; 1483 switch (pageDomain) 1484 { 1485 case "hr-hr": 1486 languageDesc = "<a href='http://www.croata.hr/hr-hr/frontpage?CurrencyCode=HRK&cartcmd=emptycart' style='text-decoration:none; color:white;' onclick=\"getElementById('SelectLocationModalTrigger').click()\">HR</a>"; 1487 break; 1488 case "eu-en": 1489 languageDesc = "<a href='http://www.croata.com/eu-en/frontpage?CurrencyCode=EUR&cartcmd=emptycart' style='text-decoration:none; color:white;' onclick=\"getElementById('SelectLocationModalTrigger').click()\">EU</a>"; 1490 break; 1491 case "na-en": 1492 languageDesc = "<a href='http://www.croata.com/na-en/frontpage?CurrencyCode=USD&cartcmd=emptycart' style='text-decoration:none; color:white;' onclick=\"getElementById('SelectLocationModalTrigger').click()\">US&CA</a>"; 1493 break; 1494 case "ch-en": 1495 languageDesc = "<a href='http://www.croata.com/ch-en/frontpage?CurrencyCode=CNY&cartcmd=emptycart' style='text-decoration:none; color:white;' onclick=\"getElementById('SelectLocationModalTrigger').click()\">CH</a>"; 1496 break; 1497 case "sa-en": 1498 languageDesc = "<a href='http://www.croata.com/jp-en/frontpage?CurrencyCode=JPY&cartcmd=emptycart' style='text-decoration:none; color:white;' onclick=\"getElementById('SelectLocationModalTrigger').click()\">LATAM</a>"; 1499 break; 1500 case "uk-en": 1501 languageDesc = "<a href='http://www.croata.com/uk-en/frontpage?CurrencyCode=GBP&cartcmd=emptycart' style='text-decoration:none; color:white;' onclick=\"getElementById('SelectLocationModalTrigger').click()\">UK</a>"; 1502 break; 1503 case "au-en": 1504 languageDesc = "<a href='http://www.croata.com/au-en/frontpage?CurrencyCode=AUD&cartcmd=emptycart' style='text-decoration:none; color:white;' onclick=\"getElementById('SelectLocationModalTrigger').click()\">AU</a>"; 1505 break; 1506 case "in-en": 1507 languageDesc = "<a href='http://www.croata.com/in-en/frontpage?CurrencyCode=USD&cartcmd=emptycart' style='text-decoration:none; color:white;' onclick=\"getElementById('SelectLocationModalTrigger').click()\">INT</a>"; 1508 break; 1509 case "jp-en": 1510 languageDesc = "<a href='http://www.croata.com/jp-en/frontpage?CurrencyCode=JPY&cartcmd=emptycart' style='text-decoration:none; color:white;' onclick=\"getElementById('SelectLocationModalTrigger').click()\">JP</a>"; 1511 break; 1512 1513 default: 1514 languageDesc = pageDomain; 1515 break; 1516 } 1517 1518 @* Language selector *@ 1519 if (Model.Languages.Count >= 1) 1520 { 1521 <li class="@liClasses" id="langLink"> 1522 <div class="@menuLinkClass dw-mod" style="font-family:'Montserrat', sans-serif;font-size:1em !important;font-weight:500;color:rgb(242,242,242);"> 1523 @languageDesc 1524 </div> 1525 </li> 1526 } 1527 } 1528 1529 @helper RenderMiniCart(string type = "inNavigation") 1530 { 1531 bool onlyPreview = Model.Area.Item.GetBoolean("OnlyPreviewForAnonymous") && Model.CurrentUser.ID == 0; 1532 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"; 1533 1534 if (!onlyPreview && !Model.Area.Item.GetBoolean("NavigationItemsHideCart")) 1535 { 1536 string liClasses = type == "inNavigation" ? "menu__item menu__item--horizontal menu__item--top-level dw-mod" : "menu__item menu__item--horizontal menu--clean dw-mod"; 1537 string menuLinkClass = type == "inNavigation" ? "menu__link" : "header-menu__link"; 1538 1539 int miniCartFeedPageId = GetPageIdByNavigationTag("MiniCartFeed"); 1540 int cartFeedPageId = GetPageIdByNavigationTag("CartOrderlinesFeed"); 1541 int cartPageId = GetPageIdByNavigationTag("CartPage"); 1542 double cartProductsCount = Model.Cart.TotalProductsCount; 1543 1544 @* Mini cart *@ 1545 <li class="@liClasses" onmouseenter="Cart.UpdateMiniCart(event, 'miniCart', '/Default.aspx?ID=@miniCartFeedPageId&feedType=MiniCart')"> 1546 <div class="mini-cart dw-mod"> 1547 <a href="/Default.aspx?ID=@cartPageId&Purge=True" id="miniCartCounterWrap" class="@menuLinkClass dw-mod js-mini-cart-button u-w50px"> 1548 <i class="fa fa-shopping-cart fa-1x"></i> 1549 <div class="mini-cart__counter mini-cart__counter--inline dw-mod"> 1550 <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"> 1551 <div class="js-mini-cart-counter-content"> 1552 @cartProductsCount 1553 </div> 1554 </div> 1555 </div> 1556 </a> 1557 @if (Pageview.Device.ToString() != "Mobile" && Pageview.Device.ToString() != "Tablet") 1558 { 1559 <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> 1560 } 1561 </div> 1562 </li> 1563 } 1564 } 1565 1566 @helper RenderSignIn(string type = "inNavigation", string userInitials = "") 1567 { 1568 if (!Model.Area.Item.GetBoolean("NavigationItemsHideSignIn")) 1569 { 1570 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"; 1571 string menuLinkClass = type == "inNavigation" ? "menu__link" : "header-menu__link"; 1572 1573 string userIcon = !String.IsNullOrEmpty(Model.Area.Item.GetItem("Icons").GetList("SignInProfileIcon").SelectedValue) ? Model.Area.Item.GetItem("Icons").GetList("SignInProfileIcon").SelectedValue.ToLower() : "fas fa-user"; 1574 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"; 1575 1576 int pageId = Model.TopPage.ID; 1577 int logoutPageId = 10359; 1578 string myProfilePageId = (Model.CurrentUser.ID <= 0) ? GetPageIdByNavigationTag("SignInPage").ToString() + "&RedirectPageId=" + GetPageIdByNavigationTag("CustomerProfile").ToString() : GetPageIdByNavigationTag("CustomerProfile").ToString(); 1579 string myOrdersPageId = (Model.CurrentUser.ID <= 0) ? GetPageIdByNavigationTag("SignInPage").ToString() + "&RedirectPageId=" + GetPageIdByNavigationTag("CustomerOrders").ToString() : GetPageIdByNavigationTag("CustomerOrders").ToString(); 1580 int myDashboardPageId = GetPageIdByNavigationTag("CustomerDashboard"); 1581 string myFavoritesPageId = (Model.CurrentUser.ID <= 0) ? GetPageIdByNavigationTag("SignInPage").ToString() + "&RedirectPageId=" + GetPageIdByNavigationTag("CustomerFavorites").ToString() : GetPageIdByNavigationTag("CustomerFavorites").ToString(); 1582 string mySavedCardsPageId = (Model.CurrentUser.ID <= 0) ? GetPageIdByNavigationTag("SignInPage").ToString() + "&RedirectPageId=" + GetPageIdByNavigationTag("SavedCards").ToString() : GetPageIdByNavigationTag("SavedCards").ToString(); 1583 int createAccountPageId = GetPageIdByNavigationTag("CreateAccount"); 1584 int signInProfilePageId = GetPageIdByNavigationTag("SignInPage"); 1585 string forgotPasswordPageId = signInProfilePageId.ToString() + "&LoginAction=Recovery"; 1586 1587 bool showCreateAccountLink = Model.Area.Item.GetBoolean("ShowCreateAccountLink"); 1588 bool showMyProfileLink = Model.Area.Item.GetBoolean("ShowMyProfileLink"); 1589 bool showMyOrdersLink = Model.Area.Item.GetBoolean("ShowMyOrdersLink"); 1590 bool showMyFavoritesLink = Model.Area.Item.GetBoolean("ShowMyFavoritesLink"); 1591 bool showMySavedCardsLink = Model.Area.Item.GetBoolean("ShowMySavedCardsLink"); 1592 string pageSubDomain = Dynamicweb.Frontend.PageView.Current().Area.UrlName; 1593 1594 @* Sign in + Customer center links *@ 1595 <li class="@liClasses is-dropdown is-dropdown--no-icon"> 1596 <div class="@menuLinkClass u-w50px dw-mod"> 1597 @if (Model.CurrentUser.ID <= 0) 1598 { 1599 var loginPageId = GetPageIdByNavigationTag("SignInPage"); 1600 <a href="/Default.aspx?ID=@loginPageId"><i class="fa fa-1x"><img class="u-margin-top" src="/Admin/Public/GetImage.ashx?width=19&height=19&image=/Files/DigitalAssets/LoginIcon.png" alt="Login icon"/></i></a> 1601 } 1602 else 1603 { 1604 <a href="/default.aspx?ID=@myDashboardPageId" class="u-color-inherit"><div class="circle-icon-btn">@userInitials.ToUpper()</div></a> 1605 } 1606 </div> 1607 <div class="menu menu--dropdown sign-in-dropdown dw-mod"> 1608 <ul class="list list--clean dw-mod"> 1609 @if (Model.CurrentUser.ID <= 0) 1610 { 1611 <li> 1612 <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> 1613 </li> 1614 if (showCreateAccountLink) 1615 { 1616 <li> 1617 <a href="/default.aspx?ID=@createAccountPageId" class="list__link dw-mod">@Translate("Create account")</a> 1618 </li> 1619 } 1620 <li> 1621 <a href="/default.aspx?ID=@forgotPasswordPageId" class="list__link dw-mod">@Translate("Forgot your password?")</a> 1622 </li> 1623 if (showMyProfileLink || showMyOrdersLink || showMyFavoritesLink || showMySavedCardsLink) 1624 { 1625 <li class="list__seperator dw-mod"></li> 1626 } 1627 } 1628 @if (showMyProfileLink) 1629 { 1630 <li> 1631 <a href="/default.aspx?ID=@myProfilePageId" class="list__link dw-mod"><i class="@userIcon u-margin-right"></i>@Translate("My Profile")</a> 1632 </li> 1633 } 1634 @if (showMyOrdersLink) 1635 { 1636 <li> 1637 <a href="/default.aspx?ID=@myOrdersPageId" class="list__link dw-mod"><i class="fas fa-list u-margin-right"></i>@Translate("My Orders")</a> 1638 </li> 1639 } 1640 @if (showMyFavoritesLink) 1641 { 1642 <li> 1643 <a href="/default.aspx?ID=@myFavoritesPageId" class="list__link dw-mod"><i class="@favoriteIcon u-margin-right"></i>@Translate("My Favorites")</a> 1644 </li> 1645 } 1646 @if (showMySavedCardsLink) 1647 { 1648 <li> 1649 <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> 1650 </li> 1651 } 1652 @if (Model.CurrentUser.ID > 0) 1653 { 1654 if (showMyProfileLink || showMyOrdersLink || showMyFavoritesLink || showMySavedCardsLink) 1655 { 1656 <li class="list__seperator dw-mod"></li> 1657 } 1658 <li> 1659 <a href="/Admin/Public/ExtranetLogoff.aspx?ID=@logoutPageId?CurrencyCode=USD&cartcmd=emptycart" class="list__link dw-mod">@Translate("Sign out")</a> 1660 </li> 1661 } 1662 </ul> 1663 </div> 1664 </li> 1665 } 1666 } 1667 1668 @helper RenderFavorites(string type = "inNavigation") 1669 { 1670 if (!Model.Area.Item.GetBoolean("NavigationItemsHideFavorites")) 1671 { 1672 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"; 1673 string menuLinkClass = type == "inNavigation" ? "menu__link" : "header-menu__link"; 1674 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"; 1675 string myFavoritesPageId = GetPageIdByNavigationTag("CustomerFavorites").ToString(); 1676 1677 @* Favorites *@ 1678 if (Model.CurrentUser.ID > 0) 1679 { 1680 <li class="@liClasses"> 1681 <a href="/Default.aspx?ID=@myFavoritesPageId" class="@menuLinkClass u-w50px dw-mod"> 1682 <i class="@favoriteIcon fa-1x"></i> 1683 </a> 1684 </li> 1685 } 1686 } 1687 } 1688 1689 1690 @helper RenderFooter() 1691 { 1692 string pageSubDomain = Dynamicweb.Frontend.PageView.Current().Area.UrlName; 1693 1694 <!-- Footer section --> 1695 <footer class="footer dw-mod"> 1696 <div class="center-container top-container__center-container dw-mod"> 1697 <div class="grid grid--justify-center" style="padding:10px 30px;"> 1698 <div class="grid__col-md-3 grid__col-xs-6"> 1699 <span class="footerCellTitle">@Translate("CUSTOMER SERVICE")</span> 1700 <a href="/@pageSubDomain/terms-and-conditions?paragraph=tabs-1&button=button-1">@Translate("Delivery informations")</a> 1701 <a href="/@pageSubDomain/terms-and-conditions?paragraph=tabs-3&button=button-3">@Translate("Purchase informations")</a> 1702 <a href="/@pageSubDomain/terms-and-conditions?paragraph=tabs-6&button=button-6" ">@Translate("CROATA shops")</a> 1703 1704 </div> 1705 <div class="grid__col-md-3 grid__col-xs-6"> 1706 <span class="footerCellTitle">@Translate("ABOUT US")</span> 1707 <a href="/@pageSubDomain/contact-us">@Translate("Contact us")</a> 1708 <a href="/@pageSubDomain/press-informations">@Translate("Press inquiries")</a> 1709 <a href="/@pageSubDomain/careers">@Translate("Careers")</a> 1710 </div> 1711 <div class="grid__col-md-3 grid__col-xs-6"> 1712 <span class="footerCellTitle">@Translate("LEGAL NOTICE")</span> 1713 <a href="/@pageSubDomain/terms-and-conditions?paragraph=tabs-2&button=button-2">@Translate("Terms and Conditions")</a> 1714 <a href="/@pageSubDomain/terms-and-conditions?paragraph=tabs-4&button=button-4">@Translate("Privacy Policy")</a> 1715 <a href="/@pageSubDomain/terms-and-conditions?paragraph=tabs-4&button=button-4">@Translate("Cookie Policy")</a> 1716 </div> 1717 1718 <div class="grid__col-md-3 grid__col-xs-6"> 1719 <span class="footerCellTitle">@Translate("NEWSLETTER")</span> 1720 <span>@Translate("Let’s stay in touch*")</span> 1721 <div style="position:relative;"> 1722 <form id="submitNewsletter" action="/@pageSubDomain/" style="margin-bottom:0;"> 1723 <div class="form__field-group" style="position:relative; top:0;margin-bottom:0;width:100%"> 1724 <input type="email" id="emailFooter" name="UserManagement_Form_Email" placeholder="E-mail:" style="padding-right:35px;" /> 1725 <input type="submit" 1726 class="emailFooterSubmitBtn" name="Email_Submited" style="width:35px;height:100%;position:absolute; top:0;right:0;border: 0; background-color: white;" 1727 tabindex="-1" value=" " /> 1728 1729 </div> 1730 </form> 1731 </div> 1732 @*<span>@Translate("*we reward you with 10% off on your first purchase")</span>*@ 1733 </div> 1734 </div> 1735 </div> 1736 </footer> 1737 <div class="followUsFooter grid--justify-center grid__cell--padding-lg" style="cursor:pointer;"> 1738 <a href="http://www.facebook.com/croatalife"><i class="fab fa-facebook-square fa-1_5x"></i></a> 1739 <a href="http://instagram.com/croatalife"><i class="fab fa-instagram fa-1_5x"></i></a> 1740 <a href="http://www.pinterest.com/croatalife/"><i class="fab fa-pinterest-square fa-1_5x"></i></a> 1741 <a href="http://www.linkedin.com/showcase/croata"><i class="fab fa-linkedin fa-1_5x"></i></a> 1742 <a href="https://www.youtube.com/channel/UC6UKVh1GFpwBX74ve2obh4Q"><i class="fab fa-youtube fa-1_5x"></i></a> 1743 </div> 1744 <div class="grid--justify-center grid__cell--padding-lg" style="font-size:12px; margin-bottom:70px;"> 1745 * @Translate("Subscribe to receive croata newsletter (communication regarding our products, offers and events). By subscribing you agree to our ")<a href="/@pageSubDomain/terms-and-conditions" style="text-decoration:underline;">@Translate("privacy policy")</a>. 1746 </div> 1747 } 1748 1749 1750 @* Templates for Typeahead *@ 1751 @if (!Model.Area.Item.GetBoolean("NavigationItemsHideSearch")) 1752 { 1753 <script id="SearchGroupsTemplate" type="text/x-template"> 1754 {{#.}} 1755 <li class="dropdown__item dw-mod" onclick="Search.UpdateGroupSelection(this)" data-group-id="{{id}}">{{name}}</li> 1756 {{/.}} 1757 </script> 1758 1759 <script id="SearchProductsTemplate" type="text/x-template"> 1760 {{#each .}} 1761 {{#Product}} 1762 {{#ifCond template "!==" "SearchMore"}} 1763 <li class="dropdown__item dropdown__item--seperator dw-mod"> 1764 <div> 1765 <a href="{{link}}" class="js-typeahead-link u-color-inherit u-pull--left"> 1766 <div class="u-margin-right u-pull--left {{noimage}} u-hidden-xs u-hidden-xxs"><img src="/Admin/Public/GetImage.ashx?width=45&height=36&crop=5&FillCanvas=True&Compression=75&image={{image}}" alt="{{name}}"></div> 1767 <div class="u-pull--left"> 1768 <div class="u-bold u-max-w220px u-truncate-text js-typeahead-name">{{name}}</div> 1769 @if (!onlyPreview) 1770 { 1771 <div class="{{onlyPreview}}">{{price}}</div> 1772 } 1773 </div> 1774 </a> 1775 <div class="u-margin-left u-pull--right u-w80px"> 1776 <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> 1777 <a href="{{link}}" class="btn btn--secondary btn--condensed btn--full u-no-margin dw-mod {{hideViewMore}} js-ignore-click-outside">@Translate("View")</a> 1778 </div> 1779 </div> 1780 </li> 1781 {{/ifCond}} 1782 {{#ifCond template "===" "SearchMore"}} 1783 {{>SearchMoreProducts}} 1784 {{/ifCond}} 1785 {{/Product}} 1786 {{else}} 1787 <li class="dropdown__item dropdown__item--seperator dw-mod"> 1788 @Translate("Your search gave 0 results") 1789 </li> 1790 {{/each}} 1791 </script> 1792 1793 <script id="SearchMoreProducts" type="text/x-template"> 1794 <li class="dropdown__item dropdown__item--not-selectable {{stickToBottom}} dw-mod"> 1795 <a href="/Default.aspx?ID=@productsPageId&Search={{searchParameter}}" class="btn btn--primary btn--full u-no-margin dw-mod js-typeahead-link"> 1796 @Translate("View all") 1797 </a> 1798 </li> 1799 </script> 1800 1801 <script id="SearchMorePages" type="text/x-template"> 1802 <li class="dropdown__item dropdown__item--not-selectable {{stickToBottom}} dw-mod"> 1803 <a href="/Default.aspx?ID=@contentSearchPageId&Search={{searchParameter}}" class="btn btn--primary btn--full u-no-margin dw-mod js-typeahead-link"> 1804 @Translate("View all") 1805 </a> 1806 </li> 1807 </script> 1808 1809 <script id="SearchPagesTemplate" type="text/x-template"> 1810 {{#each .}} 1811 {{#ifCond template "!==" "SearchMore"}} 1812 <li class="dropdown__item dropdown__item--seperator dw-mod"> 1813 <div> 1814 <a href="/Default.aspx?ID={{id}}" class="js-typeahead-link u-pull--left u-color-inherit"> 1815 <div class="u-margin-right u-pull--left"><i class="fa {{icon}} u-w20px u-ta-center"></i></div> 1816 <div class="u-pull--left"> 1817 <div class="u-bold u-truncate-text u-max-w220px js-typeahead-name">{{name}}</div> 1818 </div> 1819 </a> 1820 </div> 1821 </li> 1822 {{/ifCond}} 1823 {{#ifCond template "===" "SearchMore"}} 1824 {{>SearchMorePages}} 1825 {{/ifCond}} 1826 {{else}} 1827 <li class="dropdown__item dropdown__item--seperator dw-mod"> 1828 @Translate("Your search gave 0 results") 1829 </li> 1830 {{/each}} 1831 </script> 1832 1833 <script id="SearchPagesTemplateWrap" type="text/x-template"> 1834 <div class="dropdown__column-header">@Translate("Pages")</div> 1835 <ul class="dropdown__list u-min-w220px u-full-width u-margin-bottom dw-mod"> 1836 {{>SearchPagesTemplate}} 1837 </ul> 1838 </script> 1839 1840 <script id="SearchProductsTemplateWrap" type="text/x-template"> 1841 <div class="dropdown__column-header">@Translate("Products")</div> 1842 <ul class="dropdown__list u-min-w220px u-full-width u-margin-bottom dw-mod"> 1843 {{>SearchProductsTemplate}} 1844 </ul> 1845 </script> 1846 } 1847 1848 @* Templates for the mini cart *@ 1849 @if (!Model.Area.Item.GetBoolean("NavigationItemsHideCart")) 1850 { 1851 <script id="MiniCartCounterContent" type="text/x-template"> 1852 {{#.}} 1853 <div class="js-mini-cart-counter-content dw-mod"> 1854 {{numberofproducts}} 1855 </div> 1856 {{/.}} 1857 </script> 1858 1859 <script id="MiniCartContent" type="text/x-template"> 1860 {{#.}} 1861 <div class="mini-cart-dropdown__inner {{isempty}} dw-mod"> 1862 <h4 class="u-ta-center u-no-margin u-margin-bottom u-margin-top">@Translate("Shopping cart")</h4> 1863 <div class="mini-cart-dropdown__body dw-mod" style="font-size: 1.47rem;"> 1864 <table class="table mini-cart-table dw-mod"> 1865 <thead> 1866 <tr> 1867 <td>&nbsp;</td> 1868 <td>@Translate("Product")</td> 1869 <td class="u-ta-right">@Translate("Qty")</td> 1870 <td class="u-ta-right" width="120">@Translate("Price")</td> 1871 </tr> 1872 </thead> 1873 1874 {{#OrderLines}} 1875 {{#ifCond template "===" "CartOrderline"}} 1876 {{>MiniCartOrderline}} 1877 {{/ifCond}} 1878 {{#ifCond template "===" "CartOrderlineMobile"}} 1879 {{>MiniCartOrderlineMobile}} 1880 {{/ifCond}} 1881 {{#ifCond template "===" "CartOrderlineDiscount"}} 1882 {{>MiniCartOrderlineDiscount}} 1883 {{/ifCond}} 1884 {{/OrderLines}} 1885 1886 @*{{#if paymentmethod}} 1887 <tr> 1888 <td><i class="fas fa-credit-card"></i></td> 1889 <td>{{paymentmethod}}</td> 1890 <td colspan="2" class="u-ta-right" width="130">{{paymentfee}}</td> 1891 </tr> 1892 {{/if}}*@ 1893 {{#if shippingmethod}} 1894 <tr> 1895 <td><i class="fas fa-truck"></i></td> 1896 <td>{{shippingmethod}}</td> 1897 <td colspan="2" class="u-ta-right" width="130">{{shippingfee}}</td> 1898 </tr> 1899 {{/if}} 1900 <tr class="mini-cart-totals dw-mod"> 1901 <td colspan="2">@Translate("Total")</td> 1902 <td class="u-ta-right">{{numberofproducts}}</td> 1903 <td class="u-ta-right" width="130">{{totalprice}}</td> 1904 </tr> 1905 </table> 1906 </div> 1907 1908 <table class="table mini-cart-table dw-mod"> 1909 <tr class="mini-cart-orderlines__footer dw-mod"> 1910 <td colspan="2"><button type="button" class="btn btn--primary u-pull--left u-no-margin dw-mod btn--sm" onclick="Cart.EmptyCart(event)">@Translate("Empty cart")</button></td> 1911 <td colspan="2" class="u-ta-right"><a href="/Default.aspx?ID=@cartPageId" class="btn btn--secondary u-pull--right u-no-margin dw-mod btn--sm">@Translate("Proceed to checkout")</a></td> 1912 </tr> 1913 </table> 1914 </div> 1915 {{/.}} 1916 </script> 1917 1918 <script id="MiniCartOrderline" type="text/x-template"> 1919 <tr class="{{isempty}}"> 1920 <td><a href="{{link}}" class="{{hideimage}}"><img src="/Admin/Public/GetImage.ashx?width=50&height=50&crop=5&Compression=75&image={{image}}" alt="{{name}}" style="min-height:50px;min-width:50px;"></a></td> 1921 <td> 1922 <a href="{{link}}" class="mini-cart-orderlines__name" title="{{name}}">{{name}}</a> 1923 {{#if variantname}} 1924 <a href="{{link}}" class="mini-cart-orderlines__name mini-cart-orderlines__name--small">{{variantname}}</a> 1925 {{/if}} 1926 {{#if unitname}} 1927 <div class="mini-cart-orderlines__name mini-cart-orderlines__name--small">{{unitname}}</div> 1928 {{/if}} 1929 </td> 1930 <td class="u-ta-right">{{quantity}}</td> 1931 <td class="u-ta-right">{{totalprice}}</td> 1932 </tr> 1933 </script> 1934 1935 <script id="MiniCartOrderlineMobile" type="text/x-template"> 1936 <tr class="{{isempty}}"> 1937 <td><a href="{{link}}" class="{{hideimage}}"><img src="/Admin/Public/GetImage.ashx?width=50&height=50&crop=5&Compression=75&image={{image}}" alt="{{name}}"></a></td> 1938 <td> 1939 <a href="{{link}}" class="mini-cart-orderlines__name">{{name}}</a> 1940 {{#if variantname}} 1941 <a href="{{link}}" class="mini-cart-orderlines__name mini-cart-orderlines__name--small">{{variantname}}</a> 1942 {{/if}} 1943 {{#if unitname}} 1944 <div class="mini-cart-orderlines__name mini-cart-orderlines__name--small">{{unitname}}</div> 1945 {{/if}} 1946 </td> 1947 <td class="u-ta-right">{{quantity}}</td> 1948 <td class="u-ta-right">{{totalprice}}</td> 1949 </tr> 1950 </script> 1951 1952 <script id="MiniCartOrderlineDiscount" type="text/x-template"> 1953 <tr class="table__row--no-border {{isempty}}"> 1954 <td>&nbsp;</td> 1955 <td><div class="mini-cart-orderlines__name dw-mod">{{name}}</div></td> 1956 <td class="u-ta-right">&nbsp;</td> 1957 <td class="u-ta-right">{{totalprice}}</td> 1958 </tr> 1959 </script> 1960 } 1961 1962 <!-- Javascript --> 1963 <script src="/Files/Templates/Designs/Rapido/js/handlebars-v4.0.11.js"></script> 1964 <script src="/Files/Templates/Designs/Rapido/js/master.min.js"></script> 1965 1966 @if (Model.Area.Item.GetBoolean("UseCustomJavascript")) 1967 { 1968 <script src="/Files/Templates/Designs/Rapido/js/custom.js"></script> 1969 } 1970 <script> 1971 /**/ 1972 Wireframe.Init(@wireframeMode.ToLower()); 1973 /**/ 1974 </script> 1975 <!--@Javascripts--> 1976 </body> 1977 </html> 1978 1979