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

1 @using Bolind.Web.CustomCode 2 @using Bolind.Web.CustomCode.CDN 3 @using Bolind.Web.CustomCode.Impersonation 4 @using Bolind.Web.CustomCode.Licitation 5 @using Bolind.Web.CustomCode.LWI.Selections 6 @using Bolind.Web.CustomCode.SalesPerson 7 @using Dynamicweb.Content 8 @using System.Web 9 @using Bolind.Web.CustomCode.Items.Settings 10 @using Dynamicweb 11 @using Dynamicweb.Environment.Web 12 @using Dynamicweb.Frontend; 13 @using NLWI.Core.Factory 14 @using NORRIQ.Common8.Caching 15 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 16 @{ 17 bool Privat = Model.Area.Item.GetBoolean("Private"); 18 var partnersite = !string.IsNullOrEmpty(Model.Area.Item.GetString("PartnerSiteID")); 19 var partnersiteid = Model.Area.Item.GetString("PartnerSiteID"); 20 //var bgimage = (Model.Area.Item.GetFile("BackgroundImage") != null) ? "Model.Area.Item.GetFile(BackgroundImage).Path" : ""; 21 var bgimage = Model.Area.Item.GetFile("BackgroundImage")?.Path ?? ""; 22 23 var item = Pageview.Area.Item.ToCodeFirstItem<Websites>(); 24 if (!string.IsNullOrWhiteSpace(bgimage)) 25 { 26 bgimage = Pageview.CdnWrap(bgimage); 27 } 28 string centerHeaderPrefix = "Header "; 29 var isCurrentlyImpersonating = ObjectFactory.GetInstance<NORRIQ.SalesPersonLogin.Services.ImpersonationService>().IsCurrentlyImpersonating(); 30 var userDisplayName = Pageview.User?.Name ?? string.Empty; 31 if (isCurrentlyImpersonating) 32 { 33 string name2 = Pageview.User.CustomFieldValues.FirstOrDefault(x => x.CustomField.SystemName == "AccessUser_Name2")?.Value?.ToString(); 34 if (!string.IsNullOrEmpty(name2)) 35 { 36 userDisplayName = $"{Pageview.User.Name} - {name2}"; 37 } 38 } 39 } 40 41 <!DOCTYPE html> 42 <html lang="@Pageview.Area.Culture"> 43 <head> 44 <title>@Model.Title</title> 45 <meta charset='utf-8' /> 46 <meta name="description" content="@Model.Description" /> 47 <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=5, user-scalable=yes, shrink-to-fit=no" /> 48 <meta http-equiv="x-ua-compatible" content="ie=edge"> 49 @if (Model.Area.Item.GetBoolean("NoIndex")) 50 { 51 <!-- TODO: remove on launch--> 52 <meta name="robots" content="noindex, nofollow" /> 53 } 54 @Model.MetaTags 55 @if (PageView.Current().IsB2C() && !partnersite) 56 { 57 <link rel="preload" href="@Pageview.CdnWrapResources(NORRIQ.Common8.Razor.TimestampSource.GetSourceWithTimestamp("/Files/dist/css/Bolind-b2c-min.css"))" as="style" /> 58 <link href="@Pageview.CdnWrapResources(NORRIQ.Common8.Razor.TimestampSource.GetSourceWithTimestamp("/Files/dist/css/Bolind-b2c-min.css"))" rel="stylesheet" media="screen" /> 59 } 60 else if (!PageView.Current().IsB2C() && !partnersite) 61 { 62 <link rel="preload" href="@Pageview.CdnWrapResources(NORRIQ.Common8.Razor.TimestampSource.GetSourceWithTimestamp("/Files/dist/css/Bolind-min.css"))" as="style" /> 63 64 <link href="@Pageview.CdnWrapResources(NORRIQ.Common8.Razor.TimestampSource.GetSourceWithTimestamp("/Files/dist/css/Bolind-min.css"))" rel="stylesheet" media="screen" /> 65 @*<link href="/Files/dist/css/Bolind-min.css" rel="stylesheet" />*@ 66 } 67 else if (partnersite) 68 { 69 <link rel="preload" href="@Pageview.CdnWrapResources(NORRIQ.Common8.Razor.TimestampSource.GetSourceWithTimestamp("/Files/dist/css/" + partnersiteid + "-min.css"))" as="style" /> 70 <link href="@Pageview.CdnWrapResources(NORRIQ.Common8.Razor.TimestampSource.GetSourceWithTimestamp("/Files/dist/css/" + partnersiteid + "-min.css"))" rel="stylesheet" media="screen" /> 71 } 72 @*<link href="@Pageview.CdnWrapResources(NORRIQ.Common8.Razor.TimestampSource.GetSourceWithTimestamp("/Files/dist/css/Print-min.css"))" rel="stylesheet" media="print" />*@ 73 <link href="/Files/dist/css/Print-min.css" rel="stylesheet" media="print" /> 74 <link rel="shortcut icon" href="@Pageview.CdnWrap("/Files/Images/Graphics/icons/favicon.ico")" /> 75 <!-- Apple --> 76 <link rel="apple-touch-icon" sizes="any" href="@Pageview.CdnWrap("/Files/Images/Graphics/icons/bl-icon-196.png")" /> 77 <link rel="apple-touch-icon" sizes="180x180" href="@Pageview.CdnWrap("/Files/Images/Graphics/icons/bl-icon-180.png")" /> 78 <!-- Windows --> 79 <meta name="application-name" content="@Model.Title" /> 80 <meta name="msapplication-TileColor" content="#020b10" /> 81 <meta name="msapplication-square150x150logo" content="@Pageview.CdnWrap("/Files/Images/Graphics/icons/bl-icon-150.png")" /> 82 <!-- Android --> 83 <link rel="icon" sizes="192x192" href="@Pageview.CdnWrap("/Files/Images/Graphics/icons/bl-icon-192.png")"> 84 85 @if (!string.IsNullOrWhiteSpace(item.HeaderScript)) 86 { 87 @item.HeaderScript 88 } 89 90 </head> 91 <body id="top"> 92 @if (Model.Area.Item.GetString("IeWarningText") != null) 93 { 94 <div class="alert alert-warning text-center ie-only" rel="noindex">@Model.Area.Item.GetString("IeWarningText")</div> 95 } 96 @if (partnersite && Pageview.User == null) 97 { 98 <div id="app" class="partnerlogin"> 99 <div class="partnerloginWrap"> 100 <div class="partnerLoginbox"> 101 <h1 class="page-header">@Model.Area.Item.GetString("PartnerSiteTitle")</h1> 102 @*@if (Model.Area.Item.GetFile("Logo") != null) 103 { 104 <picture> 105 @if (Model.Area.Item.GetFile("LogoMobile") != null) 106 { 107 <source media="(max-width:63.99875rem)" srcset="@Model.Area.Item.GetFile("LogoMobile").Path" /> 108 } 109 <img class="img-fluid" src="@Model.Area.Item.GetFile("Logo")" alt="@Translate(centerHeaderPrefix + "Website Logo Alttext", "Website Logo Alttext")" /> 110 </picture> 111 } 112 else 113 { 114 <i>@Translate(centerHeaderPrefix + "No logo found", "No logo found, please configure it in the Dynamicweb Administration")</i> 115 }*@ 116 <p>@Translate("login_subline01", "Du skal være logget ind for at se denne side.")</p> 117 <p>@Translate("login_subline02", "Du er muligvis blevet logget ud af systemet. Du bedes gå tilbage til din handelsportal og foretage login der igennem.")</p> 118 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("PartnerLoginText"))) 119 { 120 <hr class="hr-light" /> 121 <h3>@Translate("login_headline", "Alternativ adgang")</h3> 122 <p> 123 @Model.Area.Item.GetString("PartnerLoginText") 124 </p> 125 } 126 <head-login-form inline-template> 127 <form name="ExtUserForm" id="loginForm" method="post" class="form" role="form" v-on:submit="submitLogin"> 128 <input type="hidden" name="ID" id="ID" value="@Pageview.Page.ID" /> 129 <div class="form-group"> 130 <label for="Username">@Translate("Username", "Username")</label> 131 <input id="Username" v-model="username" name="Username" type="text" value="" class="form-control" autocomplete="off"> 132 </div> 133 <div class="form-group"> 134 <label for="Password">@Translate("Password", "Password")</label> 135 <input id="Password" v-model="password" name="Password" type="password" value="" class="form-control" autocomplete="off"> 136 </div> 137 <div v-if="loginFailed"> 138 <p class="alert alert-warning"> 139 @Translate("Login failed", "Invalid credentials") 140 </p> 141 </div> 142 <div class="basic_login-buttons"> 143 <button type="submit" role="button" class="btn btn-dark btn-block btn-lg" v-bind:class='{"loading": loading}' v-on:click="loading=true" id="loginBtn"> 144 @Translate("Login", "Login") 145 </button> 146 </div> 147 </form> 148 </head-login-form> 149 </div> 150 </div> 151 </div> 152 } 153 else 154 { 155 <div id="app"> 156 <header class="center_header hide-print"> 157 <div class="center_header-top"> 158 <div class="center_header-container"> 159 @if (partnersite) 160 { 161 <div class="partnersite"> 162 @Model.Area.Item.GetString("PartnerSiteTitle") 163 </div> 164 } 165 else 166 { 167 <ul> 168 <li> 169 <a href="@Model.Area.Item.GetString("B2BLink")" class="@(!PageView.Current().IsB2C() ? "active" : "")">@Translate(centerHeaderPrefix + "Erhverv", "Erhverv")</a> 170 </li> 171 @*<li> 172 <a href="@Model.Area.Item.GetString("B2CLink")" class="@(PageView.Current().IsB2C() ? "active" : "")">@Translate(centerHeaderPrefix + "Privat", "Privat")</a> 173 </li>*@ 174 </ul> 175 } 176 <div class="center_header-userinfo"> 177 @if (Model.Area.Item.GetFile("HeaderGraphic") != null) 178 { 179 <img src="@Pageview.CdnWrap(Model.Area.Item.GetFile("HeaderGraphic").Path)" class="img-fluid" alt="@Translate(centerHeaderPrefix + "Graphics Alt Text", "One Stop Shopping")" /> 180 } 181 @if (!PageView.Current().IsB2C()) 182 { 183 if (Pageview.User != null) 184 { 185 <p title="@userDisplayName" class="logged-in @(isCurrentlyImpersonating ? "is-sales-person" : "ae")"> 186 <span v-b-toggle.customer-center>@Pageview.User.UserName, @userDisplayName @Pageview.User.CustomFieldValues.FirstOrDefault(x => x.CustomField.SystemName == "AccessUser_Name2").Value</span><a v-clear-cache:click.cart.user href="/admin/public/extranetlogoff.aspx?ID=@(Model.Area.FirstActivePage.ID)">@Translate(centerHeaderPrefix + "Sign Out", "Sign Out")</a> 187 </p> 188 } 189 else 190 { 191 <p class="logged-out"> 192 <a href="javascript:void();" v-b-toggle.customer-center> 193 @Translate(centerHeaderPrefix + "Login", "Log ind") 194 </a> 195 </p> 196 } 197 } 198 </div> 199 </div> 200 </div> 201 <div class="center_header-main"> 202 <div class="logowrap"> 203 <a href="/" class="center_header-logo" title="@Translate(centerHeaderPrefix + "Go to frontpage", "Go to frontpage")"> 204 @if (Model.Area.Item.GetFile("Logo") != null) 205 { 206 <picture> 207 @if (Model.Area.Item.GetFile("LogoMobile") != null) 208 { 209 <source media="(max-width:63.99875rem)" srcset="@Pageview.CdnWrap(Model.Area.Item.GetFile("LogoMobile").Path)" /> 210 } 211 <img class="img-fluid" src="@Pageview.CdnWrap(Model.Area.Item.GetFile("Logo").Path)" alt="@Translate(centerHeaderPrefix + "Website Logo Alttext", "Website Logo Alttext")" /> 212 </picture> 213 } 214 else 215 { 216 <i>@Translate(centerHeaderPrefix + "No logo found", "No logo found, please configure it in the Dynamicweb Administration")</i> 217 } 218 </a> 219 </div> 220 <div class="center_header-container"> 221 <div class="center_header-burger"> 222 <button type="button" 223 aria-label="@Translate(centerHeaderPrefix + "Open main navigation", "Open main navigation")" 224 v-b-toggle.basic_navigation> 225 <span></span> 226 <span></span> 227 <span></span> 228 </button> 229 </div> 230 231 <instant-search base-class="center_header-search" :ajax-paragraph-id="@(ObjectFactory.GetInstance<NORRIQ.Common8.Context.ParagraphService>().GetParagraphId("instant-search-plp", 1))"></instant-search> 232 @*logo was here*@ 233 <ul class="center_header-functions"> 234 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("HeaderZeroIcon")) 235 && !string.IsNullOrEmpty(Model.Area.Item.GetString("HeaderZeroLabel")) 236 && !string.IsNullOrEmpty(Model.Area.Item.GetString("HeaderZeroLink"))) 237 { 238 <li> 239 <a href="@Model.Area.Item.GetString("HeaderZeroLink")"> 240 <svg> 241 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/Files/dist/icons/icons.svg#@Model.Area.Item.GetString("HeaderZeroIcon")"></use> 242 </svg> 243 <span class="label">@Model.Area.Item.GetString("HeaderZeroLabel")</span> 244 </a> 245 </li> 246 } 247 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("HeaderOneIcon")) 248 && !string.IsNullOrEmpty(Model.Area.Item.GetString("HeaderOneLabel")) 249 && !string.IsNullOrEmpty(Model.Area.Item.GetString("HeaderOneLink"))) 250 { 251 <li> 252 <a href="@Model.Area.Item.GetString("HeaderOneLink")"> 253 <svg> 254 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/Files/dist/icons/icons.svg#@Model.Area.Item.GetString("HeaderOneIcon")"></use> 255 </svg> 256 <span class="label">@Model.Area.Item.GetString("HeaderOneLabel")</span> 257 </a> 258 </li> 259 } 260 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("HeaderTwoIcon")) 261 && !string.IsNullOrEmpty(Model.Area.Item.GetString("HeaderTwoLabel")) 262 && !string.IsNullOrEmpty(Model.Area.Item.GetString("HeaderTwoLink"))) 263 { 264 <li class="center_header-contact"> 265 <a href="@Model.Area.Item.GetString("HeaderTwoLink")"> 266 <svg> 267 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/Files/dist/icons/icons.svg#@Model.Area.Item.GetString("HeaderTwoIcon")"></use> 268 </svg> 269 <span class="label">@Model.Area.Item.GetString("HeaderTwoLabel")</span> 270 </a> 271 </li> 272 } 273 @if (!Privat) 274 { 275 <li class="@(Pageview.User != null ? "favorites-allowed" : "favorites-closed")"> 276 <a href="@NORRIQ.Common8.Razor.Navigation.GetUrlByNavigationTag("favoritlister")"> 277 278 <svg> 279 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/Files/dist/icons/icons.svg#star"></use> 280 </svg> 281 <span class="label">@Translate(centerHeaderPrefix + "favoritliste", "favoritliste")</span> 282 283 </a> 284 </li> 285 <li class="center_header-customer"> 286 <button v-b-toggle.customer-center type="button" id="login-toggle" aria-label="@Translate("Show Webshop Login")" title="@(Pageview.User == null ? Translate("Login") : Translate("Account"))"> 287 <svg> 288 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/Files/dist/icons/icons.svg#user"></use> 289 </svg> 290 @if (Pageview.User == null) 291 { 292 <span class="label"> 293 @Translate(centerHeaderPrefix + "Login", "Log ind") 294 </span> 295 } 296 else 297 { 298 <span class="label"> 299 @Translate(centerHeaderPrefix + "Customer center", "Kundecenter") 300 </span> 301 } 302 </button> 303 <b-collapse id="customer-center" class="head_login-dropmenu" accordion="basic_navigation" v-auto-close> 304 <div class="head_login-dropmenu--box"> 305 @if (Pageview.User == null) 306 { 307 <p class="h6"> 308 <svg class="icon icon-dark"> 309 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/Files/dist/icons/icons.svg#user"></use> 310 </svg> 311 @Translate("Webshop Login", "Webshop Login") 312 </p> 313 <head-login-form inline-template> 314 <form name="ExtUserForm" id="loginForm" method="post" class="form" role="form" v-on:submit="submitLogin"> 315 <input type="hidden" name="ID" id="ID" value="@Pageview.Page.ID" /> 316 <div class="form-group"> 317 <label for="Username">@Translate("Username", "Username")</label> 318 <input id="Username" v-model="username" name="Username" type="text" value="" class="form-control" autocomplete="off"> 319 </div> 320 <div class="form-group"> 321 <label for="Password">@Translate("Password", "Password")</label> 322 <input id="Password" v-model="password" name="Password" type="password" value="" class="form-control" autocomplete="off"> 323 </div> 324 <div v-if="loginFailed"> 325 <p class="alert alert-warning"> 326 @Translate("Login failed", "Invalid credentials") 327 </p> 328 </div> 329 <div class="basic_login-buttons"> 330 <button type="submit" role="button" class="btn btn-primary btn-block" v-bind:class='{"loading": loading}' id="loginBtn"> 331 @Translate("Login", "Login") 332 </button> 333 </div> 334 </form> 335 </head-login-form> 336 <ul class="links"> 337 <li> 338 <a href="/Default.aspx?ID=@NORRIQ.Common8.Razor.Navigation.GetPageIdByNavigationTag("forgotpassword")&amp;LoginAction=Recovery"> 339 @Translate("Forgot password") 340 </a> 341 </li> 342 <li> 343 <a href="/Default.aspx?ID=@NORRIQ.Common8.Razor.Navigation.GetPageIdByNavigationTag("usercreate")"> 344 @Translate("Create User") 345 </a> 346 </li> 347 </ul> 348 } 349 else 350 { 351 <div> 352 <p class="h6"> 353 <svg class="icon icon-dark"> 354 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/Files/dist/icons/icons.svg#user"></use> 355 </svg> 356 @Pageview.User.Name 357 </p> 358 <div class="navi"> 359 @DwCaching.CacheByPage("bolind_customer.xslt", () => RenderNavigation(new { Template = "bolind_customer.xslt", Expandmode = "all", StartLevel = 1, EndLevel = 4, parenttag = "customer-portal" })) 360 </div> 361 <p class="text-right"> 362 <a v-clear-cache:click.cart.user href='/admin/public/extranetlogoff.aspx?ID=@(Pageview.Page.ID)' class="text-sm text-danger"> 363 @Translate("Sign out") 364 </a> 365 </p> 366 </div> 367 } 368 </div> 369 </b-collapse> 370 </li> 371 } 372 <li class="center_header-checkout"> 373 <cart-icon cartlink="@NORRIQ.Common8.Razor.Navigation.GetUrlByNavigationTag("checkout")"></cart-icon> 374 </li> 375 </ul> 376 377 </div> 378 </div> 379 @DwCachingWithSelections.CacheByPage("center_Header.xslt", () => RenderNavigation(new { Template = "center_Header.xslt", Expandmode = "all", StartLevel = 1, EndLevel = 4 })) 380 381 </header> 382 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 383 @using Bolind.Web.CustomCode.CDN 384 @using Dynamicweb.Frontend; 385 @using NORRIQ.Common8.Caching 386 387 @{ 388 string basicPagePrefix = "Page "; 389 var bg = Model.Item != null && Model.Item.GetBoolean("WhiteBackground") ? "whitebg" : ""; 390 } 391 @if (Pageview.IsCurrentUserAllowed) 392 { 393 var pageLayout = !string.IsNullOrEmpty(Model.Item.GetValue<ListViewModel>("Layout").SelectedValue) ? Model.Item.GetValue<ListViewModel>("Layout").SelectedValue : "content-page-sidebar"; 394 var pageClass = pageLayout == "page-wide" ? "basic_page-wide" : "basic_page"; 395 bool isBanner = Model.Item.GetBoolean("isBanner"); 396 var isBottomRight = Model.Item.GetBoolean("isBottomRight") ? " bottom-right" : "top-left"; 397 var isWhite = Model.Item.GetBoolean("isWhite") ? "text-white" : "text-dark"; 398 var isFixedWidth = Model.Item.GetBoolean("isFixedWidth") ? " is-fixed" : ""; 399 var justifyBanner = Model.Item.GetBoolean("isBottomRight") ? "space-between" : "center"; 400 401 402 if (!Model.Item.GetBoolean("HideBreadcrumb")) 403 { 404 @DwCaching.CacheByPage("basic_Breadcrumb.xslt", () => RenderNavigation(new { Template = "basic_Breadcrumb.xslt", Expandmode = "all", StartLevel = 1, EndLevel = 5 })) 405 } 406 <main class="@pageClass" id="main-element"> 407 @if (pageLayout == "content-page-sidebar" || pageLayout == "module-page-sidebar") 408 { 409 <aside class="basic_page-sidebar"> 410 @*<div class="sidebar-toggle"> 411 <button type="button" 412 class="btn-toggle" 413 v-b-toggle.sidebar-navigation 414 aria-label="@Translate(basicPagePrefix + "Open sidebar","Open sidebar")"> 415 <svg class="icon-left"> 416 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#chevron-left"></use> 417 </svg> 418 <span>@Pageview.Page.MenuText</span> 419 </button> 420 </div>*@ 421 @DwCaching.CacheByPage("basic_Page.xslt", () => RenderNavigation(new { Template = "basic_Page.xslt", StartLevel = 1, EndLevel = 3 })) 422 </aside> 423 <section class="basic_page-content @bg"> 424 @if (pageLayout == "content-page-sidebar" 425 && !string.IsNullOrEmpty(Model.Item.GetString("Title").ToString()) 426 || !string.IsNullOrEmpty(Model.Item.GetString("Text").ToString()) 427 || Model.Item.GetFile("Image") != null) 428 { 429 if (isBanner && Model.Item.GetFile("Image") != null) 430 { 431 <figure class="page-banner @isWhite" style="background-image:url(@Pageview.CdnWrap(Model.Item.GetFile("Image").Path);"> 432 <figcaption class="@justifyBanner"> 433 @if (!string.IsNullOrEmpty(Model.Item.GetString("Title").ToString())) 434 { 435 <h1 class="page-banner-title"> 436 @Model.Item.GetString("Title") 437 </h1> 438 } 439 @if (!string.IsNullOrEmpty(Model.Item.GetString("Text").ToString())) 440 { 441 <div class="@isBottomRight"> 442 <div class="page-banner-text@(isFixedWidth)"> 443 @Model.Item.GetString("Text") 444 </div> 445 </div> 446 447 } 448 </figcaption> 449 </figure> 450 } 451 else 452 { 453 if (!string.IsNullOrEmpty(Model.Item.GetString("Title").ToString())) 454 { 455 <header class="basic_page-header"> 456 <h1> 457 @Model.Item.GetString("Title") 458 </h1> 459 </header> 460 } 461 if (!string.IsNullOrEmpty(Model.Item.GetString("Text").ToString()) || Model.Item.GetFile("Image") != null) 462 { 463 string ImagePosition = !string.IsNullOrEmpty(Model.Item.GetValue<ListViewModel>("ImagePosition").SelectedValue) ? Model.Item.GetValue<ListViewModel>("ImagePosition").SelectedValue : "top"; 464 <div class="basic_page-@ImagePosition"> 465 @if (Model.Item.GetFile("Image") != null) 466 { 467 <figure> 468 <img src="@Pageview.CdnWrap(Model.Item.GetFile("Image").Path)" 469 alt="@(!string.IsNullOrEmpty(Model.Item.GetString("ImageText")) ? Model.Item.GetString("ImageText") : Model.Item.GetString("Title"))" 470 class="img-fluid" /> 471 @if (!string.IsNullOrEmpty(Model.Item.GetString("ImageText"))) 472 { 473 <figcaption>@Model.Item.GetString("ImageText")</figcaption> 474 } 475 </figure> 476 } 477 @if (!string.IsNullOrEmpty(Model.Item.GetString("Text"))) 478 { 479 <div class="basic_page-text"> 480 @Model.Item.GetString("Text") 481 </div> 482 } 483 </div> 484 } 485 } 486 } 487 @RenderPlaceholder() 488 </section> 489 } 490 else 491 { 492 @RenderPlaceholder() 493 @RenderBoxedPlaceholder() 494 } 495 </main> 496 } 497 else 498 { 499 <main class="basic_page" id="main-element"> 500 @RenderPlaceholder() 501 @RenderBoxedPlaceholder() 502 </main> 503 } 504 @helper RenderPlaceholder() 505 { 506 @Model.Placeholder("Content", "Content", "unwrap:true;default:true") 507 } 508 509 @helper RenderBoxedPlaceholder() 510 { 511 if (!String.IsNullOrEmpty(Model.Placeholder("Boxed"))) 512 { 513 <div class="basic_page-group"> 514 @Model.Placeholder("Boxed", "Grouped Content", "unwrap:true") 515 </div> 516 } 517 } 518 @*=== Footer Start ===*@ 519 @{ 520 string basicFooterPrefix = "Footer "; 521 } 522 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FooterGraphicsText")) || Model.Area.Item.GetFile("FooterGraphicsGraphic") != null) 523 { 524 <div class="basic_footer-graphics"> 525 <div class="basic_footer-wrap"> 526 <div class="basic_footer-box"> 527 @*@if (Pageview.User != null) 528 { 529 var salesPersonService = ObjectFactory.GetInstance<SalesPersonService>(); 530 var salesPerson = salesPersonService.GetPrimarySalesPerson(); 531 532 if (salesPerson != null) 533 { 534 <table class="table table-person"> 535 <tr> 536 <td class="img-cell"> 537 <img src="@Pageview.CdnWrap($"/Admin/Public/GetImage.ashx?Width=150&amp;Height=150&amp;Crop=5&amp;Compression=85&amp;Image={salesPerson.Image}")" /> 538 </td> 539 <td> 540 <p> 541 <strong>@Translate("contactperson_header", "Din kontaktperson")</strong><br /> 542 <span class="semibold">@salesPerson.Name</span> 543 <br /><span class="title">@salesPerson.Title</span><br /> 544 <span>@Translate("users_phone", "Tlf.")</span> <span>@salesPerson.Phone</span> 545 <br /> 546 <span>@Translate("users_email", "Email:")</span> <a href="mailto:@salesPerson.Email">@salesPerson.Email</a> 547 </p> 548 </td> 549 </tr> 550 </table> 551 } 552 else 553 { 554 <p>@Model.Area.Item.GetString("FooterGraphicsText")</p> 555 } 556 } 557 else 558 { 559 <p>@Model.Area.Item.GetString("FooterGraphicsText")</p> 560 }*@ 561 <p>@Model.Area.Item.GetString("FooterGraphicsText")</p> 562 </div> 563 @if (Model.Area.Item.GetFile("FooterGraphicsGraphic") != null) 564 { 565 <div class="basic_footer-box"> 566 <figure> 567 <img src="@Pageview.CdnWrap(Model.Area.Item.GetFile("FooterGraphicsGraphic").Path)" class="img-fluid" alt="@Translate(basicFooterPrefix + "Graphics Alt Text", "City")" /> 568 </figure> 569 </div> 570 } 571 </div> 572 </div> 573 } 574 <div class="basic_footer-sup"> 575 <div class="basic_footer-wrap"> 576 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FooterSubOneTitle")) && !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterSubOneText")) && Model.Area.Item.GetFile("FooterSubOneImage") != null) 577 { 578 <div class="basic_footer-box"> 579 <div class="basic_footer-text"> 580 <h3>@Model.Area.Item.GetString("FooterSubOneTitle")</h3> 581 @Model.Area.Item.GetString("FooterSubOneText") 582 </div> 583 <div class="basic_footer-image"> 584 <figure> 585 <img src="@Pageview.CdnWrap(Model.Area.Item.GetFile("FooterSubOneImage").Path)" alt="@Model.Title" class="img-fluid" /> 586 </figure> 587 </div> 588 </div> 589 } 590 591 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FooterSubTwoTitle")) && !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterSubTwoText")) && Model.Area.Item.GetFile("FooterSubTwoImage") != null) 592 { 593 <div class="basic_footer-box"> 594 <div class="basic_footer-text"> 595 <h3>@Model.Area.Item.GetString("FooterSubTwoTitle")</h3> 596 @Model.Area.Item.GetString("FooterSubTwoText") 597 </div> 598 <div class="basic_footer-image"> 599 <figure> 600 <img src="@Pageview.CdnWrap(Model.Area.Item.GetFile("FooterSubTwoImage").Path)" alt="@Model.Title" class="img-fluid" /> 601 </figure> 602 </div> 603 </div> 604 } 605 </div> 606 </div> 607 <footer class="basic_footer"> 608 <div class="basic_footer-wrap"> 609 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FooterOneTitle")) && !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterOneText"))) 610 { 611 <div class="basic_footer-box"> 612 <div class="basic_footer-head" role="button" v-b-toggle.footer-one> 613 <h3>@Model.Area.Item.GetString("FooterOneTitle")</h3> 614 </div> 615 <b-collapse id="footer-one" class="basic_footer-collapse"> 616 <div class="basic_footer-body"> 617 @Model.Area.Item.GetString("FooterOneText") 618 </div> 619 </b-collapse> 620 </div> 621 } 622 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FooterTwoTitle"))) 623 { 624 var navitag = Model.Area.Item.GetString("FooterTwoNavigationtag"); 625 626 <div class="basic_footer-box"> 627 <div class="basic_footer-head" role="button" v-b-toggle.footer-two> 628 <h3>@Model.Area.Item.GetString("FooterTwoTitle")</h3> 629 </div> 630 <b-collapse id="footer-two" class="basic_footer-collapse"> 631 <div class="basic_footer-body"> 632 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FooterTwoText"))) 633 { 634 @Model.Area.Item.GetString("FooterTwoText") 635 } 636 @if (!string.IsNullOrEmpty(navitag)) 637 { 638 @DwCaching.CacheByArea("basic_SubPage.xslt", () => RenderNavigation(new { Template = "basic_SubPage.xslt", Expandmode = "all", StartLevel = 1, EndLevel = 2, NavigationTag = navitag })) 639 } 640 </div> 641 </b-collapse> 642 </div> 643 } 644 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FooterThreeTitle")) && !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterThreeText"))) 645 { 646 <div class="basic_footer-box"> 647 <div class="basic_footer-head" role="button" v-b-toggle.footer-three> 648 <h3>@Model.Area.Item.GetString("FooterThreeTitle")</h3> 649 </div> 650 <b-collapse id="footer-three" class="basic_footer-collapse"> 651 <div class="basic_footer-body"> 652 @Model.Area.Item.GetString("FooterThreeText") 653 </div> 654 </b-collapse> 655 </div> 656 } 657 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FooterFourText")) && !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterCopyright"))) 658 { 659 <div class="basic_footer-box"> 660 <div id="footer-four" class="basic_footer-logo"> 661 <div class="basic_footer-body"> 662 @Model.Area.Item.GetString("FooterFourText") 663 <p> 664 @Translate(basicFooterPrefix + "Copyright", "Copyright")&copy; @DateTime.Now.Year - @Model.Area.Item.GetString("FooterCopyright") 665 </p> 666 </div> 667 </div> 668 </div> 669 } 670 </div> 671 @if (Model.Area.Item.GetItems("PaymentCards") != null && Model.Area.Item.GetItems("PaymentCards").Any()) 672 { 673 <div class="basic_footer-wrap"> 674 <div class="basic_footer-box"> 675 <div class="basic_footer-icons"> 676 <ul class="list-inline payments"> 677 @foreach (var i in Model.Area.Item.GetItems("PaymentCards")) 678 { 679 var cardTitle = i.GetString("Title"); 680 var cardImage = i.GetFile("ImageFile"); 681 <li class="list-inline-item"> 682 <img src="@cardImage.Path" alt="@cardTitle" class="img-fluid" /> 683 </li> 684 } 685 </ul> 686 </div> 687 </div> 688 </div> 689 } 690 </footer> 691 @*=== Footer End ===*@ 692 </div> 693 } 694 <a href="#top" class="scroll-to-top" title="@Translate("Scroll to top", "Gå til toppen")"> 695 <svg class="icon"> 696 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/Files/dist/icons/icons.svg#arrow-to-top"></use> 697 </svg><span class="sr-only">@Translate("Scroll to top", "Gå til toppen")</span> 698 </a> 699 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 700 701 <script type="text/x-template" id="add-to-basket-simple-template"> 702 @{ 703 string addToBasketSimplePrifix = "BuyButton "; 704 } 705 <div v-bind:class="[{added: IsAdded}, {adding: IsAdding}]"> 706 <label for="quantity">@Translate(addToBasketSimplePrifix + "Quantity", "Quantity")</label> 707 <input class="form-control" type="number" name="quantity" v-model="quantity" autocomplete="off" onclick="this.select()"> 708 <button :disabled="quantity < 1 || isCoolDownProduct" :class="buttonCl" v-on:click="addToBasketAndResetQuantity()" aria-label="@Translate(addToBasketSimplePrifix + "Add", "Add")"> 709 <slot> 710 <svg> 711 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/Files/dist/icons/icons.svg#shopping-cart"> 712 </use> 713 </svg> 714 <span v-if="isCoolDownProduct"> 715 @Translate(addToBasketSimplePrifix + "Add to basket udmeldt", "Udgået") 716 </span> 717 <span v-else> 718 @Translate(addToBasketSimplePrifix + "Add to basket", "Add to basket") 719 </span> 720 </slot> 721 </button> 722 </div> 723 </script> 724 725 <script type="text/x-template" id="quick-add-template"> 726 @{ 727 string quickAddPrifix = "BuyButton "; 728 } 729 <div v-bind:class="[{added: IsAdded}, {adding: IsAdding}]" v-if="!isCoolDownProduct"> 730 <label for="quantity">@Translate(quickAddPrifix + "Quantity", "Quantity")</label> 731 <input class="form-control" type="number" id="quantity" name="quantity" v-model="quantity" autocomplete="off"> 732 </div> 733 </script> 734 735 <script type="text/x-template" id="add-to-basket-button-only-template"> 736 @{ 737 string addToBasketPrefix = "BuyButton "; 738 } 739 <div v-bind:class="[{added: IsAdded}, {adding: IsAdding}]"> 740 <button :class="buttonCl" v-on:click="addToBasket()" :disbaled="isCoolDownProduct"> 741 <slot v-if="isCoolDownProduct"> 742 @Translate(addToBasketPrefix + "Add to basket udmeldt", "Udgået") 743 </slot> 744 <slot v-else> 745 @Translate(addToBasketPrefix + "Add to basket", "Add to basket") 746 </slot> 747 </button> 748 </div> 749 </script> 750 751 <script type="text/x-template" id="add-to-basket-rounding-template"> 752 @{ 753 string addToBasketRoundingPrifix = "BuyButton "; 754 } 755 <div v-bind:class="[{animated: true}, {added: IsAdded}, {adding: IsAdding}]" v-if="showBasket()"> 756 <p class="alert alert-warning" v-if="didRounding"> 757 <svg> 758 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#info-circle"></use> 759 </svg> 760 @Translate("product_minPurchaseRoundingInfoText", "Vi har ændret antal ift. kolli-størrelse") 761 </p> 762 <div class="addtobasket-group"> 763 @*input-group was here*@ 764 @*@if (Pageview.User != null) 765 { 766 <favorite-item :product-id="productId" 767 :language-id="languageId" 768 :variant-id="variantId" 769 ref="favoriteItem"> 770 </favorite-item> 771 }*@ 772 <template v-if="missingVariant"> 773 <p class="alert alert-warning"> 774 <svg> 775 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#info-circle"> 776 </use> 777 </svg> 778 @Translate(addToBasketRoundingPrifix + "Select variant", "Select variant") 779 </p> 780 </template> 781 <template v-else> 782 <div class="input-group"> 783 <div class="input-group-prepend"><span class="input-group-text">{{unitsOfMeasureDescription().toLowerCase().trim() }}</span></div> 784 <label for="quantity" class="sr-only">@Translate(addToBasketRoundingPrifix + "Quantity", "Quantity")</label> 785 <input class="form-control" type="number" v-on:keyup.enter="addToBasketAndResetQuantity()" min="1" max="9999" name="quantity" v-model="quantity" value="1" autocomplete="off" onclick="this.select()" v-on:blur="calculateMinPurchase($event.target.value)"> 786 <div class="input-group-append"> 787 <button :disabled="quantity < 1 || isCoolDownProduct" :class="buttonCl" v-on:click="addToBasketAndResetQuantity()" aria-label="@Translate(addToBasketRoundingPrifix + "Add", "Add")" should-animate> 788 <slot> 789 <svg> 790 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#shopping-cart"> 791 </use> 792 </svg> 793 <span v-if="isCoolDownProduct"> 794 @Translate(addToBasketRoundingPrifix + "Add to basket udmeldt", "Udgået") 795 </span> 796 <span v-else> 797 @Translate(addToBasketRoundingPrifix + "Add to basket", "Add to basket") 798 </span> 799 </slot> 800 </button> 801 </div> 802 </div> 803 </template> 804 </div> 805 @*<div id="add-message" v-if="IsAdded || IsAdding"><p>@Translate("Tilføjet til kurv!")</p></div>*@ 806 </div> 807 </script> 808 @using Bolind.Web.CustomCode 809 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 810 811 <script type="text/x-template" id="async-price-template"> 812 @{ 813 string asyncPrefix = "Async "; 814 } 815 <div :class="classType + (loading && !isCoolDownProduct ? ' loading' : '')"> 816 <template> 817 <p :class="classType + '--error'" v-if="error">{{error}}</p> 818 </template> 819 <template v-if="isCoolDownProduct"> 820 <p class="alert noprice" style="background-color: #dae0e5"> 821 @Translate(asyncPrefix + "item discontinued", "Vare udg&aring;et") 822 </p> 823 </template> 824 <template v-else-if="!onlyStock && !error && price && price.unitPrice"> 825 @{ 826 bool B2C = Pageview.IsB2C(); 827 var vat = (B2C) ? Translate("product_inclVat", "inkl. moms") : Translate("product_exVat", "ekskl. moms"); 828 } 829 <p class="alert alert-warning noprice" v-if="priceWithoutVatString == '0' && !allowZeroPrice"> 830 @Translate(asyncPrefix + "Contact Bolind for price", "Kontakt Bolind for pris") 831 </p> 832 <p class="listprice" v-if="showListPrice && (priceWithoutVatString != '0')"> 833 @Translate(asyncPrefix + "product_listPrice", "Vejledende pris:") <span>{{ listPrice | currency(true) }}</span> 834 </p> 835 <p class="price" v-bind:class="{ sale: showListPrice }" v-if="!loading && price && price.netUnitPrice && (priceWithoutVatString != '0' || allowZeroPrice ) && !isCart" itemprop="priceCurrency" :content="price.unitPrice.currencyKey"> 836 <template v-if="isCampaign"> 837 <span class="price-campaigntext">@Translate(asyncPrefix + "Campaign_price", "Kampagnepris")</span> 838 </template> 839 <span itemprop="price" :content="price.unitPrice.priceWithoutVat" class="price-actual"> 840 {{ price.netUnitPrice.priceWithoutVat | currency(true) }} 841 </span> 842 </p> 843 <template v-if="(priceWithoutVatString != '0' || allowZeroPrice) && !isCart"> 844 <ul class="list-inline qtyPrices" v-if="price.extraInfo.navPrices.length > 0 && showQtyPrices(price)"> 845 <li v-for="navPrice in price.extraInfo.navPrices"> 846 <span>@Translate(asyncPrefix + "Price pr. unit", "Fra") {{navPrice.quantity}} {{ unitsOfMeasureDescription().toLowerCase().trim() }} </span> 847 <span class="qtyprice">{{navPrice.price | currency(true)}}</span> 848 </li> 849 </ul> 850 <p class="priceper"> 851 @Translate(asyncPrefix + "product_pricePer", "Pris pr.") {{ unitsOfMeasureDescription().toLowerCase().trim() }} @vat 852 </p> 853 @if (!B2C) 854 { 855 <p class="priceincl" v-if="!hidePriceIncl"> 856 @Translate(asyncPrefix + "PriceVatIncl", "Pris inkl. moms:") <span>{{ priceWithVatString | currency(true) }}</span> 857 </p> 858 } 859 </template> 860 <template v-if="isCart"> 861 <span class="montage-price">{{ price.netUnitPrice.priceWithoutVat | currency(true) }}</span> 862 </template> 863 </template> 864 </div> 865 </script> 866 <script type="text/x-template" id="cart-icon-template"> 867 @{ 868 string translationPrefixCart = "Minicart "; 869 } 870 <a :href="cartlink"> 871 <svg> 872 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#shopping-cart"></use> 873 </svg> 874 <span class="label">@Translate(translationPrefixCart + "Checkout", "Checkout")</span> 875 <span v-if="!cartEmpty" class="cart-quantity">{{quantity}}</span> 876 </a> 877 </script> 878 <script type="text/x-template" id="basic-facet-filter-template"> 879 @{ 880 string basicFacetPrefix = "Filter "; 881 } 882 883 <div class="basic_filter" v-if="!error && facetFilters"> 884 <template v-if="HasActiveFilter()"> 885 <p id="selected-filter-label" class="sr-only"> 886 @Translate(basicFacetPrefix + "Active", "Active") 887 </p> 888 <div aria-labelledby="selected-filter-label" class="basic_filter-active"> 889 <template v-for="facetFilter in facetFilters"> 890 <span v-for="option in SelectedOptions(facetFilter)" class="custom-control custom-filter"> 891 <input type="checkbox" 892 :id="'Selected-' + facetFilter.Name + '-' + option.Name" 893 :name="facetFilter.Name" 894 :key="option.Label" 895 :v-model="option.Selected" 896 :checked="option.Selected" 897 v-on:click="ToggleFilter(facetFilter.Name,option)" 898 class="custom-control-input" /> 899 <label :for="'Selected-' + facetFilter.Name + '-' + option.Name" class="custom-control-label"> 900 <span class="filtername">{{facetFilter.Name}}:&nbsp;</span> 901 <span class="filterstring">{{option.Label}}</span> 902 <span class="remove">X</span> 903 </label> 904 </span> 905 </template> 906 </div> 907 </template> 908 <b-collapse class="basic_filter-collapse" id="sidebar-filter"> 909 <div class="basic_filter-head"> 910 <h3> 911 @Translate(basicFacetPrefix + "Filter", "Filter") 912 </h3> 913 <template v-if="queryLoading"> 914 <span class="spinner-md-default"></span> 915 </template> 916 <template v-else> 917 <button type="button" class="btn-close" v-b-toggle.sidebar-filter aria-label="@Translate(basicFacetPrefix + "Close Filter", "Close Filter")"> 918 <span></span> 919 <span></span> 920 </button> 921 </template> 922 </div> 923 <div class="basic_filter-groups"> 924 <div class="basic_filter-group" v-for="(facetFilter, index) in facetFilters"> 925 <p :id="'filter-group-' + facetFilter.Name.toLowerCase().trim()" v-b-toggle="'filter-collapse-' + facetFilter.Name.toLowerCase().trim()"> 926 {{facetFilter.Name}} 927 <svg> 928 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/Files/dist/icons/icons.svg#chevron-right"></use> 929 </svg> 930 </p> 931 <b-collapse :id="'filter-collapse-' + facetFilter.Name.toLowerCase().trim()" :visible="ShowGroupIfSelected(facetFilter.Options, index)" class="basic_filter-collapsing"> 932 <template v-if="facetFilter.Options.length > 7"> 933 <b-collapse class="basic_filter-expand" :id="'filter-expand-' + facetFilter.Name.toLowerCase().trim()" :visible="ShowMoreIfSelected(facetFilter.Options, index)"> 934 <ul :aria-labelledby="'filter-group-' + facetFilter.Name.toLowerCase().trim()"> 935 <li v-for="option in facetFilter.Options" class="custom-control custom-checkbox"> 936 <input type="checkbox" class="custom-control-input" 937 :id="'UnSelected-' + facetFilter.Name + '-' + option.Name" 938 :key="option.Label" 939 :name="facetFilter.Name" 940 :v-model="option.Selected" 941 :checked="option.Selected" 942 v-on:click="ToggleFilter(facetFilter.Name,option)" /> 943 <label :for="'UnSelected-' + facetFilter.Name + '-' + option.Name" class="custom-control-label"> 944 {{option.Label}} ({{option.Count}}) 945 </label> 946 </li> 947 </ul> 948 </b-collapse> 949 <a v-b-toggle="'filter-expand-' + facetFilter.Name.toLowerCase().trim()" class="basic_filter-expanding" v-if="facetFilter.Options.length > 7"> 950 <span class="show-more">+ @Translate(basicFacetPrefix + "show more", "show more")</span> 951 <span class="show-less">- @Translate(basicFacetPrefix + "show less", "show less")</span> 952 </a> 953 </template> 954 <template v-else> 955 <ul :aria-labelledby="'filter-group-' + facetFilter.Name.toLowerCase().trim()"> 956 <li v-for="option in facetFilter.Options" class="custom-control custom-checkbox"> 957 <input type="checkbox" class="custom-control-input" 958 :id="'UnSelected-' + facetFilter.Name + '-' + option.Name" 959 :key="option.Label" 960 :name="facetFilter.Name" 961 :v-model="option.Selected" 962 :checked="option.Selected" @*AG: should it have been 'checked'?*@ 963 v-on:click="ToggleFilter(facetFilter.Name,option)" /> 964 <label :for="'UnSelected-' + facetFilter.Name + '-' + option.Name" class="custom-control-label"> 965 {{option.Label}} <span class="count">({{option.Count}})</span> 966 </label> 967 </li> 968 </ul> 969 </template> 970 </b-collapse> 971 </div> 972 </div> 973 <div class="basic_filter-foot"> 974 <button class="btn btn-dark btn-icon btn-block" v-b-toggle.sidebar-filter> 975 <svg class="icon"> 976 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/Files/dist/icons/icons.svg#check"></use> 977 </svg> 978 @Translate(basicFacetPrefix + "Show selected", "Show Selected") 979 </button> 980 </div> 981 </b-collapse> 982 </div> 983 </script> 984 @{ 985 string favoriteListPrefix = "FavoriteList "; 986 } 987 <script type="text/x-template" id="favorite-list-template"> 988 <div v-bind:class="{ active: active }" id="basic_favoritelist" v-autoClose="closeFoldOut"> 989 <div class="fav-inwrap"> 990 <template v-if="loading"> 991 <div class="loading"> 992 <span class="spinner-xl-default"></span> 993 </div> 994 </template> 995 <h5>@Translate(favoriteListPrefix + "Favoritliste", "Favoritliste")</h5> 996 <p class="desc"> 997 @Translate(favoriteListPrefix + "Tilføj eller fjern markering.", "Tilføj eller fjern markering.") 998 </p> 999 <template v-for="favoriteList in favoriteLists"> 1000 <div class="form-check"> 1001 <input type="checkbox" :id="'fav-' + favoriteList.id" :value="favoriteList.id" :checked="isItemAddedToThisList(favoriteList)" v-on:change="toggleItem($event, favoriteList.id)" class="form-check-input" /> 1002 <label :for="'fav-' + favoriteList.id" class="form-check-label"> 1003 {{favoriteList.name}} 1004 </label> 1005 </div> 1006 </template> 1007 <div class="form-check"> 1008 <input type="checkbox" id="addNewListCheckbox" v-model="addNewList" class="form-check-input" /> 1009 <label for="addNewListCheckbox" class="form-check-label"> 1010 @Translate(favoriteListPrefix + "Ny favoritliste", "Ny favoritliste") 1011 </label> 1012 </div> 1013 <div v-if="addNewList" class="input-group input-group-sm"> 1014 <input type="text" id="addNewListNameInput" v-model="addNewListNameInput" class="form-control new-list-name-input" v-on:keyup.enter="saveAsNewList" /> 1015 <div class="input-group-append"> 1016 <button v-on:click="saveAsNewList" class="btn btn-dark">@Translate(favoriteListPrefix + "Gem", "Gem")</button> 1017 </div> 1018 </div> 1019 </div> 1020 </div> 1021 </script> 1022 <script type="text/x-template" id="favorite-item-template"> 1023 <div class="basic_favoriteitem" v-if="loaded"> 1024 <button class="btn btn-light btn-icon icon-only" title="@Translate("AddFavorite", "Tilføj favorit")" v-on:click="toggleFavoriteList($event)"> 1025 <template v-if="showFavoriteIcon"> 1026 <svg viewBox="0 0 576 512" class="added"><path d="M259.3 17.8L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6L382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0z"></path></svg> 1027 @*<svg> 1028 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#star"></use> 1029 </svg>*@ 1030 <span class="pdp-only">@Translate("FavoriteAdded", "Favorit")</span> 1031 </template> 1032 <template v-else> 1033 <svg viewBox="0 0 576 512"><path d="M528.1 171.5L382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6zM388.6 312.3l23.7 138.4L288 385.4l-124.3 65.3 23.7-138.4-100.6-98 139-20.2 62.2-126 62.2 126 139 20.2-100.6 98z"></path></svg> 1034 @*<svg> 1035 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#star-stroke"></use> 1036 </svg>*@ 1037 <span class="pdp-only">@Translate("AddFavorite", "Tilføj favorit")</span> 1038 </template> 1039 </button> 1040 </div> 1041 </script> 1042 @using Bolind.Web.CustomCode.CDN 1043 @using Dynamicweb.Frontend 1044 <script type="text/x-template" id="instant-search-template"> 1045 <form v-bind:class="baseClass" action="@NORRIQ.Common8.Razor.Navigation.GetUrlByNavigationTag("searchresult")" v-autoClose="closeFoldOut"> 1046 <div class="basic_instantsearch"> 1047 <label for="searchquery" class="sr-only">@Translate(centerHeaderPrefix + "Search products", "Hvad søger du?")</label> 1048 <input type="search" 1049 placeholder="@Translate(centerHeaderPrefix + "Search products", "Hvad søger du?")" 1050 id="searchquery" 1051 name="searchquery" 1052 autocomplete="off" 1053 v-on:input="inputChanged" 1054 v-on:focus="foldActive = 'active'"> 1055 <button type="submit"> 1056 <span class="sr-only">@Translate(centerHeaderPrefix + "Search", "Søg")</span> 1057 <svg> 1058 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/Files/dist/icons/icons.svg#search"></use> 1059 </svg> 1060 </button> 1061 <div class="fold-out" v-bind:class="{ active: foldActive }"> 1062 <div class="products"> 1063 <template v-if="searchQuery == ''"> 1064 @Translate(centerHeaderPrefix + "Type something", "Indtast for at søge") 1065 </template> 1066 <template v-else-if="queryLoading"> 1067 <div class="basic_listview-loading"> 1068 <span class="spinner-xl-default"></span> 1069 </div> 1070 </template> 1071 <template v-else-if="productList == null"> 1072 @Translate(centerHeaderPrefix + "Empty search...", "Der blev ikke fundet varer...") 1073 </template> 1074 <table v-else class="table table-sm table-border-bottom"> 1075 <tbody> 1076 <tr v-for="product in productList"> 1077 <td class="thumb text-center"> 1078 <a :href="getProductUrl(product)"> 1079 <img :src="'@PageView.Current().CdnWrap("/Admin/Public/GetImage.ashx?Width=50&amp;Height=40&amp;fillcanvas=true&amp;Compression=85&amp;Crop=5&amp;Image=")' + (product.PrimaryImage ? product.PrimaryImage : '/Files/Images/Default.png')" /> 1080 </a> 1081 </td> 1082 <td> 1083 <a :href="getProductUrl(product)"> 1084 {{product.Name}} <small>{{product.Description2}} {{product.Description3}}</small> 1085 </a> 1086 </td> 1087 <td class="text-right"> 1088 <small>{{product.Number}}</small> 1089 </td> 1090 </tr> 1091 </tbody> 1092 </table> 1093 </div> 1094 <div v-if="searchQuery != '' && productList != null" class="actions"> 1095 <a :href="'@NORRIQ.Common8.Razor.Navigation.GetUrlByNavigationTag("searchresult")?searchquery=' + searchQuery">@Translate(centerHeaderPrefix + "See all products", "Se alle varer")</a> 1096 </div> 1097 </div> 1098 </div> 1099 </form> 1100 </script> 1101 <script type="text/x-template" id="pagination-template"> 1102 @{ 1103 string paginationPrefix = "Pagination "; 1104 } 1105 <nav aria-label="@Translate(paginationPrefix + "Produktliste pagination", "Produktliste pagination")"> 1106 <ul class="pagination"> 1107 <li :class="['page-item', currentPage == 1 ? 'disabled' : '' ]"> 1108 <a class="page-link" v-on:click="togglePrevPage()" aria-label="@Translate(paginationPrefix + "Previous Page", "Previous Page")" v-bind:aria-disabled="currentPage > 1 ? 'true' : null"> 1109 <svg> 1110 <use xmlns:xlink="http://www.w3.org/1999/xlink" 1111 xlink:href="/files/dist/icons/icons.svg#chevron-left"> 1112 </use> 1113 </svg> 1114 </a> 1115 </li> 1116 <template v-for="n in totalPages" v-if="showPage(n)"> 1117 <li :key="n" :class="(n == currentPage ? 'page-item active' : 'page-item')"> 1118 <a v-on:click="togglePage(n)" v-bind:aria-current="(n == currentPage ? 'aria-page' : '')" class="page-link"> 1119 {{n}} 1120 </a> 1121 </li> 1122 </template> 1123 <li :class="'page-item' + (currentPage >= totalPages ? ' disabled' : '')"> 1124 <a v-on:click="toggleNextPage()" aria-label="@Translate(paginationPrefix + "Next Page", "Next Page")" class="page-link" v-bind:aria-disabled="totalPages > currentPage ? 'true' : null"> 1125 <svg class="icon-pagination"> 1126 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#chevron-right"></use> 1127 </svg> 1128 </a> 1129 </li> 1130 </ul> 1131 </nav> 1132 </script> 1133 1134 <script> 1135 var messages = { 1136 required: '@Translate("messages_required", "This field is required")', 1137 email: ' @Translate("messages_email", "Enter email")', 1138 numeric: ' @Translate("messages_numeric", "Enter number")', 1139 checked: ' @Translate("messages_checked", "Please accept terms and conditions to shop")', 1140 max: '@Translate("messages_max", "This field contains to many characters")' 1141 }; 1142 </script> 1143 @if (System.Web.HttpContext.Current.Session[WebsiteService.ClearLocalStorageTag] != null) 1144 { 1145 System.Web.HttpContext.Current.Session.Remove(WebsiteService.ClearLocalStorageTag); 1146 <script> 1147 localStorage.clear(); 1148 console.log("localstorage cleared"); 1149 </script> 1150 } 1151 <script src="@Pageview.CdnWrapResources(NORRIQ.Common8.Razor.TimestampSource.GetSourceWithTimestamp("/Files/dist/scripts/bundle.min.js"))" data-category-consent="cookie_cat_necessary"></script> 1152 <script> 1153 AppStart.VueProvider.init({ 1154 webApiUrl: '@System.Web.Configuration.WebConfigurationManager.AppSettings["WebApiProxyUrl"]', 1155 currencyCode: '@Pageview.Area.EcomCurrencyId', 1156 locale: '@Pageview.Area.Culture', 1157 currencyLeft: false, 1158 currencySpacing: true, 1159 currencySymbol: '@Pageview.Area.EcomCurrencyId', 1160 currencyDecimalSeparator: ',', 1161 currencyGroupSeparator: '.', 1162 currencyDecimalDigits: 2, 1163 dateFormatShort: '@Pageview.Area.Dateformat' 1164 }); 1165 </script> 1166 <script append="replace"></script> 1167 <script src="https://www.google.com/recaptcha/api.js" async defer></script> 1168 </body> 1169 </html>