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