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