Error executing template "Designs/Rapido/_parsed/PageAirconteknik.parsed.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
   at CompiledRazorTemplates.Dynamic.RazorEngine_64cd347f2add45ff8bc33a1f5c663f46.Execute() in E:\HJJ.Web\Files\Templates\Designs\Rapido\_parsed\PageAirconteknik.parsed.cshtml:line 647
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader)
   at RazorEngine.Templating.RazorEngineCore.RunTemplate(ICompiledTemplate template, TextWriter writer, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.DynamicWrapperService.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 RazorEngine.Templating.RazorEngineServiceExtensions.RunCompile(IRazorEngineService service, String name, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.RunCompile(IRazorEngineService service, ITemplateSource templateSource, String name, Type modelType, Object model, DynamicViewBag viewBag)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 2 3 @* Rapido version 2.0.2 *@ 4 5 @using Dynamicweb.Frontend.Devices 6 @using Dynamicweb.Extensibility 7 @using Dynamicweb.Content 8 @using Dynamicweb.Security 9 @using System 10 @using System.Linq 11 @using System.Web 12 @using System.IO 13 @using Dynamicweb.Admin 14 @using Dynamicweb.Admin.dk.dynamicweb.templates 15 @using Dynamicweb.Data 16 @using Page = Dynamicweb.Content.Page 17 18 @{ 19 //General settings 20 string favicon = Model.Area.Item.GetFile("LogoFavicon") != null ? Model.Area.Item.GetFile("LogoFavicon").Path : "/Files/Images/favicon.png"; 21 string logo = Model.Area.Item.GetFile("LogoImage") != null ? Model.Area.Item.GetFile("LogoImage").Path : "/Files/Images/logo-dynamicweb.png"; 22 if (Path.GetExtension(logo).ToLower() != ".svg") 23 { 24 logo = "/Admin/Public/GetImage.ashx?height=40&amp;crop=5&amp;Compression=75&amp;image=" + @logo; 25 } 26 27 string searchPlaceholder = Translate("Search products", "Search products"); 28 string searchValue = HttpContext.Current.Request.QueryString.Get("Search") != null ? HttpContext.Current.Request.QueryString.Get("Search") : ""; 29 string wireframeMode = Model.Area.Item.GetBoolean("WireframeMode").ToString(); 30 31 //Font settings 32 string navigationFont = Model.Area.Item.GetItem("NavigationFont").GetGoogleFont("FontFamily").Family.Replace(" ", "+"); 33 string mobileNavigationFont = Model.Area.Item.GetItem("MobileNavigationFont").GetGoogleFont("FontFamily").Family.Replace(" ", "+"); 34 string headerFont = Model.Area.Item.GetItem("ContentLayoutHeaderFont").GetGoogleFont("FontFamily").Family.Replace(" ", "+"); 35 string subHeaderFont = Model.Area.Item.GetItem("ContentLayoutSubheaderFont").GetGoogleFont("FontFamily").Family.Replace(" ", "+"); 36 string contentFont = Model.Area.Item.GetItem("ContentLayoutBodyText").GetGoogleFont("FontFamily").Family.Replace(" ", "+"); 37 string newStickersFont = Model.Area.Item.GetItem("NewStickersFont").GetGoogleFont("FontFamily").Family.Replace(" ", "+"); 38 string customStickersFont = Model.Area.Item.GetItem("CustomStickersFont").GetGoogleFont("FontFamily").Family.Replace(" ", "+"); 39 string toolsMenuFont = Model.Area.Item.GetItem("ToolsMenuFont").GetGoogleFont("FontFamily").Family.Replace(" ", "+"); 40 41 //Page IDs for use in the template 42 int pageId = Model.TopPage.ID; 43 string firstPageId = Model.Area.FirstActivePage.ID.ToString(); 44 int cartPageId = GetPageIdByNavigationTag("CartPage"); 45 int miniCartFeedPageId = GetPageIdByNavigationTag("MiniCartFeed"); 46 int cartFeedPageId = GetPageIdByNavigationTag("CartOrderlinesFeed"); 47 //int productsPageId = GetPageIdByNavigationTag("ProductsPage"); 48 int productsPageId = GetPageIdByNavigationTag("SearchPage"); 49 int productsSearchFeedId = productsPageId; 50 int productGroupsPageId = GetPageIdByNavigationTag("ProductGroupsFeed"); 51 int impersonationPageId = GetPageIdByNavigationTag("Impersonation"); 52 53 bool stickyMenu = Pageview.Device.ToString() == "Mobile" || Pageview.Device.ToString() == "Tablet" ? false : Model.Area.Item.GetBoolean("NavigationStickyMenu"); 54 string stickyTop = stickyMenu ? "top-container--sticky" : ""; 55 string pagePos = stickyMenu ? "js-page-pos" : ""; 56 string topLayout = Model.Area.Item.GetList("LayoutTop").SelectedValue; 57 bool renderPagesInToolBar = Model.Area.Item.GetBoolean("RenderPagesInToolBar"); 58 string toolbarText = Model.Area.Item.GetString("ToolbarText"); 59 bool onlyPreview = Model.Area.Item.GetBoolean("OnlyPreviewForAnonymous") && Model.CurrentUser.ID == 0; 60 61 string autoCssLink = "/Files/Templates/Designs/Rapido/css/rapido/rapido_" + Model.Area.ID.ToString() + ".min.css?ticks=" + Model.Area.UpdatedDate.Ticks; 62 63 string userInitials = ""; 64 if (Model.CurrentUser.ID != 0) 65 { 66 if (!String.IsNullOrEmpty(Model.CurrentUser.Name)) 67 { 68 string[] names = Model.CurrentUser.Name.Split(' '); 69 userInitials += Model.CurrentUser.Name.Substring(0, 1); 70 71 if (names.Length > 1) 72 { 73 userInitials += names[names.Length - 1].Substring(0, 1); 74 } 75 } 76 else 77 { 78 userInitials += Model.CurrentUser.FirstName != null && Model.CurrentUser.FirstName != "" ? Model.CurrentUser.FirstName.Substring(0, 1) : ""; 79 userInitials += Model.CurrentUser.LastName != null && Model.CurrentUser.LastName != "" ? Model.CurrentUser.LastName.Substring(0, 1) : ""; 80 userInitials += userInitials.Length == 1 && Model.CurrentUser.FirstName != null && Model.CurrentUser.FirstName.Length > 1 ? Model.CurrentUser.FirstName.Substring(1, 2) : ""; 81 userInitials += userInitials == "" && Model.CurrentUser.Email != null && Model.CurrentUser.Email.Length > 1 ? Model.CurrentUser.Email.Substring(0, 2) : ""; 82 userInitials += userInitials == "" ? Model.CurrentUser.UserName.Substring(0, 2) : ""; 83 } 84 } 85 86 string siteURL = Dynamicweb.Context.Current.Request.Url.Scheme + "://" + Dynamicweb.Context.Current.Request.Url.Host; 87 string businessPhotoPath = Model.Area.Item.GetFile("BusinessPhoto") != null ? Model.Area.Item.GetFile("BusinessPhoto").Path : ""; 88 string businessName = Model.Area.Item.GetString("BusinessName"); 89 var address = Model.Area.Item.GetItem("Address"); 90 string streetAddress = ""; 91 string addressLocality = ""; 92 string addressRegion = ""; 93 string postalCode = ""; 94 string addressCountry = ""; 95 if (address != null) 96 { 97 streetAddress = address.GetString("StreetAddress"); 98 addressLocality = address.GetString("City"); 99 addressRegion = address.GetString("Region"); 100 postalCode = address.GetString("PostalCode"); 101 addressCountry = address.GetString("Country"); 102 } 103 string contactEmail = Model.Area.Item.GetString("ContactEmail"); 104 string contactNumber = Model.Area.Item.GetString("ContactNumber"); 105 106 string siteName = "<!--@Global:Area.Name-->"; 107 //*custom tools menu*// 108 string toolsMenuPhoneText = Model.Area.Item.GetString("Telephone"); 109 string toolsMenuPhoneIcon = Model.Area.Item.GetFile("TelephoneIcon") != null ? Model.Area.Item.GetFile("TelephoneIcon").Path : ""; 110 111 if (Path.GetExtension(toolsMenuPhoneIcon).ToLower() != ".svg") 112 { 113 toolsMenuPhoneIcon = "/Admin/Public/GetImage.ashx?width=30&height=20&crop=5&FillCanvas=True&Compression=75&image=" + toolsMenuPhoneIcon; 114 } 115 116 string toolsMenuEmailText = Model.Area.Item.GetString("Email"); 117 string toolsMenuEmailIcon = Model.Area.Item.GetFile("EmailIcon") != null ? Model.Area.Item.GetFile("EmailIcon").Path : ""; 118 119 if (Path.GetExtension(toolsMenuEmailIcon).ToLower() != ".svg") 120 { 121 toolsMenuEmailIcon = "/Admin/Public/GetImage.ashx?width=30&height=20&crop=5&FillCanvas=True&Compression=75&image=" + toolsMenuEmailIcon; 122 } 123 124 var customMenuItems = Model.Area.Item.GetList("Links"); 125 126 string metaDescription = ""; 127 string pgMetaTitle = ""; 128 var cb = CommandBuilder.Create("SELECT [PageMetaTitle], [PageTemplateDescription] FROM [Page] WHERE [PageId] = '" + @pageId + "' "); 129 130 using (var dr = Database.CreateDataReader(cb)) 131 { 132 while (dr.Read()) 133 { 134 pgMetaTitle = dr.GetString(0); 135 metaDescription = dr.GetString(1); 136 } 137 dr.Close(); 138 } 139 140 string metaTitle = !string.IsNullOrEmpty(pgMetaTitle) ? pgMetaTitle : siteName; 141 142 Dynamicweb.Content.Items.Item customSettings = Dynamicweb.Content.Items.Item.GetItemById("CustomWebsiteSettings", Pageview.Area.Item["CustomSettings"].ToString()); 143 string gtmId = customSettings["GTMID"].ToString(); 144 145 } 146 <!DOCTYPE html> 147 148 <html lang="@Pageview.Area.CultureInfo.TwoLetterISOLanguageName"> 149 <head> 150 <meta charset="utf-8" /> 151 <title> @Model.Title</title> 152 <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1"> 153 <meta name="robots" content="index, follow"> 154 <!-- Google Tag Manager --> 155 <script> 156 (function (w, d, s, l, i) { 157 w[l] = w[l] || []; w[l].push({ 158 'gtm.start': 159 new Date().getTime(), event: 'gtm.js' 160 }); var f = d.getElementsByTagName(s)[0], 161 j = d.createElement(s), dl = l != 'dataLayer' ? '&l=' + l : ''; j.async = true; j.src = 162 'https://www.googletagmanager.com/gtm.js?id=' + i + dl; f.parentNode.insertBefore(j, f); 163 })(window, document, 'script', 'dataLayer', '@gtmId');</script> 164 <!-- End Google Tag Manager --> 165 166 @Model.MetaTags 167 <!-- Favicon --> 168 <link href="@favicon" rel="icon" type="image/png"> 169 170 <!-- Font awesome --> 171 <link rel="stylesheet" href="/Files/Templates/Designs/Rapido/css/rapido/font-awesome.min.css?v=@DateTime.Now" type="text/css"> 172 173 <!-- Base (Default, wireframe) styles --> 174 <link rel="stylesheet" href="/Files/Templates/Designs/Rapido/css/base/base.min.css?v=@DateTime.Now" type="text/css"> 175 176 <!-- Rapido Css from Website Settings --> 177 <link id="rapidoCss" rel="stylesheet" href="@autoCssLink" type="text/css"> 178 179 <!-- Ignite Css (Custom site specific styles) --> 180 <link id="igniteCss" type="text/css" href="/Files/Templates/Designs/Rapido/css/ignite/ignite-airconteknik.min.css?v=@DateTime.Now" rel="stylesheet"> 181 182 <!-- Google fonts --> 183 @{ 184 var fonts = new string[8] { navigationFont, mobileNavigationFont, headerFont, subHeaderFont, contentFont, newStickersFont, customStickersFont, toolsMenuFont }; 185 var family = string.Join("%7C", fonts.Distinct().Select(x => string.Format("{0}:100,200,300,400,500,600,700,800,900", x))); 186 } 187 <link href="https://fonts.googleapis.com/css?family=@family" rel="stylesheet"> 188 189 @if (!string.IsNullOrEmpty(businessPhotoPath) && 190 !string.IsNullOrEmpty(businessName) && 191 !string.IsNullOrEmpty(streetAddress) && 192 !string.IsNullOrEmpty(addressLocality) && 193 !string.IsNullOrEmpty(addressRegion) && 194 !string.IsNullOrEmpty(postalCode) && 195 !string.IsNullOrEmpty(addressCountry)) 196 { 197 <script type="application/ld+json"> 198 { 199 "@@context": "http://schema.org", 200 "@@type": "Store", 201 "image": [ 202 "@siteURL/Admin/Public/GetImage.ashx?width=400&height=400&crop=0&Compression=75&DoNotUpscale=true&image=@businessPhotoPath", 203 "@siteURL/Admin/Public/GetImage.ashx?width=400&height=300&crop=0&Compression=75&DoNotUpscale=true&image=@businessPhotoPath", 204 "@siteURL/Admin/Public/GetImage.ashx?width=448&height=225&crop=0&Compression=75&DoNotUpscale=true&image=@businessPhotoPath" 205 ], 206 "@@id": "@siteURL", 207 "name": "@businessName", 208 "address": { 209 "@@type": "PostalAddress", 210 "streetAddress": "@streetAddress", 211 "addressLocality": "@addressLocality", 212 "addressRegion": "@addressRegion", 213 "postalCode": "@postalCode", 214 "addressCountry": "@addressCountry" 215 } 216 @if (!string.IsNullOrEmpty(contactEmail)) 217 { 218 <text>,"email": "@Model.Area.Item.GetString("ContactEmail")"</text> 219 } 220 @if (!string.IsNullOrEmpty(contactNumber)) 221 { 222 <text>,"telephone": "@Model.Area.Item.GetString("ContactNumber")"</text> 223 } 224 } 225 </script> 226 } 227 </head> 228 229 <body> 230 <!-- Google Tag Manager (noscript) --> 231 <noscript> 232 <iframe src="https://www.googletagmanager.com/ns.html?id=@gtmId" 233 height="0" width="0" style="display:none;visibility:hidden"></iframe> 234 </noscript> 235 <!-- End Google Tag Manager (noscript) --> 236 237 @MobileNavigation(userInitials) 238 239 @LoginModal() 240 241 <main class="site dw-mod"> 242 <header class="top-container @stickyTop dw-mod" id="Top"> 243 @if (renderPagesInToolBar && Pageview.Device.ToString() != "Mobile" && Pageview.Device.ToString() != "Tablet") 244 { 245 <div class="tools-navigation dw-mod"> 246 <div class="center-container grid top-container__center-container dw-mod"> 247 <div class="grid__cell"> 248 <div class="u-pull--left u-margin-top"> 249 250 @if (!string.IsNullOrEmpty(toolsMenuPhoneIcon)) 251 { 252 <div class="icon-container"> 253 <img class="tools-navigation-custom-img pull-left" src="@toolsMenuPhoneIcon" alt="toolsMenuPhone"> <span class="tools-navigation-custom-text pull-left"> @toolsMenuPhoneText </span> 254 </div> 255 } 256 257 @if (!string.IsNullOrEmpty(toolsMenuEmailIcon)) 258 { 259 <div class="icon-container"> 260 <img class="tools-navigation-custom-img pull-left" src="@toolsMenuEmailIcon" alt="toolsMenuEmailIcon"> <span class="tools-navigation-custom-text pull-left"> @toolsMenuEmailText </span> 261 </div> 262 } 263 264 </div> 265 266 <div class="u-pull--right"> 267 @RenderNavigation(new 268 { 269 id = "topToolsNavigation", 270 cssclass = "menu menu-tools dw-mod dwnavigation", 271 template = "TopMenu.xslt" 272 }) 273 </div> 274 </div> 275 </div> 276 </div> 277 } 278 279 @if (Pageview.Device.ToString() != "Mobile" && Pageview.Device.ToString() != "Tablet") 280 { 281 switch (topLayout) 282 { 283 case "condensed": //2 284 <!-- Main navigation --> 285 <nav class="main-navigation dw-mod"> 286 <div class="center-container top-container__center-container dw-mod"> 287 <div class="grid"> 288 289 <div class="grid__col-md-3 grid--align-self-center grid__col--bleed-y"> 290 <div class="logo u-padding--xs dw-mod"> 291 <a href="/Default.aspx?ID=@firstPageId"> 292 @if (Path.GetExtension(logo).ToLower() != ".svg") 293 { 294 <img class="grid__cell-img" src="@logo" alt="Logo" /> 295 } 296 else 297 { 298 <img class="grid__cell-img logo-image" src="@logo" alt="Logo" /> 299 } 300 </a> 301 </div> 302 </div> 303 304 @* Navigation *@ 305 <div class="u-pull--left"> 306 @RenderHeaderNavigation() 307 </div> 308 309 <div class="grid__cell grid__cell--align-middle-right"> 310 <ul class="menu dw-mod u-pull--right"> 311 @RenderSignIn("inNavigation", userInitials) 312 @RenderLanguageSelector() 313 @RenderFavorites() 314 @RenderMiniCart() 315 </ul> 316 </div> 317 </div> 318 </div> 319 </nav> 320 321 <!-- Searchbar --> 322 <div class="u-box-shadow u-color-light-gray--bg u-inline-block u-full-width"> 323 <div class="center-container top-container__center-container dw-mod"> 324 <div class="typeahead typeahead--centered u-color-inherit js-typeahead dw-mod" data-page-size="10" id="ProductSearchBar" data-search-page-id="@productsSearchFeedId&feed=true" data-result-page-id="@productsPageId" data-groups-page-id="@productGroupsPageId"> 325 <button type="button" style="display: none;" 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> 326 <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=@productGroupsPageId&feedType=productGroups" data-init-onload="false" data-preloader="minimal"></ul> 327 <div class="typeahead-search-field"> 328 <input type="text" class="u-no-margin u-full-width js-typeahead-search-field" placeholder="@searchPlaceholder" value="@searchValue"> 329 <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="SearchContentTemplate" data-json-feed="/Default.aspx?ID=@productsSearchFeedId&feedType=productsOnly&feed=true" data-init-onload="false"></ul> 330 </div> 331 <button type="button" class="btn btn--condensed btn--primary u-no-margin dw-mod js-typeahead-enter-btn"><i class="fa fa-search"></i></button> 332 </div> 333 </div> 334 </div> 335 336 break; 337 case "minimal": //3 338 <!-- Main navigation --> 339 <nav class="main-navigation dw-mod"> 340 <div class="center-container top-container__center-container dw-mod"> 341 <div class="grid"> 342 343 <div class="grid__col-md-3 grid--align-self-center grid__col--bleed-y"> 344 <div class="logo u-padding--xs dw-mod"> 345 <a href="/Default.aspx?ID=@firstPageId"> 346 @if (Path.GetExtension(logo).ToLower() != ".svg") 347 { 348 <img class="grid__cell-img" src="@logo" alt="Logo" /> 349 } 350 else 351 { 352 <img class="grid__cell-img logo-image" src="@logo" alt="Logo" /> 353 } 354 </a> 355 </div> 356 </div> 357 358 @* Navigation *@ 359 <div class="u-pull--left"> 360 @RenderHeaderNavigation() 361 </div> 362 363 <div class="grid__cell grid__cell--align-middle-right"> 364 <ul class="menu dw-mod u-pull--right"> 365 366 @* Search *@ 367 <li class="menu__item menu__item--horizontal menu__item--top-level u-hidden-xxs dw-mod" onmouseover="document.getElementById('headerSearch').focus()"> 368 <div class="menu__link u-w50px is-dropdown is-dropdown--no-icon dw-mod"> 369 <i class="fa fa-search fa-1_5x"></i> 370 <div class="menu menu--dropdown u-w340px top-micro-search dw-mod"> 371 <div class="typeahead js-typeahead" data-page-size="10" id="ProductSearchBar" data-search-page-id="@productsSearchFeedId&feed=true" data-result-page-id="@productsPageId" data-groups-page-id="@productGroupsPageId"> 372 <div class="typeahead-search-field"> 373 <input type="text" class="u-no-margin u-full-width js-typeahead-search-field" id="headerSearch" placeholder="@searchPlaceholder" value="@searchValue"> 374 <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=@productsSearchFeedId&feedType=productsOnly&feed=true" data-init-onload="false" data-preloader="minimal"></ul> 375 </div> 376 </div> 377 </div> 378 </div> 379 </li> 380 381 @RenderSignIn("inNavigation", userInitials) 382 @RenderLanguageSelector() 383 @RenderFavorites() 384 @RenderMiniCart() 385 </ul> 386 </div> 387 </div> 388 </div> 389 </nav> 390 break; 391 case "splitted": //4 392 <!-- Header --> 393 <div class="header header-top dw-mod"> 394 <div class="center-container top-container__center-container dw-mod"> 395 <div class="grid"> 396 397 @* Logo *@ 398 <div class="grid__col-md-6 grid__col-sm-6 grid--align-self-center grid__col--bleed-y"> 399 <div class="grid__cell"> 400 <div class="logo u-max-w220px u-margin-top u-margin-bottom dw-mod"> 401 <a href="/Default.aspx?ID=@firstPageId"> 402 @if (Path.GetExtension(logo).ToLower() != ".svg") 403 { 404 <img class="grid__cell-img" src="@logo" alt="Logo" /> 405 } 406 else 407 { 408 <img class="grid__cell-img logo-image" src="@logo" alt="Logo" /> 409 } 410 </a> 411 </div> 412 </div> 413 </div> 414 415 @* Search *@ 416 <div class="grid__col-md-6 grid__col-sm-6 grid__col-xs-12 grid--align-self-center grid__col--bleed"> 417 <div class="grid__cell"> 418 <div class="typeahead u-no-margin u-margin-top u-margin-bottom u-color-inherit js-typeahead" data-page-size="10" id="TopProductSearch" data-search-page-id="@productsSearchFeedId&feed=true" data-result-page-id="@productsPageId" data-groups-page-id="@productGroupsPageId"> 419 <button type="button" style="display: none;" 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> 420 <ul class="dropdown dropdown--absolute-position u-min-w220px js-handlebars-root js-typeahead-groups-content dw-mod" id="TopProductSearchGroupsContent" data-template="SearchGroupsTemplate" data-json-feed="/Default.aspx?ID=@productGroupsPageId&feedType=productGroups" data-init-onload="false" data-preloader="minimal"></ul> 421 <input type="text" class="typeahead-search-field u-no-margin js-typeahead-search-field" placeholder="@searchPlaceholder" value="@searchValue"> 422 <ul class="dropdown dropdown--absolute-position u-min-w220px u-full-width js-handlebars-root js-typeahead-search-content u-full-width dw-mod" id="TopProductSearchContent" data-template="SearchContentTemplate" data-json-feed="/Default.aspx?ID=@productsSearchFeedId&feedType=productsOnly&feed=true" data-init-onload="false" data-preloader="minimal"></ul> 423 <button type="button" class="btn btn--condensed btn--primary u-no-margin dw-mod js-typeahead-enter-btn"><i class="fa fa-search"></i></button> 424 </div> 425 </div> 426 </div> 427 </div> 428 </div> 429 </div> 430 <!-- Main navigation --> 431 <nav class="main-navigation dw-mod"> 432 <div class="center-container top-container__center-container dw-mod"> 433 <div class="grid"> 434 <div class="u-pull--left"> 435 @RenderHeaderNavigation() 436 </div> 437 <div class="grid__cell grid__cell--align-middle-right"> 438 <ul class="menu dw-mod u-pull--right"> 439 @RenderSignIn("inNavigation", userInitials) 440 @RenderLanguageSelector() 441 @RenderFavorites() 442 @if (!onlyPreview) 443 { 444 @RenderMiniCart() 445 } 446 </ul> 447 </div> 448 </div> 449 </div> 450 </nav> 451 452 break; 453 case "normal": //1 454 default: 455 <!-- Header --> 456 <div class="header header-top dw-mod"> 457 <div class="center-container top-container__center-container dw-mod"> 458 <div class="grid"> 459 460 @* Logo *@ 461 <div class="grid__col-md-3 grid__col-sm-3 grid__col-xs-12 grid--align-self-center grid__col--bleed-y"> 462 <div class="logo dw-mod"> 463 <a href="/Default.aspx?ID=@firstPageId"> 464 @if (Path.GetExtension(logo).ToLower() != ".svg") 465 { 466 <img class="grid__cell-img" src="@logo" alt="Logo" /> 467 } 468 else 469 { 470 <img class="grid__cell-img logo-image" src="@logo" alt="Logo" /> 471 } 472 473 </a> 474 </div> 475 </div> 476 477 @* Search *@ 478 <div class="grid__col-md-6 grid__col-sm-4 grid__col-xs-12 grid__col--bleed-y grid--align-self-center"> 479 <div class="typeahead u-margin u-color-inherit js-typeahead" data-page-size="10" id="TopProductSearch" data-search-page-id="@productsSearchFeedId&feed=true" data-result-page-id="@productsPageId" data-groups-page-id="@productGroupsPageId"> 480 <button type="button" style="display: none;" 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> 481 <ul class="dropdown dropdown--absolute-position js-handlebars-root js-typeahead-groups-content u-min-w220px dw-mod" id="TopProductSearchGroupsContent" data-template="SearchGroupsTemplate" data-json-feed="/Default.aspx?ID=@productGroupsPageId&feedType=productGroups" data-init-onload="false" data-preloader="minimal"></ul> 482 <div class="typeahead-search-field"> 483 <input type="text" class="u-no-margin js-typeahead-search-field u-full-height u-full-width" placeholder="@searchPlaceholder" value="@searchValue"> 484 <ul class="dropdown dropdown--absolute-position u-min-w220px u-full-width js-handlebars-root js-typeahead-search-content u-full-width dw-mod" id="TopProductSearchContent" data-template="SearchContentTemplate" data-json-feed="/Default.aspx?ID=@productsSearchFeedId&feedType=productsOnly&feed=true" data-init-onload="false" data-preloader="minimal"></ul> 485 </div> 486 <button type="button" class="btn btn--condensed btn--primary u-no-margin dw-mod js-typeahead-enter-btn"><i class="fa fa-search"></i></button> 487 </div> 488 </div> 489 490 <div class="grid__col-md-3 grid__col-sm-4 grid__col-xs-12 grid__col--bleed-y grid--align-self-center"> 491 <div class="grid__cell grid__cell--align-middle-right"> 492 <ul class="menu dw-mod u-pull--right"> 493 @RenderSignIn("outsideNavigation", userInitials) 494 @RenderLanguageSelector("outsideNavigation") 495 @RenderFavorites("outsideNavigation") 496 @if (!onlyPreview) 497 { 498 @RenderMiniCart("outsideNavigation") 499 } 500 </ul> 501 </div> 502 </div> 503 </div> 504 </div> 505 </div> 506 507 <!-- Main navigation --> 508 <nav class="main-navigation dw-mod"> 509 <div class="center-container top-container__center-container dw-mod"> 510 <div class="grid"> 511 @RenderHeaderNavigation() 512 </div> 513 </div> 514 </nav> 515 516 break; 517 } 518 } 519 else 520 { 521 string style = (topLayout == "normal" || topLayout == "splitted" ? "main-navigation--top-style" : "main-navigation--nav-style"); 522 <!-- Main navigation --> 523 <nav class="main-navigation dw-mod @style"> 524 <div class="center-container top-container__center-container dw-mod"> 525 <div class="grid"> 526 @MobileNavigationTrigger() 527 528 <div class="logo u-max-w220px u-middle dw-mod"> 529 <a href="/Default.aspx?ID=@firstPageId"> 530 @if (Path.GetExtension(logo).ToLower() != ".svg") 531 { 532 <img class="grid__cell-img" src="@logo" alt="Logo" /> 533 } 534 else 535 { 536 <img class="grid__cell-img logo-image" src="@logo" alt="Logo" /> 537 } 538 539 540 </a> 541 </div> 542 543 @if (!onlyPreview) 544 { 545 <ul class="menu dw-mod u-pull--right"> 546 @RenderMiniCart() 547 </ul> 548 } 549 </div> 550 </div> 551 </nav> 552 553 @* Mobile search *@ 554 <div class="u-padding"> 555 <div class="js-typeahead" data-page-size="10" id="MobileProductSearch" data-search-page-id="@productsSearchFeedId&feed=true" data-result-page-id="@productsPageId"> 556 <input type="text" class="u-full-width js-typeahead-search-field u-no-margin" placeholder="@searchPlaceholder" value="@searchValue"> 557 <ul class="dropdown dropdown--relative-position u-full-width js-handlebars-root js-typeahead-search-content dw-mod" id="MobileProductSearchContent" data-template="SearchContentTemplate" data-json-feed="/Default.aspx?ID=@productsSearchFeedId&feedType=productsOnly&feed=true" data-init-onload="false"></ul> 558 </div> 559 </div> 560 } 561 562 @* Impersonation bar *@ 563 @if (Model.CurrentUser.ID > 0 && Model.SecondaryUsers.Count > 0) 564 { 565 <div class="u-color-warning--bg"> 566 <div class="center-container top-container__center-container dw-mod"> 567 @*Impersonation*@ 568 <div class="grid"> 569 <div class="grid--align-self-center grid__col-x"> 570 @if (Model.CurrentSecondaryUser != null && Model.CurrentSecondaryUser.ID > 0) 571 { 572 string stopImpersonateTranslation = Translate("Stop impersonation"); 573 string username = ""; 574 if (!string.IsNullOrEmpty(Model.CurrentSecondaryUser.FirstName) && !string.IsNullOrEmpty(Model.CurrentSecondaryUser.LastName)) 575 { 576 username = Model.CurrentSecondaryUser.FirstName + " " + Model.CurrentSecondaryUser.LastName; 577 } 578 else if (!string.IsNullOrEmpty(Model.CurrentSecondaryUser.Name)) 579 { 580 username = Model.CurrentSecondaryUser.Name; 581 } 582 else if (!string.IsNullOrEmpty(Model.CurrentSecondaryUser.Email)) 583 { 584 username = Model.CurrentSecondaryUser.Email; 585 } 586 else 587 { 588 username = Model.CurrentSecondaryUser.UserName; 589 } 590 <div class="grid-cell"> 591 <div class="u-pull--left u-bold u-margin-top"> 592 <i class="fa fa-user-secret"></i> 593 @username<text>&nbsp;</text>@Translate("is impersonated by")<text>&nbsp;</text>@Pageview.User.UserName 594 </div> 595 <form method="post" class="u-pull--right u-no-margin"> 596 <input type="submit" class="btn btn--secondary dw-mod u-no-margin" name="DwExtranetRemoveSecondaryUser" value="@stopImpersonateTranslation"> 597 </form> 598 </div> 599 } 600 else 601 { 602 string viewListTranslation = Translate("View the list of users you can impersonate"); 603 <div class="grid-cell u-bold"> 604 <i class="fa fa-user-secret"></i> 605 <a href="/Default.aspx?ID=@impersonationPageId" title="@viewListTranslation" class="u-color-font-black">@viewListTranslation</a> 606 </div> 607 } 608 </div> 609 </div> 610 </div> 611 </div> 612 } 613 </header> 614 615 <!-- Floating mini cart --> 616 @if (!onlyPreview && !stickyMenu && pageId == productsPageId && Pageview.Device.ToString() != "Mobile" && Pageview.Device.ToString() != "Tablet") 617 { 618 <div class="floating-mini-cart u-hidden dw-mod" id="FloatingMiniCart"> 619 <div class="mini-cart dw-mod"> 620 <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')"> 621 <i class="fa fa-shopping-cart fa-4x"></i> 622 <div class="mini-cart__counter mini-cart__counter--lg dw-mod"> 623 <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"> 624 <div class="js-mini-cart-counter-content"> 625 @Model.Cart.TotalProductsCount 626 </div> 627 </div> 628 </div> 629 </a> 630 631 <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> 632 </div> 633 </div> 634 } 635 636 <!-- Render the content --> 637 <div id="Page" class="page @pagePos"> 638 <section class="center-container content-container dw-mod" id="content"> 639 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 640 641 642 @{ 643 string columnClass = "12"; 644 } 645 646 647 @if (Model.PropertyItem.GetList("ShowBreadcrumb").SelectedValue == "True") 648 { 649 <div class="grid__col-12 grid__col--bleed-y"> 650 @RenderNavigation(new 651 { 652 id = "breadcrumb", 653 template = "Breadcrumb.xslt" 654 }) 655 </div> 656 } 657 658 <div class="grid"> 659 @if (Model.PropertyItem.GetList("LeftMenu").SelectedValue == "True") 660 { 661 662 var navigationMarkup = RenderNavigation(new 663 { 664 id = "leftnav", 665 cssclass = "menu dwnavigation", 666 startLevel = 2, 667 endlevel = 5, 668 template = "LeftNavigation.xslt" 669 }); 670 if (!string.IsNullOrEmpty(navigationMarkup)) 671 { 672 <div class="grid__col-12 grid__col--bleed-y" style="padding: 1.5em 1em;"></div> 673 <nav class="grid__col-md-3 grid__col-sm-12 grid__col-xs-12"> 674 <div class="grid"> 675 <div class="grid__col-12"> 676 <div class="grid__cell"> 677 @navigationMarkup 678 </div> 679 </div> 680 </div> 681 </nav> 682 columnClass = "9"; 683 } 684 } 685 <div class="grid__col-md-@columnClass grid__col-sm-12 grid__col-xs-12 grid__col--bleed"> 686 <div class="grid"> 687 @* Divs count is equal divs in ParagraphContainer.cshtml *@ 688 @Model.Placeholder("dwcontent", "content", "default:true;sort:1") 689 </div> 690 </div> 691 </div> 692 </section> 693 </div> 694 </main> 695 696 @RenderFooter() 697 698 699 <!-- Content rendering helpers --> 700 701 @helper MobileNavigation(string userInitials) 702 { 703 int pageId = Model.TopPage.ID; 704 string mobileNavigationLevels = Model.Area.Item.GetBoolean("MobileNavigationLevels") ? Model.Area.Item.GetString("MobileNavigationLevels") : "3"; 705 706 bool showCreateAccountLink = Model.Area.Item.GetBoolean("ShowCreateAccountLink"); 707 708 int miniCartFeedPageId = GetPageIdByNavigationTag("MiniCartFeed"); 709 int cartFeedPageId = GetPageIdByNavigationTag("CartOrderlinesFeed"); 710 int createAccountPageId = GetPageIdByNavigationTag("CreateAccount"); 711 int createCustomerPageId = GetPageIdByNavigationTag("NewCustomer"); 712 int newPasswordPageId = GetPageIdByNavigationTag("NewPassword"); 713 int createWebCustomerPageId = GetPageIdByNavigationTag("WebCustomer"); 714 715 string myProfilePageId = (Model.CurrentUser.ID <= 0) ? GetPageIdByNavigationTag("SignInPage").ToString() + "&RedirectPageId=" + GetPageIdByNavigationTag("CustomerProfile").ToString() : GetPageIdByNavigationTag("CustomerProfile").ToString(); 716 string myOrdersPageId = (Model.CurrentUser.ID <= 0) ? GetPageIdByNavigationTag("SignInPage").ToString() + "&RedirectPageId=" + GetPageIdByNavigationTag("CustomerOrders").ToString() : GetPageIdByNavigationTag("CustomerOrders").ToString(); 717 string myFavoritesPageId = (Model.CurrentUser.ID <= 0) ? GetPageIdByNavigationTag("SignInPage").ToString() + "&RedirectPageId=" + GetPageIdByNavigationTag("CustomerFavorites").ToString() : GetPageIdByNavigationTag("CustomerFavorites").ToString(); 718 bool showMyProfileLink = Model.Area.Item.GetBoolean("ShowMyProfileLink"); 719 bool showMyOrdersLink = Model.Area.Item.GetBoolean("ShowMyOrdersLink"); 720 bool showMyFavoritesLink = Model.Area.Item.GetBoolean("ShowMyFavoritesLink"); 721 722 bool renderPagesInToolBar = Model.Area.Item.GetBoolean("RenderPagesInToolBar"); 723 int startLevel = renderPagesInToolBar ? 1 : 0; 724 725 bool onlyPreview = Model.Area.Item.GetBoolean("OnlyPreviewForAnonymous") && Model.CurrentUser.ID == 0; 726 727 if (Pageview.Device.ToString() == "Mobile" || Pageview.Device.ToString() == "Tablet") 728 { 729 <!-- Trigger for mobile navigation --> 730 <input type="checkbox" id="MobileNavTrigger" class="mobile-nav-trigger" /> 731 732 <!-- Mobile navigation --> 733 <nav class="mobile-navigation dw-mod"> 734 @if (Model.CurrentUser.ID > 0) 735 { 736 string userName = Model.CurrentUser.FirstName != null ? Model.CurrentUser.FirstName : ""; 737 userName += " " + Model.CurrentUser.LastName != null ? Model.CurrentUser.LastName : ""; 738 userName += userName == "" && Model.CurrentUser.UserName != null ? Model.CurrentUser.UserName : ""; 739 740 <ul class="menu menu-mobile"> 741 <li class="menu-mobile__item"> 742 <a href="/default.aspx?ID=@myProfilePageId" class="menu-mobile__link dw-mod"><i class="fa fa-user menu-mobile__link-icon"></i> @userName</a> 743 </li> 744 </ul> 745 } 746 747 @RenderNavigation(new 748 { 749 id = "mobilenavigation", 750 cssclass = "menu menu-mobile dwnavigation", 751 startLevel = @startLevel, 752 ecomStartLevel = @startLevel+1, 753 endlevel = @mobileNavigationLevels, 754 expandmode = "all", 755 template = "BaseMenuForMobile.xslt" 756 }) 757 758 @if (Model.Area.Item.GetBoolean("RenderPagesInToolBar")) 759 { 760 @RenderNavigation(new 761 { 762 id = "topToolsMobileNavigation", 763 cssclass = "menu menu-mobile dwnavigation", 764 template = "ToolsMenuForMobile.xslt" 765 }) 766 } 767 768 @if (Model.Area.Item.GetItems("Links").Count > 0) 769 { 770 <ul class="menu menu-mobile dwnavigation"> 771 @foreach (var customLink in Model.Area.Item.GetItems("Links")) 772 { 773 var currentPageUrl = Dynamicweb.Context.Current.Request.RawUrl; 774 775 string label = customLink.GetString("Text"); 776 string url = customLink.GetString("Link"); 777 bool newWindow = customLink.GetBoolean("OpenInNewWindow"); 778 if (string.IsNullOrEmpty(url)) 779 { 780 continue; 781 } 782 783 if (newWindow) 784 { 785 if (url.EndsWith(currentPageUrl)) 786 { 787 <li class="menu-mobile__item dw-mod menu__item--active "> 788 <a class="menu-mobile__link menu-mobile__link--active dw-mod" href="@url" target="_blank" title="@label">@label</a> 789 </li> 790 791 } 792 else 793 { 794 <li class="menu-mobile__item dw-mod menu__item--disabled"> 795 <a class="menu-mobile__link menu-mobile__link--disabled dw-mod" href="@url" target="_blank" title="@label">@label</a> 796 </li> 797 } 798 799 } 800 else 801 { 802 if (url.EndsWith(currentPageUrl)) 803 { 804 <li class="menu-mobile__item dw-mod menu-mobile__link--active"> 805 <a class="menu-mobile__link menu-mobile__link--active dw-mod" href="@url" title="@label">@label</a> 806 </li> 807 } 808 else 809 { 810 <li class="menu-mobile__item dw-mod menu__item--disabled"> 811 <a class="menu-mobile__link menu-mobile__link--disabled dw-mod" href="@url" title="@label">@label</a> 812 </li> 813 } 814 } 815 816 } 817 </ul> 818 } 819 <ul class="menu menu-mobile"> 820 @if (Model.CurrentUser.ID <= 0) 821 { 822 <li class="menu-mobile__item"> 823 <label for="SignInModalTrigger" onclick="document.getElementById('MobileNavTrigger').checked = false;" class="menu-mobile__link dw-mod menu-mobile__link--highlighted"><i class="fa fa-user menu-mobile__link-icon"></i> @Translate("Sign in")</label> 824 </li> 825 if (showCreateAccountLink) 826 { 827 <li class="menu-mobile__item"> 828 @*<a class="menu-mobile__link menu-mobile__link--highlighted dw-mod" href="/Default.aspx?ID=@createAccountPageId"><i class="fa fa-user menu-mobile__link-icon"></i> @Translate("Create account")</a>*@ 829 <a href="/default.aspx?ID=@createCustomerPageId" class="menu-mobile__link menu-mobile__link--highlighted dw-mod"><i class="fa fa-user menu-mobile__link-icon"></i> @Translate("Create new account")</a> 830 <a href="/default.aspx?ID=@createWebCustomerPageId" class="menu-mobile__link menu-mobile__link--highlighted dw-mod"><i class="fa fa-user menu-mobile__link-icon"></i> @Translate("Create new webaccount")</a> 831 <a href="/default.aspx?ID=@newPasswordPageId" class="menu-mobile__link menu-mobile__link--highlighted dw-mod"><i class="fa fa-user menu-mobile__link-icon"></i> @Translate("New password request")</a> 832 833 </li> 834 } 835 } 836 else 837 { 838 if (showMyProfileLink) 839 { 840 <li class="menu-mobile__item"> 841 <a href="/default.aspx?ID=@myProfilePageId" class="menu-mobile__link menu-mobile__link--highlighted dw-mod"><i class="fa fa-user menu-mobile__link-icon"></i> @Translate("My Profile")</a> 842 </li> 843 } 844 if (showMyOrdersLink) 845 { 846 <li class="menu-mobile__item"> 847 <a href="/default.aspx?ID=@myOrdersPageId" class="menu-mobile__link menu-mobile__link--highlighted dw-mod"><i class="fa fa-list menu-mobile__link-icon"></i> @Translate("My Orders")</a> 848 </li> 849 } 850 if (showMyFavoritesLink) 851 { 852 <li class="menu-mobile__item"> 853 <a href="/default.aspx?ID=@myFavoritesPageId" class="menu-mobile__link menu-mobile__link--highlighted dw-mod"><i class="fa fa-star menu-mobile__link-icon"></i> @Translate("My Favorites")</a> 854 </li> 855 } 856 <li class="menu-mobile__item"> 857 <a class="menu-mobile__link menu-mobile__link--highlighted dw-mod" href="/Admin/Public/ExtranetLogoff.aspx?ID=@pageId"><i class="fa fa-user menu-mobile__link-icon"></i> @Translate("Sign out")</a> 858 </li> 859 } 860 @if (Model.Languages.Count > 0) 861 { 862 string selectedLanguage = ""; 863 foreach (var lang in Model.Languages) 864 { 865 if (lang.IsCurrent) 866 { 867 selectedLanguage = lang.Name; 868 } 869 } 870 871 <li class="menu-mobile__item dw-mod"> 872 <label for="MobileMenuCheck_Language" class="menu-mobile__link menu-mobile__link--highlighted dw-mod"><i class="fa fa-globe menu-mobile__link-icon"></i> @selectedLanguage</label> 873 <input id="MobileMenuCheck_Language" type="checkbox" class="expand-trigger"> 874 <label for="MobileMenuCheck_Language" class="menu-mobile__trigger"></label> 875 <ul class="menu-mobile menu-mobile__submenu expand-menu"> 876 @foreach (var lang in Model.Languages) 877 { 878 <li class="menu-mobile__item dw-mod"> 879 <a class="menu-mobile__link menu-mobile__link--highlighted dw-mod menu-mobile__link--level-1" href="/Default.aspx?ID=@lang.Page.ID&CurrencyCode=@Dynamicweb.Services.Areas.GetArea(lang.ID).EcomCurrencyId">@lang.Name</a> 880 </li> 881 } 882 </ul> 883 </li> 884 } 885 </ul> 886 </nav> 887 <label class="mobile-nav-trigger-off" for="MobileNavTrigger"></label> 888 889 if (!onlyPreview) 890 { 891 <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> 892 } 893 } 894 } 895 896 @helper LoginModal() 897 { 898 int pageId = Model.TopPage.ID; 899 string topLayout = Model.Area.Item.GetList("LayoutTop").SelectedValue; 900 int createAccountPageId = GetPageIdByNavigationTag("CreateAccount"); 901 int signInProfilePageId = GetPageIdByNavigationTag("SignInPage"); 902 //string forgotPasswordPageId = signInProfilePageId.ToString() + "&LoginAction=Recovery"; 903 int forgotPasswordPageId = GetPageIdByNavigationTag("NewPassword"); 904 string userSignedInError = !Model.LogOnFailed ? "" : "checked"; 905 string userSignedInErrorText = ""; 906 907 if (Model.LogOnFailed) 908 { 909 switch (Model.LogOnFailedReason) 910 { 911 case Dynamicweb.Security.UserManagement.LogOnFailedReason.PasswordLengthInvalid: 912 userSignedInErrorText = Translate("Password length is invalid"); 913 break; 914 case Dynamicweb.Security.UserManagement.LogOnFailedReason.IncorrectLogin: 915 userSignedInErrorText = Translate("Invalid email or password"); 916 break; 917 case Dynamicweb.Security.UserManagement.LogOnFailedReason.ExceededFailedLogOnLimit: 918 userSignedInErrorText = Translate("You have exceeded the limit of allowed login attempts. The user account is temporarily locked"); 919 break; 920 case Dynamicweb.Security.UserManagement.LogOnFailedReason.LoginLocked: 921 userSignedInErrorText = Translate("The user account is temporarily locked"); 922 break; 923 case Dynamicweb.Security.UserManagement.LogOnFailedReason.PasswordExpired: 924 userSignedInErrorText = Translate("The password has expired and needs to be renewed"); 925 break; 926 default: 927 userSignedInErrorText = Translate("An unknown error occured"); 928 break; 929 } 930 } 931 932 <!-- Trigger for the login modal --> 933 <input type="checkbox" id="SignInModalTrigger" class="modal-trigger @topLayout" @userSignedInError /> 934 935 <!-- Login modal --> 936 <div class="modal-container"> 937 <label for="SignInModalTrigger" id="SignInModalOverlay" class="modal-overlay"></label> 938 <div class="modal modal--xs" id="SignInModal"> 939 <div class="modal__header"> 940 <h2>@Translate("Sign in")</h2> 941 </div> 942 <div class="modal__body"> 943 <form method="post" id="LoginForm" class="u-no-margin"> 944 <input type="hidden" name="ID" value="@pageId" /> 945 <input type="hidden" name="DWExtranetUsernameRemember" value="True" /> 946 <input type="hidden" name="DWExtranetPasswordRemember" value="True" /> 947 <input type="text" class="u-full-width" id="LoginUsername" name="username" placeholder="@Translate("Email")" /> 948 <input type="password" class="u-full-width" id="LoginPassword" name="password" placeholder="@Translate("Password")" /> 949 <div class="field-error dw-mod">@userSignedInErrorText</div> 950 951 <label> 952 <input type="checkbox" id="RememberMe" name="Autologin" checked="checked" value="True"> 953 <span>@Translate("Remember me", "Remember me")</span> 954 </label> 955 956 <button type="submit" class="btn btn--primary btn--full dw-mod" name="LoginAction" value="Login" onclick="Buttons.LockButton(event)">@Translate("Sign in")</button> 957 958 <a class="btn btn--link-clean dw-mod" href="/Default.aspx?id=@forgotPasswordPageId">@Translate("Forgot your password?", "Forgot your password?")</a> 959 960 @*<a class="btn btn--link-clean dw-mod" href="/default.aspx?ID=@createAccountPageId">@Translate("Create account")?</a>*@ 961 </form> 962 </div> 963 </div> 964 </div> 965 } 966 967 @helper RenderHeaderNavigation() 968 { 969 bool megaMenu = Model.Area.Item.GetList("NavigationMegaMenu").SelectedValue.ToLower() == "true" ? true : false; 970 string megamenuPromotionImage = Model.Area.Item.GetFile("NavigationMegamenuPromotionImage") != null ? Model.Area.Item.GetFile("NavigationMegamenuPromotionImage").Path : ""; 971 bool renderPagesInToolBar = Model.Area.Item.GetBoolean("RenderPagesInToolBar"); 972 int startLevel = renderPagesInToolBar ? 1 : 0; 973 974 if (Pageview.Device.ToString() != "Mobile" && Pageview.Device.ToString() != "Tablet") 975 { 976 if (!megaMenu) 977 { 978 @RenderNavigation(new 979 { 980 id = "topnavigation", 981 cssclass = "menu dw-mod dwnavigation", 982 startLevel = @startLevel, 983 ecomStartLevel = @startLevel+1, 984 endlevel = 5, 985 expandmode="all", 986 template = "BaseMenuWithDropdown.xslt" 987 }); 988 } 989 else 990 { 991 @RenderNavigation(new 992 { 993 id = "topnavigation", 994 cssclass = "menu dw-mod dwnavigation", 995 startLevel = @startLevel, 996 ecomStartLevel = @startLevel+1, 997 endlevel = 5, 998 promotionImage = megamenuPromotionImage, 999 promotionLink = Model.Area.Item.GetString("NavigationMegamenuPromotionLink"), 1000 expandmode = "all", 1001 template = "BaseMegaMenu.xslt" 1002 }); 1003 } 1004 } 1005 } 1006 1007 @helper MobileNavigationTrigger() 1008 { 1009 @* Mobile navigation trigger *@ 1010 1011 if (Pageview.Device.ToString() == "Mobile" || Pageview.Device.ToString() == "Tablet") 1012 { 1013 <div class="menu dw-mod u-pull--left"> 1014 <div class="menu__item menu__item--horizontal menu__item--top-level dw-mod"> 1015 <label for="MobileNavTrigger" class="mobile-nav-trigger-button menu__link dw-mod"></label> 1016 </div> 1017 </div> 1018 } 1019 } 1020 1021 @helper RenderLanguageSelector(string type = "inNavigation") 1022 { 1023 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 u-w40px dw-mod"; 1024 string menuLinkClass = type == "inNavigation" ? "menu__link" : "header-menu__link"; 1025 1026 @* Language selector *@ 1027 if (Model.Languages.Count > 1) 1028 { 1029 <li class="@liClasses"> 1030 <div class="@menuLinkClass u-w40px is-dropdown is-dropdown--no-icon dw-mod"> 1031 <i class="fa fa-globe fa-1_5x"></i> 1032 <div class="menu menu--dropdown u-w100px dw-mod"> 1033 @foreach (var lang in Model.Languages) 1034 { 1035 <a href="/Default.aspx?ID=@lang.Page.ID&CurrencyCode=@Dynamicweb.Services.Areas.GetArea(lang.ID).EcomCurrencyId" class="menu-dropdown__item menu-dropdown__item--link dw-mod">@lang.Name</a> 1036 } 1037 </div> 1038 </div> 1039 </li> 1040 } 1041 } 1042 1043 @helper RenderMiniCart(string type = "inNavigation") 1044 { 1045 string liClasses = type == "inNavigation" ? "menu__item menu__item--horizontal menu__item--top-level dw-mod" : "menu__item menu__item--horizontal menu--clean dw-mod"; 1046 string menuLinkClass = type == "inNavigation" ? "menu__link" : "header-menu__link"; 1047 1048 int miniCartFeedPageId = GetPageIdByNavigationTag("MiniCartFeed"); 1049 int cartFeedPageId = GetPageIdByNavigationTag("CartOrderlinesFeed"); 1050 int cartPageId = GetPageIdByNavigationTag("CartPage"); 1051 double cartProductsCount = Model.Cart.TotalProductsCount; 1052 1053 @* Mini cart *@ 1054 <li class="@liClasses"> 1055 <div class="mini-cart dw-mod"> 1056 <a href="/Default.aspx?ID=@cartPageId&Purge=True" id="miniCartCounterWrap" class="@menuLinkClass dw-mod js-mini-cart-button" onmouseenter="Cart.UpdateMiniCart(event, 'miniCart', '/Default.aspx?ID=@miniCartFeedPageId&feedType=MiniCart')"> 1057 <i class="fa fa-shopping-cart fa-1_5x"></i> 1058 <div class="mini-cart__counter mini-cart__counter--inline dw-mod"> 1059 <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"> 1060 <div class="js-mini-cart-counter-content"> 1061 @cartProductsCount 1062 </div> 1063 </div> 1064 </div> 1065 </a> 1066 @if (Pageview.Device.ToString() != "Mobile" && Pageview.Device.ToString() != "Tablet") 1067 { 1068 <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> 1069 } 1070 </div> 1071 </li> 1072 } 1073 1074 @helper RenderSignIn(string type = "inNavigation", string userInitials = "") 1075 { 1076 //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 u-w40px dw-mod"; 1077 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"; 1078 string menuLinkClass = type == "inNavigation" ? "menu__link" : "header-menu__link"; 1079 1080 int pageId = Model.TopPage.ID; 1081 string myProfilePageId = (Model.CurrentUser.ID <= 0) ? GetPageIdByNavigationTag("SignInPage").ToString() + "&RedirectPageId=" + GetPageIdByNavigationTag("CustomerProfile").ToString() : GetPageIdByNavigationTag("CustomerProfile").ToString(); 1082 string myOrdersPageId = (Model.CurrentUser.ID <= 0) ? GetPageIdByNavigationTag("SignInPage").ToString() + "&RedirectPageId=" + GetPageIdByNavigationTag("CustomerOrders").ToString() : GetPageIdByNavigationTag("CustomerOrders").ToString(); 1083 int myDashboardPageId = GetPageIdByNavigationTag("CustomerDashboard"); 1084 string myFavoritesPageId = (Model.CurrentUser.ID <= 0) ? GetPageIdByNavigationTag("SignInPage").ToString() + "&RedirectPageId=" + GetPageIdByNavigationTag("CustomerFavorites").ToString() : GetPageIdByNavigationTag("CustomerFavorites").ToString(); 1085 string mySavedCardsPageId = (Model.CurrentUser.ID <= 0) ? GetPageIdByNavigationTag("SignInPage").ToString() + "&RedirectPageId=" + GetPageIdByNavigationTag("SavedCards").ToString() : GetPageIdByNavigationTag("SavedCards").ToString(); 1086 int createAccountPageId = GetPageIdByNavigationTag("CreateAccount"); 1087 int createCustomerPageId = GetPageIdByNavigationTag("NewCustomer"); 1088 int createWebCustomerPageId = GetPageIdByNavigationTag("WebCustomer"); 1089 int signInProfilePageId = GetPageIdByNavigationTag("SignInPage"); 1090 int forgotPasswordPageId = GetPageIdByNavigationTag("NewPassword"); 1091 1092 bool showCreateAccountLink = Model.Area.Item.GetBoolean("ShowCreateAccountLink"); 1093 bool showMyProfileLink = Model.Area.Item.GetBoolean("ShowMyProfileLink"); 1094 bool showMyOrdersLink = Model.Area.Item.GetBoolean("ShowMyOrdersLink"); 1095 bool showMyFavoritesLink = Model.Area.Item.GetBoolean("ShowMyFavoritesLink"); 1096 bool showMySavedCardsLink = Model.Area.Item.GetBoolean("ShowMySavedCardsLink"); 1097 1098 @* Sign in + Customer center links *@ 1099 <li class="@liClasses"> 1100 <div class="@menuLinkClass is-dropdown is-dropdown--no-icon dw-mod"> 1101 @if (Model.CurrentUser.ID <= 0) 1102 { 1103 1104 <span><i class="fa fa-user fa-1_5x"></i> @Translate("Sign in")</span> 1105 } 1106 else 1107 { 1108 <a href="/default.aspx?ID=@myDashboardPageId" class="u-color-inherit"><div class="circle-icon-btn">@userInitials.ToUpper()</div></a> 1109 } 1110 1111 <div class="menu menu--dropdown sign-in-dropdown dw-mod"> 1112 <ul class="list list--clean dw-mod"> 1113 @if (Model.CurrentUser.ID <= 0) 1114 { 1115 <li> 1116 <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> 1117 </li> 1118 if (showCreateAccountLink) 1119 { 1120 <li> 1121 <a href="/default.aspx?ID=@createCustomerPageId" class="list__link dw-mod">@Translate("Create new account")</a> 1122 </li> 1123 <li> 1124 <a href="/default.aspx?ID=@createWebCustomerPageId" class="list__link dw-mod">@Translate("Create new webaccount")</a> 1125 </li> 1126 } 1127 1128 <li> 1129 <a href="/default.aspx?ID=@forgotPasswordPageId" class="list__link dw-mod">@Translate("Forgot your password?")</a> 1130 </li> 1131 if (showMyProfileLink || showMyOrdersLink || showMyFavoritesLink || showMySavedCardsLink) 1132 { 1133 <li class="list__seperator dw-mod"></li> 1134 } 1135 } 1136 1137 @if (showMyProfileLink) 1138 { 1139 <li> 1140 <a href="/default.aspx?ID=@myProfilePageId" class="list__link dw-mod"><i class="fa fa-user"></i> @Translate("My Profile")</a> 1141 </li> 1142 } 1143 @if (showMyOrdersLink) 1144 { 1145 <li> 1146 <a href="/default.aspx?ID=@myOrdersPageId" class="list__link dw-mod"><i class="fa fa-list"></i> @Translate("My Orders")</a> 1147 </li> 1148 } 1149 @if (showMyFavoritesLink) 1150 { 1151 <li> 1152 <a href="/default.aspx?ID=@myFavoritesPageId" class="list__link dw-mod"><i class="fa fa-star"></i> @Translate("My Favorites")</a> 1153 </li> 1154 } 1155 @if (showMySavedCardsLink) 1156 { 1157 <li> 1158 <a href="/default.aspx?ID=@mySavedCardsPageId" class="list__link dw-mod"><i class="fa fa-credit-card"></i> @Translate("My Saved cards")</a> 1159 </li> 1160 } 1161 @if (Model.CurrentUser.ID > 0) 1162 { 1163 if (showMyProfileLink || showMyOrdersLink || showMyFavoritesLink || showMySavedCardsLink) 1164 { 1165 <li class="list__seperator dw-mod"></li> 1166 } 1167 <li> 1168 <a href="/Admin/Public/ExtranetLogoff.aspx?ID=@pageId" class="list__link dw-mod">@Translate("Sign out")</a> 1169 </li> 1170 } 1171 </ul> 1172 </div> 1173 </div> 1174 </li> 1175 } 1176 1177 @helper RenderFavorites(string type = "inNavigation") 1178 { 1179 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 u-w40px dw-mod"; 1180 string menuLinkClass = type == "inNavigation" ? "menu__link" : "header-menu__link"; 1181 1182 string myFavoritesPageId = GetPageIdByNavigationTag("CustomerFavorites").ToString(); 1183 1184 @* Favorites *@ 1185 if (Model.CurrentUser.ID > 0) 1186 { 1187 <li class="@liClasses"> 1188 <a href="/Default.aspx?ID=@myFavoritesPageId" class="@menuLinkClass dw-mod"> 1189 <i class="fa fa-star fa-1_5x"></i> 1190 </a> 1191 </li> 1192 } 1193 } 1194 1195 1196 @helper RenderFooter() 1197 { 1198 string footerColumnOneContent = !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterColumnOne")) ? Model.Area.Item.GetString("FooterColumnOne") : ""; 1199 string footerColumnTwoContent = !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterColumnTwo")) ? Model.Area.Item.GetString("FooterColumnTwo") : ""; 1200 string footerColumnThreeContent = !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterColumnThree")) ? Model.Area.Item.GetString("FooterColumnThree") : ""; 1201 string footerColumnFiveContent = !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterColumnFive")) ? Model.Area.Item.GetString("FooterColumnFive") : ""; 1202 string footerColumnOneHeader = Model.Area.Item.GetString("FooterColumnOneHeader"); 1203 string footerColumnTwoHeader = Model.Area.Item.GetString("FooterColumnTwoHeader"); 1204 string footerColumnThreeHeader = Model.Area.Item.GetString("FooterColumnThreeHeader"); 1205 string footerColumnFiveHeader = Model.Area.Item.GetString("FooterColumnFiveHeader"); 1206 int newsletterSignUpPageId = GetPageIdByNavigationTag("NewsletterSignUp"); 1207 1208 <!-- Footer section --> 1209 <footer class="footer dw-mod"> 1210 <div class="center-container top-container__center-container dw-mod"> 1211 <div class="grid"> 1212 @if (!string.IsNullOrEmpty(footerColumnOneContent) || !string.IsNullOrEmpty(footerColumnOneHeader)) 1213 { 1214 <div class="grid__col-md-auto"> 1215 <h4 class="footer__heading dw-mod">@footerColumnOneHeader</h4> 1216 <div class="footer__content dw-mod"> 1217 @footerColumnOneContent 1218 </div> 1219 </div> 1220 } 1221 @if (!string.IsNullOrEmpty(footerColumnTwoContent) || !string.IsNullOrEmpty(footerColumnTwoHeader)) 1222 { 1223 <div class="grid__col-md-auto"> 1224 <h4 class="footer__heading dw-mod">@footerColumnTwoHeader</h4> 1225 <div class="footer__content dw-mod"> 1226 @footerColumnTwoContent 1227 </div> 1228 </div> 1229 } 1230 @if (!string.IsNullOrEmpty(footerColumnThreeContent) || !string.IsNullOrEmpty(footerColumnThreeHeader)) 1231 { 1232 <div class="grid__col-md-auto"> 1233 <h4 class="footer__heading dw-mod">@footerColumnThreeHeader</h4> 1234 <div class="footer__content dw-mod"> 1235 @footerColumnThreeContent 1236 </div> 1237 </div> 1238 } 1239 @if (Model.Area.Item.GetBoolean("FooterNewsletterSignUp")) 1240 { 1241 <div class="grid__col-md-auto"> 1242 <h4 class="footer__heading dw-mod">@Translate("Mailing list", "Mailing list")</h4> 1243 <div class="footer__content dw-mod"> 1244 <p>@Translate("Sign up if you would like to receive occasional treats from us", "Sign up if you would like to receive occasional treats from us").</p> 1245 @*<form class="form dw-mod" name="NewsletterRedirect" action='/Default.aspx' method="get" enctype="multipart/form-data"> 1246 <input name="ID" id="ID" value="@newsletterSignUpPageId" type="hidden" /> 1247 <div class="form__field-combi"> 1248 <input name="NewsletterEmail" id="NewsletterEmail" type="text" class="u-w160px" style="width:100%;" placeholder='@Translate("Your email address", "Your email address")' /> 1249 </div> 1250 <input class="btn btn--primary btn--condensed dw-mod " style="width:100%;" type="submit" id="Submitter" value='@Translate("Go", "Go")' /> 1251 1252 </form>*@ 1253 <!-- Begin Mailchimp Signup Form --> 1254 <link href="//cdn-images.mailchimp.com/embedcode/horizontal-slim-10_7.css" rel="stylesheet" type="text/css"> 1255 <style type="text/css"> 1256 #mc_embed_signup { 1257 clear: left; 1258 font: 14px Helvetica,Arial,sans-serif; 1259 width: 100%; 1260 } 1261 /* Add your own Mailchimp form style overrides in your site stylesheet or in this style block. 1262 We recommend moving this block and the preceding CSS link to the HEAD of your HTML file. */ 1263 </style> 1264 <style type="text/css"> 1265 #mc-embedded-subscribe-form input[type=checkbox] { 1266 display: inline; 1267 width: auto; 1268 margin-right: 10px; 1269 } 1270 1271 #mergeRow-gdpr { 1272 margin-top: 20px; 1273 } 1274 1275 #mergeRow-gdpr fieldset label { 1276 font-weight: normal; 1277 } 1278 1279 #mc-embedded-subscribe-form .mc_fieldset { 1280 border: none; 1281 min-height: 0px; 1282 padding-bottom: 0px; 1283 } 1284 </style> 1285 <div id="mc_embed_signup"> 1286 <form action="https://airconteknik.us1.list-manage.com/subscribe/post?u=47770bb2c3121de2a89467c23&amp;id=0cd1d9fe45" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate> 1287 <div id="mc_embed_signup_scroll"> 1288 1289 <input style="height: 39px; border-radius: 20px; width: 100%;" type="email" value="" name="EMAIL" class="email" id="mce-EMAIL" placeholder="Email adresse" required> 1290 <!-- real people should not fill this in and expect good things - do not remove this or risk form bot signups--> 1291 <div style="position: absolute; left: -5000px;" aria-hidden="true"><input type="text" name="b_47770bb2c3121de2a89467c23_0cd1d9fe45" tabindex="-1" value=""></div> 1292 <br /> 1293 <div class="clear" style="width: 100%;"> 1294 <input style="border-radius: 20px; width: 100%; margin-top: 10px;" type="submit" value="Tilmeld" name="subscribe" id="mc-embedded-subscribe" class="btn btn--primary btn--condensed dw-mod"> 1295 </div> 1296 </div> 1297 </form> 1298 </div> 1299 1300 <!--End mc_embed_signup--> 1301 </div> 1302 </div> 1303 } 1304 @if (Model.Area.Item.GetItems("FooterSocialLinks").Count > 0) 1305 { 1306 <div class="grid__col-md-auto"> 1307 <h4 class="footer__heading dw-mod">@Translate("Social links", "Social links")</h4> 1308 <div class="footer__content dw-mod"> 1309 <div class="collection dw-mod"> 1310 @foreach (var socialitem in Model.Area.Item.GetItems("FooterSocialLinks")) 1311 { 1312 //Fields.FirstOrDefault(x => x.SystemName == "Icon").GetString() 1313 var socialIcon = socialitem.GetValue("Icon") as Dynamicweb.Frontend.ListViewModel; 1314 string socialIconClass = socialIcon.SelectedValue; 1315 string socialIconTitle = socialIcon.SelectedName; 1316 string socialLink = socialitem.GetString("Link"); 1317 1318 <a href="@socialLink" target="_blank" title="@socialIconTitle"><i class="fa @socialIconClass fa-2x"></i></a> 1319 } 1320 </div> 1321 </div> 1322 </div> 1323 } 1324 @if (!string.IsNullOrEmpty(footerColumnFiveContent)) 1325 { 1326 <div class="grid__col-md-auto"> 1327 <h4 class="footer__heading dw-mod">@footerColumnFiveHeader</h4> 1328 <div class="footer__content dw-mod"> 1329 @footerColumnFiveContent 1330 </div> 1331 </div> 1332 } 1333 <div class="grid__col-12 footer__copyright dw-mod"> 1334 <p>@Model.Area.Item.GetString("FooterCopyrightText")</p> 1335 </div> 1336 </div> 1337 </div> 1338 </footer> 1339 1340 if (Model.Area.Item.GetItems("Links").Count > 0) 1341 { 1342 <ul class="custom-links" id="customLinks" style="display: none;"> 1343 1344 @foreach (var customLink in Model.Area.Item.GetItems("Links")) 1345 { 1346 var currentPageUrl = Dynamicweb.Context.Current.Request.RawUrl; 1347 1348 string label = customLink.GetString("Text"); 1349 string url = customLink.GetString("Link"); 1350 bool newWindow = customLink.GetBoolean("OpenInNewWindow"); 1351 1352 if (newWindow) 1353 { 1354 1355 if (url.EndsWith(currentPageUrl)) 1356 { 1357 <li class="menu__item dw-mod menu__item--horizontal menu__item--top-level dw-navbar-button menu__item--active custom-link"> 1358 <a class="menu__link dw-mod" href="@url" target="_blank" title="@label">@label</a> 1359 </li> 1360 1361 } 1362 else 1363 { 1364 <li class="menu__item dw-mod menu__item--horizontal menu__item--top-level dw-navbar-button menu__item--disabled custom-link"> 1365 <a class="menu__link dw-mod" href="@url" target="_blank" title="@label">@label</a> 1366 </li> 1367 } 1368 1369 } 1370 else 1371 { 1372 if (url.EndsWith(currentPageUrl)) 1373 { 1374 <li class="menu__item dw-mod menu__item--horizontal menu__item--top-level dw-navbar-button menu__item--active custom-link"> 1375 <a class="menu__link dw-mod" href="@url" title="@label">@label</a> 1376 </li> 1377 } 1378 else 1379 { 1380 <li class="menu__item dw-mod menu__item--horizontal menu__item--top-level dw-navbar-button menu__item--disabled custom-link"> 1381 <a class="menu__link dw-mod" href="@url" title="@label">@label</a> 1382 </li> 1383 } 1384 1385 } 1386 } 1387 1388 </ul> 1389 } 1390 } 1391 1392 1393 @* Templates for Typeahead *@ 1394 <script id="SearchGroupsTemplate" type="text/x-template"> 1395 {{#.}} 1396 <li class="dropdown__item dw-mod" onclick="Search.UpdateGroupSelection(this)" data-group-id="{{id}}">{{name}}</li> 1397 {{/.}} 1398 </script> 1399 1400 <script id="SearchContentTemplate" type="text/x-template"> 1401 {{#each .}} 1402 {{#Product}} 1403 {{#ifCond template "==" "SearchContentTemplate"}} 1404 <li class="dropdown__item dropdown__item--seperator dw-mod"> 1405 <div> 1406 <a href="{{link}}" class="js-typeahead-link u-color-inherit u-pull--left"> 1407 <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> 1408 <div class="u-pull--left"> 1409 <div class="u-bold u-max-w220px u-truncate-text js-typeahead-name">{{name}}</div> 1410 @if (!onlyPreview) 1411 { 1412 <div class="{{onlyPreview}}">{{price}}</div> 1413 } 1414 </div> 1415 </a> 1416 <div class="u-margin-left u-pull--right u-w80px u-hidden-xs u-hidden-xxs"> 1417 @if (!onlyPreview) 1418 { 1419 <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="fa fa-shopping-cart js-ignore-click-outside"></i></button> 1420 <a href="{{link}}" class="btn btn--secondary btn--condensed btn--full u-no-margin dw-mod {{hideViewMore}} js-ignore-click-outside">@Translate("View")</a> 1421 } 1422 else 1423 { 1424 <label for="SignInModalTrigger" class="btn btn--primary btn--condensed sign-in-modal-trigger-button dw-mod u-pull--right" onclick="setTimeout(function () { document.getElementById('LoginUsername').focus() }, 10)"><i class="fa fa-user fa-1_5x"></i></label> 1425 } 1426 </div> 1427 </div> 1428 </li> 1429 {{/ifCond}} 1430 {{#ifCond template "===" "SearchMore"}} 1431 {{>SearchMore}} 1432 {{/ifCond}} 1433 {{#ifCond template "===" "NoProducts"}} 1434 <li class="dropdown__item dropdown__item--seperator dw-mod"> 1435 @Translate("No products found") 1436 </li> 1437 {{/ifCond}} 1438 {{/Product}} 1439 {{else}} 1440 <li class="dropdown__item dropdown__item--seperator dw-mod"> 1441 @Translate("No products found") 1442 </li> 1443 {{/each}} 1444 </script> 1445 1446 <script id="SearchMore" type="text/x-template"> 1447 <li class="dropdown__item dropdown__item--not-selectable dw-mod"> 1448 <a href="/Default.aspx?ID=@productsPageId&Search={{searchParameter}}&GroupID={{groupId}}" class="btn btn--primary btn--full u-no-margin dw-mod js-typeahead-link"> 1449 @Translate("View all") 1450 </a> 1451 </li> 1452 </script> 1453 1454 @* Templates for the mini cart *@ 1455 <script id="MiniCartCounterContent" type="text/x-template"> 1456 {{#.}} 1457 <div class="js-mini-cart-counter-content dw-mod"> 1458 {{numberofproducts}} 1459 </div> 1460 {{/.}} 1461 </script> 1462 1463 <script id="MiniCartContent" type="text/x-template"> 1464 {{#.}} 1465 <div class="mini-cart-dropdown__inner {{isempty}} dw-mod"> 1466 <h4 class="u-ta-center u-no-margin u-margin-bottom u-margin-top">@Translate("Shopping cart")</h4> 1467 <div class="mini-cart-dropdown__body dw-mod"> 1468 <table class="table mini-cart-table dw-mod"> 1469 <thead> 1470 <tr> 1471 <td>&nbsp;</td> 1472 <td>@Translate("Product")</td> 1473 <td class="u-ta-right">@Translate("Qty")</td> 1474 <td class="u-ta-right" width="120">@Translate("Price")</td> 1475 </tr> 1476 </thead> 1477 1478 {{#OrderLines}} 1479 {{#ifCond template "===" "CartOrderline"}} 1480 {{>MiniCartOrderline}} 1481 {{/ifCond}} 1482 {{#ifCond template "===" "CartOrderlineMobile"}} 1483 {{>MiniCartOrderlineMobile}} 1484 {{/ifCond}} 1485 {{#ifCond template "===" "CartOrderlineDiscount"}} 1486 {{>MiniCartOrderlineDiscount}} 1487 {{/ifCond}} 1488 {{/OrderLines}} 1489 1490 @*<tr> 1491 <td><i class="fa fa-credit-card"></i></td> 1492 <td>{{paymentmethod}}</td> 1493 <td colspan="2" class="u-ta-right" width="130">{{paymentfee}}</td> 1494 </tr> 1495 <tr> 1496 <td><i class="fa fa-truck"></i></td> 1497 <td>{{shippingmethod}}</td> 1498 <td colspan="2" class="u-ta-right" width="130">{{shippingfee}}</td> 1499 </tr>*@ 1500 <tr class="mini-cart-totals dw-mod"> 1501 <td colspan="2">@Translate("Total")</td> 1502 <td class="u-ta-right">{{numberofproducts}}</td> 1503 <td class="u-ta-right" width="130">{{totalprice}}</td> 1504 </tr> 1505 </table> 1506 </div> 1507 1508 <table class="table mini-cart-table dw-mod"> 1509 <tr class="mini-cart-orderlines__footer dw-mod"> 1510 <td colspan="2"><button type="button" class="btn btn--secondary u-pull--left u-no-margin dw-mod btn--sm" onclick="Cart.EmptyCart(event)">@Translate("Empty cart")</button></td> 1511 <td colspan="2" class="u-ta-right"><a href="/Default.aspx?ID=@cartPageId" class="btn btn--primary u-pull--right u-no-margin dw-mod btn--sm">@Translate("Proceed to checkout")</a></td> 1512 </tr> 1513 </table> 1514 </div> 1515 {{/.}} 1516 </script> 1517 1518 <script id="MiniCartOrderline" type="text/x-template"> 1519 <tr class="{{isempty}}"> 1520 <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> 1521 <td> 1522 <a href="{{link}}" class="mini-cart-orderlines__name" title="{{name}}">{{name}}</a> 1523 <a href="{{link}}" class="mini-cart-orderlines__name item-number">{{variantname}}</a> 1524 <div class="item-number">{{unitname}}</div> 1525 </td> 1526 <td class="u-ta-right">{{quantity}}</td> 1527 <td class="u-ta-right">{{totalprice}}</td> 1528 </tr> 1529 </script> 1530 1531 <script id="MiniCartOrderlineMobile" type="text/x-template"> 1532 <tr class="{{isempty}}"> 1533 <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> 1534 <td> 1535 <a href="{{link}}" class="mini-cart-orderlines__name">{{name}}</a> 1536 <a href="{{link}}" class="mini-cart-orderlines__name item-number">{{variantname}}</a> 1537 <div class="item-number">{{unitname}}</div> 1538 </td> 1539 <td class="u-ta-right">{{quantity}}</td> 1540 <td class="u-ta-right">{{totalprice}}</td> 1541 </tr> 1542 </script> 1543 1544 <script id="MiniCartOrderlineDiscount" type="text/x-template"> 1545 <tr class="table__row--no-border {{isempty}}"> 1546 <td>&nbsp;</td> 1547 <td><div class="mini-cart-orderlines__name dw-mod">{{name}}</div></td> 1548 <td class="u-ta-right">&nbsp;</td> 1549 <td class="u-ta-right">{{totalprice}}</td> 1550 </tr> 1551 </script> 1552 1553 <!-- Javascript --> 1554 <script src="/Files/Templates/Designs/Rapido/js/handlebars-v4.0.11.js"></script> 1555 <script src="/Files/Templates/Designs/Rapido/js/master.min.js?v=@DateTime.Now"></script> 1556 1557 @if (Model.Area.Item.GetBoolean("UseCustomJavascript")) 1558 { 1559 <script src="/Files/Templates/Designs/Rapido/js/custom.min.js?v=@DateTime.Now"></script> 1560 } 1561 1562 <script> 1563 Wireframe.Init(@wireframeMode.ToLower()); 1564 </script> 1565 </body> 1566 </html> 1567 1568