Error executing template "Designs/kabooki-shop/_parsed/espresso.parsed.cshtml"System.ArgumentNullException: Value cannot be null.Parameter name: sourceat System.Linq.Enumerable.Where[TSource](IEnumerable`1 source, Func`2 predicate)at Dynamicweb.Frontend.XmlNavigation.FilterPages(IEnumerable`1 pages)at Dynamicweb.Frontend.XmlNavigation.MakeXml(Int32 parentId, Int32 levelStart, Int32 levelStop, Expand expand, Int32 selectedAreaId)at Dynamicweb.Frontend.XmlNavigation.GetNavigationHtml(Int32 parentId, Int32 levelStart, Int32 levelStop, Expand expand, String name, String xsltPath, Int32 selectedAreaId, Boolean sitemapMode, NameValueCollection settings, NameValueCollection attributes, IncludeMode mode)at Dynamicweb.Frontend.XmlNavigation.GetNavigationHtml(NameValueCollection settings, NameValueCollection attributes)at CompiledRazorTemplates.Dynamic.RazorEngine_ad08edcd10534c3780b0eff88ae870f8.Execute() in E:\Dynamicweb.NET\Solutions\kabooki.espresso4.dk\files\Templates\Designs\kabooki-shop\_parsed\espresso.parsed.cshtml:line 1403at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader)at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.b__0(TextWriter writer)at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)at Dynamicweb.Rendering.Template.RenderRazorTemplate()
1 @inherits Co3.Espresso.Website.TemplateBases.Pages.PageBase@using System.IO@using System.Web@using Dynamicweb.Frontend@using Dynamicweb.Ecommerce.Common@{string globalAreaLang = PageView.Current().Area.CultureInfo.TwoLetterISOLanguageName;//string currencySeparatorDecimal = PageView.Current().Area.CultureInfo.NumberFormat.CurrencyDecimalSeparator;//string currencySeparatorInteger = PageView.Current().Area.CultureInfo.NumberFormat.CurrencyGroupSeparator;string currencySeparatorDecimal = PageView.Current().Area.CultureInfo.NumberFormat.NumberDecimalSeparator;string currencySeparatorInteger = PageView.Current().Area.CultureInfo.NumberFormat.NumberGroupSeparator;string openGraphUrl = PageView.Current().SearchFriendlyUrl;string openGraphImage = HttpContext.Current.Request.Url.Scheme + "://" + HttpContext.Current.Request.Url.Host + Espresso.OpenGraphImage;bool isUserAuthenticated = PageView.Current().User != null;string webfontsSnippetHtml = RenderSnippet( "webfonts" ).ToString().Trim();int areaID = PageView.Current().Area.ID;bool isImageBankArea = PageView.Current().Area.ID == 24;bool isProductPage = string.IsNullOrEmpty( HttpContext.Current.Request[ "productid" ] ) == false;string globalValueUrl = GetGlobalValue( "Global:Pageview.Url" );string canonicalPageView = String.Format( "{0}://{1}{2}", GetGlobalValue( "Global:Request.Scheme" ), GetGlobalValue( "Global:Request.Host" ), globalValueUrl );string pageCanonical = PageView.Current().Page.MetaCanonical;string eComCanonicalSnippetTag = RenderSnippet( "eComCanonical" ).ToString().Trim();if ( GetGlobalValue( "Global:Pageview.Url" ).IndexOf( "?" ) > -1 ){globalValueUrl = GetGlobalValue( "Global:Pageview.Url" ).Substring( 0, GetGlobalValue( "Global:Pageview.Url" ).IndexOf( "?" ) );}}<!DOCTYPE html><html lang="@globalAreaLang" data-separator-integer="@currencySeparatorInteger" data-separator-decimal="@currencySeparatorDecimal"><head><script id="CookieConsent" src="https://policy.app.cookieinformation.com/uc.js" data-culture="@globalAreaLang" type="text/javascript"></script>@GetValue( "CopyRightNotice" )<meta charset="utf-8"><meta content="width=device-width, initial-scale=1, shrink-to-fit=no, minimal-ui" name="viewport"><meta content="ie=edge" http-equiv="x-ua-compatible">@Espresso.CriticalCSS@if ( webfontsSnippetHtml != "<!--@Snippet(webfonts)-->" ){@webfontsSnippetHtml}<link href="/Files/Templates/Designs/kabooki-shop/_assets/_dist/css/default.css?v=1.1.1" media="@Espresso.StylesheetAttributeMedia" rel="@Espresso.StylesheetAttributeRel" as="style">@Espresso.CriticalJS<link rel="shortcut icon" href="@Espresso.Area.Item.Favicon">@GetValue( "MetaTags" )@if ( Espresso.IsStagingUrl ){<meta content="noindex,nofollow" name="robots">}<meta property="og:url" content="@openGraphUrl">@if ( isProductPage ){<link rel="canonical" href="@eComCanonicalSnippetTag">}else{<title>@GetValue("Title")</title> 2 @GetValue("MetaTags") 3 @GetValue("CopyRightNotice") 4if ( string.IsNullOrEmpty( pageCanonical ) == true ){if ( GetString( "DwPageID" ) == GetString( "DwAreaFirstPageID" ) ){<link rel="canonical" href="/">}else{<link rel="canonical" href="@canonicalPageView">}}else{<link rel="canonical" href="@pageCanonical">}}@if ( isProductPage ){@RenderSnippet( "productSpecificData" )}else{if ( !string.IsNullOrEmpty( Espresso.OpenGraphTitle ) ){<meta property="og:title" content="@Espresso.OpenGraphTitle">}else{<meta property="og:title" content="@Espresso.DynamicwebPage.MetaTitle">}if ( !string.IsNullOrEmpty( Espresso.OpenGraphDescription ) ){<meta property="og:description" content="@Espresso.OpenGraphDescription">}else{<meta property="og:description" content="@Espresso.DynamicwebPage.Description">}<meta property="og:image" content="@openGraphImage"><meta property="og:type" content="website">}@*<meta property="og:title" content="@Espresso.OpenGraphTitle"><meta property="og:description" content="@Espresso.OpenGraphDescription"><meta property="og:image" content="@openGraphImage"><meta property="og:type" content="website">*@@if ( string.IsNullOrEmpty( Espresso.Area.Item.GoogleSiteVerification ) == false ){<meta name="google-site-verification" content="@Espresso.Area.Item.GoogleSiteVerification">}@{if ( 1 == 2 ){@GetValue( "Stylesheets" )}}@if ( GetString( "LongLang" ) == "da-DK" ){<script id="CookieConsent" src="https://policy.app.cookieinformation.com/uc.js" data-culture="DA" type="text/javascript"></script><meta name="facebook-domain-verification" content="yhbdpu04igi1dk6144r8nvmntugbwt">}@if ( GetString( "LongLang" ) == "en-GB" ){<script id="CookieConsent" src="https://policy.app.cookieinformation.com/uc.js" data-culture="EN" type="text/javascript"></script><meta name="facebook-domain-verification" content="mx87mtwxtnh2mha9slaj2vyds7r59s">}@if ( GetString( "LongLang" ) == "de-DE" ){<meta name="facebook-domain-verification" content="ydpqtm2ts226kri7jnqtbpvbpyzlq0">}@if ( string.IsNullOrEmpty( Espresso.Area.GoogleTagManagerID ) == false && Espresso.Area.GoogleTagManagerID != "GTM-XXXX" ){<!-- Google Tag Manager --><script>(function(w, d, s, l, i) {w[l] = w[l] || [];w[l].push({'gtm.start':new Date().getTime(),event: 'gtm.js'});var f = d.getElementsByTagName(s)[0],j = d.createElement(s),dl = l != 'dataLayer' ? '&l=' + l : '';j.async = true;j.src ='https://www.googletagmanager.com/gtm.js?id=' + i + dl;f.parentNode.insertBefore(j, f);})(window, document, 'script', 'dataLayer', '@Espresso.Area.GoogleTagManagerID');</script><!-- End Google Tag Manager -->}@GetValue("Stylesheets") 5 @GetValue("Javascripts") 6 </head><body class="@Espresso.Item.CustomClasses" data-userauthenticated="@isUserAuthenticated.ToString().ToLower()" data-imagebank-area="@isImageBankArea.ToString().ToLower()">@if ( string.IsNullOrEmpty( Espresso.Area.GoogleTagManagerID ) == false && Espresso.Area.GoogleTagManagerID != "GTM-XXXX" ){<!-- Google Tag Manager (noscript) --><noscript><iframe src="https://www.googletagmanager.com/ns.html?id=@Espresso.Area.GoogleTagManagerID" height="0" width="0" style="display: none; visibility: hidden"></iframe></noscript><!-- End Google Tag Manager (noscript) -->}@using Dynamicweb.Ecommerce.Common 7 @inherits Co3.Espresso.Website.TemplateBases.Pages.PageBase 8 @{ 9 Espresso.Canvas.ClassList.AddClasses( "js-e-canvas is-loading" ); 10 if ( Espresso.Item.CanvasFullscreen == "True" ) 11 { 12 Espresso.Canvas.ClassList.AddClasses( "is-fullscreen" ); 13 } 14 15 string daDomain = "//www.kabooki.dk/"; 16 string enDomain = "//www.kabooki.com/"; 17 string deDomain = "//www.kabooki.de/"; 18 19 string contextCountryCode = Context.Country.Code2; 20 21 contextCountryCode = contextCountryCode == "GB" ? "IE" : contextCountryCode; 22 23 if ( Context.Cart != null ) 24 { 25 if ( !string.IsNullOrEmpty( Context.Cart.DeliveryCountryCode ) ) 26 { 27 contextCountryCode = Context.Cart.DeliveryCountryCode; 28 } 29 } 30 31 Dictionary< string, dynamic > selectorCountries = new Dictionary< string, dynamic > 32 { 33 { 34 "DK", new 35 { 36 domain = daDomain, 37 title = "Denmark", 38 countrycode = "DK", 39 currencycode = "DKK" 40 } 41 }, 42 { 43 "SE", new 44 { 45 domain = daDomain, 46 title = "Sweden", 47 countrycode = "SE", 48 currencycode = "SEK" 49 } 50 }, 51 { 52 "IE", new 53 { 54 domain = enDomain, 55 title = "Ireland", 56 countrycode = "IE", 57 currencycode = "EUR" 58 } 59 }, 60 { 61 "FI", new 62 { 63 domain = enDomain, 64 title = "Finland", 65 countrycode = "FI", 66 currencycode = "EUR" 67 } 68 }, 69 { 70 "FR", new 71 { 72 domain = enDomain, 73 title = "France", 74 countrycode = "FR", 75 currencycode = "EUR" 76 } 77 }, 78 { 79 "PT", new 80 { 81 domain = enDomain, 82 title = "Portugal", 83 countrycode = "PT", 84 currencycode = "EUR" 85 } 86 }, 87 { 88 "IT", new 89 { 90 domain = enDomain, 91 title = "Italy", 92 countrycode = "IT", 93 currencycode = "EUR" 94 } 95 }, 96 { 97 "ES", new 98 { 99 domain = enDomain,100 title = "Spain",101 countrycode = "ES",102 currencycode = "EUR"103 }104 },105 {106 "NL", new107 {108 domain = enDomain,109 title = "Netherlands",110 countrycode = "NL",111 currencycode = "EUR"112 }113 },114 {115 "BE", new116 {117 domain = enDomain,118 title = "Belgium",119 countrycode = "BE",120 currencycode = "EUR"121 }122 },123 {124 "DE", new125 {126 domain = deDomain,127 title = "Germany",128 countrycode = "DE",129 currencycode = "EUR"130 }131 },132 {133 "AT", new134 {135 domain = deDomain,136 title = "Austria",137 countrycode = "AT",138 currencycode = "EUR"139 }140 }141 };142 dynamic JSONcountrySelector = new143 {144 contextCountryCode = contextCountryCode,145 selectorCountries = selectorCountries146 };147 }148149150151 @using System.Globalization152 @using System.Security.Cryptography.X509Certificates153 @using Co3.Espresso.Base.Extensions154 @using Co3.Espresso.Website.Models.FrontEnd155 @using Co3.Espresso.Website.Services156 @using Dynamicweb.Content157 @using Dynamicweb.Ecommerce.Stocks158 @using Dynamicweb.Frontend159 @using Dynamicweb.Rendering160 @using EcomContext = Dynamicweb.Ecommerce.Common.Context161 @using System.Web162 @using EspressoProductService = Co3.Espresso.Website.Services.ProductService163 @using Co3.Kabooki.Dw.Models164 @using Co3.Espresso.Website.Models.FrontEnd.Elements165 @using Dynamicweb.Rendering.Translation166167 @functions {168169 public string getCountryCodeFromArea( Area area )170 {171 RegionInfo regionInfo = new RegionInfo( area.CultureInfo.LCID );172 return regionInfo.TwoLetterISORegionName;173 }174175 public static string GetStandardCollapseToggleTextExpand()176 {177 return "Se mere";178 }179180 public static string GetStandardCollapseToggleTextCollapse()181 {182 return "Se mindre";183 }184185 public static string getProductlistItemImageColorDot( string variantColorImageName = "" )186 {187 string getImageSyntax = "/admin/public/getimage.ashx?Image={0}&Width=30&Height=140&Format=jpg&Quality=10&Crop=7&AlternativeImage={1}";188 string imagePath = string.Format( "/Files/Images/produkter/{0}_4.jpg", variantColorImageName );189 string altImagePath = string.Format( "/Files/Images/produkter/{0}_3.jpg", variantColorImageName );190 string image = string.Format( getImageSyntax, imagePath, altImagePath );191 return image;192 }193194 public static string getProductImageColorDot(string productNumber = "", string variantImageNumber = "" )195 {196 string getImageSyntax = "/admin/public/getimage.ashx?Image={0}&Width=80&Height=350&Format=jpg&Quality=10&Crop=7&AlternativeImage={1}";197 string imagePath = string.Format( "/Files/Images/produkter/{0}-{1}_4.jpg", productNumber, variantImageNumber );198 string altImagePath = string.Format( "/Files/Images/produkter/{0}-{1}_3.jpg", productNumber, variantImageNumber );199 string image = string.Format( getImageSyntax, imagePath, altImagePath );200 return image;201 }202203 public static string getKabookiProductImageColorDot(string productNumber = "", string variantImageNumber = "" )204 {205 string getImageSyntax = "/admin/public/getimage.ashx?Image={0}&Width=200&Height=200&Format=jpg&Quality=10&Crop=3&AlternativeImage={1}";206 string imagePath = string.Format( "/Files/Images/produkter/{0}-{1}_4.jpg", productNumber, variantImageNumber );207 string altImagePath = string.Format( "/Files/Images/produkter/{0}-{1}_5.jpg", productNumber, variantImageNumber );208 string image = string.Format( getImageSyntax, imagePath, altImagePath );209 return image;210 }211 }212213 @helper ProductDescription( string sectionClasses = "e-section", bool sectionCollapse = false, string contentClasses = null, string heading = null, string content = null, string collapseToggleTextExpand = null, string collapseToggleTextCollapse = null )214 {215 if ( string.IsNullOrEmpty( content ) == false )216 {217 ClassList headingClassList = new ClassList();218 headingClassList.AddClasses( "col-12" );219 ClassList contentClassList = new ClassList();220 contentClassList.AddClasses( "col-12" );221222 @sectionStart( sectionClasses: sectionClasses, sectionCollapse: sectionCollapse, contentClasses: contentClasses, collapseToggleTextCollapse: collapseToggleTextCollapse, collapseToggleTextExpand: collapseToggleTextExpand )223224 if ( string.IsNullOrEmpty( heading ) == false )225 {226 <div class="@headingClassList">227 <h2>@heading</h2>228 </div>229 }230 <div class="@contentClassList">231 @content232 </div>233234 @sectionEnd()235 }236 }237238239 @helper ProductVideo( string sectionClasses = "e-section", string contentClasses = null, string heading = null, string videoURL = null )240 {241 if ( string.IsNullOrEmpty( videoURL ) == false )242 {243 ClassList headingClassList = new ClassList();244 headingClassList.AddClasses( "col-12" );245 ClassList contentClassList = new ClassList();246 contentClassList.AddClasses( "col-12" );247248249 @sectionStart( sectionClasses: sectionClasses, contentClasses: contentClasses )250251 if ( string.IsNullOrEmpty( heading ) == false )252 {253 <div class="@headingClassList">254 <h2>@heading</h2>255 </div>256 }257258 <div class="@contentClassList">259 <div class="embed-responsive embed-responsive-16by9 mb-2">260 <iframe class="embed-responsive-item" src="@videoURL" width="1080" height="608" frameborder="0" webkitallowfullscreen="" mozallowfullscreen="" allowfullscreen=""></iframe>261 </div>262 </div>263 @sectionEnd()264 }265 }266267 @helper ProductRelatedProducts( string sectionClasses = "e-section", string contentClasses = null, string heading = null,268 IEnumerable< RazorTemplateBase< RazorTemplateModel< Template > >.LoopItem > productLoop = null )269 {270 if ( productLoop != null && productLoop.Any() == true )271 {272 ClassList headingClassList = new ClassList();273 headingClassList.AddClasses( "col-12" );274 ClassList contentClassList = new ClassList();275 contentClassList.AddClasses( "col-12" );276277 @sectionStart( sectionClasses: sectionClasses, contentClasses: contentClasses )278279 if ( string.IsNullOrEmpty( heading ) == false )280 {281 <div class="@headingClassList">282 <h2 class="text-center">@heading</h2>283 </div>284 }285 <div class="@contentClassList">286 <div class="e-products mb-2">287 <div class="row">288 @{289 string productlistItemClassList = ProductlistService.Instance.GetGridItemWidth( null ).ToResponsiveClasses();290 }291 @foreach ( RazorTemplateBase< RazorTemplateModel< Template > >.LoopItem product in productLoop )292 {293 @ProductlistItem( product, productlistItemClassList )294 }295 </div>296 </div>297 </div>298299 @sectionEnd()300 }301 }302303 @helper ProductlistItem( RazorTemplateBase< RazorTemplateModel< Template > >.LoopItem product, string productlistItemClassList = null )304 {305 if ( product != null )306 {307 Dynamicweb.Ecommerce.Products.Product dwProduct = Dynamicweb.Ecommerce.Services.Products.GetProductById( product.GetString( "Ecom:Product.ID" ), product.GetString( "Ecom:Product.VariantID" ), EcomContext.LanguageID, false );308309 ProductPriceInfo variantPriceInfo = Co3.Kabooki.Dw.Services.ProductService.Instance.GetProductPriceInfo( dwProduct );310 EspressoPrice espressoPrice = new EspressoPrice(variantPriceInfo.Price.PriceWithVAT);311 EspressoPrice espressoListPrice = new EspressoPrice(variantPriceInfo.ListPrice.PriceWithVAT);312 bool hasDiscount = variantPriceInfo.Price.PriceWithVAT < variantPriceInfo.ListPrice.PriceWithVAT;313314 dynamic colorVariantImages = new List< dynamic >();315 int colorVariantImagesCount = 0;316 foreach ( RazorTemplateBase< RazorTemplateModel< Template > >.LoopItem variantCombination in product.GetLoop( "VariantCombinations" ) )317 {318 string variantColorImageName = variantCombination.GetString( "Ecom:Product:Field.VariantImage.Value.Clean" );319 //string imagePath = ImageService.Instance.GetImageURL( string.Format( "/Files/Images/produkter/{0}_3.jpg", variantColorImageName ), 80, 80, 5, 10, "png" );320 string imagePath = getProductlistItemImageColorDot( variantColorImageName );321 if ( JsonService.Instance.ToJson( colorVariantImages ).ToString().Contains( imagePath ) == false )322 {323 colorVariantImages.Add( new324 {325 path = imagePath326 } );327 ++colorVariantImagesCount;328 }329 }330331 dynamic productData = new332 {333 id = product.GetString( "Ecom:Product.ID" ),334 variantId = product.GetString( "Ecom:Product.VariantID" ),335 url = ProductService.Instance.GetProductLink( product.GetString( "Ecom:Product.PrimaryOrFirstGroupID" ), product.GetString( "Ecom:Product.ID" ) ),336 number = product.GetString( "Ecom:Product.Number" ),337 name = ProductService.Instance.GetName( product.GetString( "Ecom:Product.ID" ), product.GetString( "Ecom:Product.VariantID" ) ),338 imageLarge = ImageService.Instance.GetImageURL( product.GetString("Ecom:Product.ImageDefault.Default.Clean"), 400, 400, 5, 10, "png" ),339 price = espressoPrice,340 beforePrice = espressoListPrice,341 descriptionShortExtra01 = product.GetString( "Ecom:Product:Field.DescriptionShortExtra01" ),342 hasDiscount = hasDiscount,343 stock = dwProduct.Stock,344 stockStatus = dwProduct.get_StockStatus(EcomContext.LanguageID),345 colorVariantImagesCount = colorVariantImagesCount,346 colorVariantImages = colorVariantImages347 };348349 string labelColor = Translation.GetTranslation( "eCom Product - Color - Text" );350 if ( productData.colorVariantImagesCount > 1 )351 {352 labelColor = Translation.GetTranslation( "eCom Product - Colors - Text" );353 }354355 if (PageView.Current().Layout.Design.Name == "kabooki-shop")356 {357358 <div class="@productlistItemClassList">359 <div class="e-products-item js-e-products-item js-e-products-item-@productData.id js-e-block-link e-block-link" data-variant-id="@productData.variantId" style="background-image:url('@productData.imageLarge'); background-position:center; background-size: cover;">360 <div class="e-products-item-container">361 <div class="e-products-item-image-container">362 <a class="e-products-item-image-wrapper" href="@productData.url">363 @*<img src="@productData.imageLarge" alt="" class="e-products-item-image">*@364 @if (productData.hasDiscount)365 {366 <img src="/Files/Images/kabooki/system/lego_wear_badge_percentage.svg" alt="" class="custom-products-item-badge">367 }368 </a>369 </div>370371 </div>372 </div>373 <div class="e-products-item-text-container text-left small">374 <h3 class="e-products-item-name mb-0 mt-0">375 <a href="@productData.url">@productData.name</a>376 </h3>377 <p class="e-products-item-text mb-4">378 <span class="e-products-item-price">379 <a href="@productData.url">380 @productData.price381 @if (productData.hasDiscount)382 {383 <span class="custom-products-item-beforeprice">@productData.beforePrice</span>384 }385 </a>386 </span>387 </p>388 </div>389 </div>390 }391 else392 {393 <div class="@productlistItemClassList">394 <div class="e-products-item js-e-products-item js-e-products-item-@productData.id js-e-block-link e-block-link" data-variant-id="@productData.variantId">395 <div class="e-products-item-container">396 <div class="e-products-item-image-container">397 <a class="e-products-item-image-wrapper" href="@productData.url">398 <img src="@productData.imageLarge" alt="" class="e-products-item-image">399 @if (productData.hasDiscount)400 {401 <img src="/Files/Images/kabooki/system/lego_wear_badge_percentage.svg" alt="" class="custom-products-item-badge">402 }403 </a>404 </div>405406 <div class="e-products-item-text-container text-left small">407 <div class="custom-color-options-wrapper">408 <div class="custom-color-options-text">409 <p class="m-0 p-0">@productData.colorVariantImagesCount @labelColor</p>410 </div>411 <div class="custom-color-options-colors">412 @foreach (dynamic colorVariantImage in colorVariantImages)413 {414 <span class="custom-color-dot" style="background-image: url('@colorVariantImage.path');"></span>415 }416417 </div>418 </div>419420 <h3 class="e-products-item-name mb-0 mt-0">421 <a href="@productData.url">@productData.name</a>422 </h3>423 <p class="e-products-item-text mb-0">424 <span class="e-products-item-price">425 <a href="@productData.url">426 @productData.price427 @if (productData.hasDiscount)428 {429 <span class="custom-products-item-beforeprice">@productData.beforePrice</span>430 }431 </a>432 </span>433 </p>434 </div>435 </div>436 </div>437 </div>438 }439 }440 }441442443 @helper sectionStart( string sectionClasses = "e-section", string contentClasses = null, bool sectionCollapse = false, string sectionId = null, string collapseToggleTextExpand = null, string collapseToggleTextCollapse = null )444 {445 sectionId = string.IsNullOrEmpty( sectionId ) ? Guid.NewGuid().ToString( "N" ) : sectionId;446 ClassList sectionClassList = new ClassList();447 sectionClassList.AddClasses( sectionClasses );448 ClassList contentClassList;449450 if ( contentClasses == null )451 {452 contentClassList = Co3.Espresso.Website.Services.PageService.Instance.GetResponsiveClassesFromPageItem( PageView.Current().Page.Item );453 }454 else455 {456 contentClassList = new ClassList();457 contentClassList.AddClasses( contentClasses );458 }459460 // TODO: Split collapse logic into separate helper function.461 string collapseId = Guid.NewGuid().ToString( "N" );462 ClassList collapseToggleClassList = new ClassList();463 if ( sectionCollapse )464 {465 sectionClassList.AddClasses( "p-section-collapse js-p-section-collapse" );466 collapseToggleClassList.AddClasses( contentClasses );467 collapseToggleClassList.AddClasses( "p-section-collapse-toggle collapsed order-last text-center" );468 contentClassList.AddClasses( "p-section-collapse-content collapse is-md" );469 }470471 @:<section class="@sectionClassList" id="@sectionId">472 @:<div class="container-fluid">473 @:<div class="row">474475 // TODO: Split collapse logic into separate helper function.476 if ( sectionCollapse )477 {478 <div class="@collapseToggleClassList" data-toggle="collapse" data-target="#@collapseId">479 <button class="btn btn-primary p-section-collapse-toggle-btn" type="button">480 <i class="material-icons p-section-collapse-toggle-icon">keyboard_arrow_down</i>481 </button>482 <small class="h4 p-section-collapse-toggle-text" data-expand-text="@( string.IsNullOrEmpty( collapseToggleTextExpand ) ? GetStandardCollapseToggleTextExpand() : collapseToggleTextExpand )" data-collapse-text="@( string.IsNullOrEmpty( collapseToggleTextCollapse ) ? GetStandardCollapseToggleTextCollapse() : collapseToggleTextCollapse )"></small>483 </div>484 }485486 @:<div class="@contentClassList" id="@collapseId">487 @:<div class="row">488 }489490 @helper sectionEnd()491 {492 @:</div>493 @:</div>494 @:</div>495 @:</div>496 @:</section>497 }498499500501502 <div class="e-loading-overlay e-page-loading-overlay is-loading js-e-page-loading-overlay">503 <div class="e-loading-spinner"></div>504 </div>505506507 @* https://medium.com/clio-calliope/making-google-fonts-faster-aadf3c02a36d *@508 @SnippetStart("webfonts")509 <link crossorigin="" href="https://fonts.gstatic.com/" rel="preconnect">510 <link href="https://fonts.googleapis.com/css?family=IBM+Plex+Sans:400,700|Material+Icons" media="@Espresso.StylesheetAttributeMedia" rel="@Espresso.StylesheetAttributeRel" as="style">511 @SnippetEnd("webfonts")512513514515 <div class="@Espresso.Canvas.ClassList">516 @using System.Drawing517 @using Co3.Espresso.Website.Services518 @using Dynamicweb.Core519 @using Dynamicweb.Frontend;520 @using Dynamicweb.Ecommerce.Common521 @using Dynamicweb.Ecommerce.Orders522 @{523524 bool isExtranet = GetGlobalValue( "Global:Extranet.UserID" ) == "0" ? false : true;525 string imageBankLoginPage = Espresso.Area.Item.ImageBankLoginPage;526527 ClassList headerClassList = new ClassList();528 headerClassList.AddClasses( "e-header js-e-header is-sticky" );529 if ( Espresso.Item.HeaderTransparent == "True" )530 {531 headerClassList.AddClasses( "is-transparent" );532 }533534 ClassList logoClassList = new ClassList();535 logoClassList.AddClasses( "e-logo" );536537 string backButtonLink = Espresso.Item.BackButtonLink;538 ClassList backButtonClassList = new ClassList();539 ClassList backButtonIconClassList = new ClassList();540 if ( Espresso.Item.BackButton == "True" )541 {542 backButtonClassList.AddClasses( "btn btn-sm btn-secondary my-1 align-self-center" );543 if ( backButtonLink == "" || backButtonLink == "/" )544 {545 backButtonLink = "/";546 backButtonClassList.AddClasses( "js-e-back-link" );547 }548 backButtonIconClassList.AddClasses( "material-icons material-icons-large" );549 if ( Espresso.Item.BackButtonPosition == "right" )550 {551 backButtonClassList.AddClasses( "mr-0 ml-auto order-last" );552 logoClassList.AddClasses( "order-first" );553 }554 else555 {556 backButtonClassList.AddClasses( "order-first" );557 logoClassList.AddClasses( "mr-0 ml-auto order-last" );558 }559 if ( Espresso.Item.BackButtonIcon == "arrow_back" )560 {561 backButtonClassList.AddClasses( "arrow-left" );562 backButtonIconClassList.AddClasses( "d-none" );563 }564 else if ( Espresso.Item.BackButtonIcon == "arrow_forward" )565 {566 backButtonClassList.AddClasses( "arrow-right" );567 backButtonIconClassList.AddClasses( "d-none" );568 }569 }570571 string logoPrimary = Espresso.Area.Item.LogoPrimary;572 string logoSecondary = Espresso.Area.Item.LogoSecondary;573 if ( string.IsNullOrEmpty( logoSecondary ) == true )574 {575 logoSecondary = logoPrimary;576 }577 string tagline = Espresso.Area.Item.Tagline;578579 string checkoutPage = string.Empty;580 if ( !string.IsNullOrEmpty( Espresso.Area.Item.CheckoutPage ) )581 {582 checkoutPage = string.Format("Default.aspx?ID={0}", Espresso.Area.Item.CheckoutPage);583 checkoutPage = SearchEngineFriendlyURLs.GetFriendlyUrl( checkoutPage );584 }585586 string cartPage = string.Empty;587 if ( !string.IsNullOrEmpty( Espresso.Area.Item.CartPage ) )588 {589 cartPage = string.Format("Default.aspx?ID={0}", Espresso.Area.Item.CartPage);590 cartPage = SearchEngineFriendlyURLs.GetFriendlyUrl( cartPage );591 }592593 string customerServicePage = string.Empty;594 if ( !string.IsNullOrEmpty( Espresso.Area.Item.CustomerServicePage ) )595 {596 customerServicePage = string.Format("Default.aspx?ID={0}", Espresso.Area.Item.CustomerServicePage);597 customerServicePage = SearchEngineFriendlyURLs.GetFriendlyUrl( customerServicePage );598 }599600 Dictionary< string, string > navigationHtml = new Dictionary< string, string >601 {602 {603 "global", RenderNavigation( new604 {605 id = "dwnav-global",606 template = "global.xslt",607 startlevel = 1,608 endlevel = 8,609 expandmode = "all"610 } )611 },612 {613 "utilities-primary", RenderNavigation( new614 {615 id = "dwnav-utilities-primary",616 template = "utilities.xslt",617 startlevel = 4,618 endlevel = 5,619 expandmode = "all",620 parenttag = "utilities-primary"621 } )622 },623 {624 "utilities-secondary", RenderNavigation( new625 {626 id = "dwnav-utilities-secondary",627 template = "utilities.xslt",628 startlevel = 4,629 endlevel = 4,630 expandmode = "all",631 parenttag = "utilities-secondary"632 } )633 },634 {635 "hamburger-header", RenderNavigation( new636 {637 id = "dwnav-hamburger-header",638 template = "utilities.xslt",639 startlevel = 4,640 endlevel = 4,641 expandmode = "all",642 parenttag = "hamburger-header"643 } )644 },645 {646 "hamburger-aside", RenderNavigation( new647 {648 id = "dwnav-hamburger-aside",649 template = "utilities.xslt",650 startlevel = 4,651 endlevel = 4,652 expandmode = "all",653 parenttag = "hamburger-aside"654 } )655 }656 };657658 string logoLink = "/";659 if ( isExtranet )660 {661 logoLink = "/Default.asp?ID=6532";662 }663664665 // STREAMER666667 int pageId = PageView.Current().ID;668 string streamerActive = Espresso.Area.Item.StreamerActive;669 string streamerMarquee = Espresso.Area.Item.StreamerAsMarquee;670 string streamerMessage = Espresso.Area.Item.StreamerMessage;671 string streamerTextColor = Espresso.Area.Item.StreamerTextColor;672 string streamerBackgroundColor = Espresso.Area.Item.StreamerBackgroundColor;673 string streamerLink = Espresso.Area.Item.StreamerLink;674 }675676 @if ( Espresso.Item.HeaderHide != "True" )677 {678 <header class="@headerClassList" data-autohide="true" data-imagebank-area="@isImageBankArea">679680 <div class="e-header-hamburger">681 @sectionStart( "e-header-section e-section", "col-12" )682 <div class="col-12 e-header-section-content">683 <div class="@logoClassList">684 @if ( isImageBankArea == false )685 {686 <a class="e-logo-link" href="/">687 <img src="@logoPrimary" class="e-logo-img e-logo-img-primary" alt="@Espresso.Area.Item.CompanyName">688 <img src="@logoSecondary" class="e-logo-img e-logo-img-secondary" alt="@Espresso.Area.Item.CompanyName">689 @if ( string.IsNullOrEmpty( tagline ) == false )690 {691 <p class="e-logo-tagline">@tagline</p>692 }693 </a>694 }695 else696 {697 <a class="e-logo-link" href="@logoLink">698 <img src="@logoPrimary" class="e-logo-img e-logo-img-primary" alt="@Espresso.Area.Item.CompanyName">699 <img src="@logoSecondary" class="e-logo-img e-logo-img-secondary" alt="@Espresso.Area.Item.CompanyName">700 @if ( string.IsNullOrEmpty( tagline ) == false )701 {702 <p class="e-logo-tagline">@tagline</p>703 }704 </a>705 }706707 </div>708 @if ( Espresso.Item.NavigationHide != "True" )709 {710 <section class="e-nav-hamburger-header">711 <ul class="nav">712 @navigationHtml[ "hamburger-header" ]713 @* TODO: Move to xslt *@714 <li class="e-nav-item-hamburger-open nav-item">715 <a class="nav-link" data-target=".modal.e-nav" data-toggle="modal" href="#">716 <i class="e-nav-pageicon material-icons">menu</i>717 @*<span class="e-nav-pagename">@Translate( "Header - Hamburger menu open - Button", "Menu" )</span>*@718 </a>719 </li>720 </ul>721 </section>722723724725726727 }728 @if ( Espresso.Item.BackButton == "True" )729 {730 <a class="@backButtonClassList" href="@backButtonLink">731 @if ( Espresso.Item.BackButtonIcon != "" )732 {733 <i class="@backButtonIconClassList">@Espresso.Item.BackButtonIcon</i>734 }735 @Espresso.Item.BackButtonText736 </a>737 }738 </div>739 @sectionEnd()740741742 @if ( streamerActive != "False" )743 {744 <section class="e-header-section e-section kabooki-seasonal-streamer" style="background-color: @streamerBackgroundColor;">745746 @if ( streamerLink == "" )747 {748 <div class="container-fluid">749 <div class="row">750 <div class="col-12">751 <div class="row">752 <div class="col-12 d-flex pt-1 pb-1 small @streamerTextColor" style="min-height: 2em;">753 @if ( streamerMarquee == "True" )754 {755 <marquee>@streamerMessage</marquee>756 }757 else758 {759 @streamerMessage760 }761 </div>762 </div>763 </div>764 </div>765 </div>766 }767 else768 {769 <a href="@streamerLink">770 <div class="container-fluid">771 <div class="row">772 <div class="col-12">773 <div class="row">774 <div class="col-12 d-flex pt-1 pb-1 small @streamerTextColor" style="min-height: 2em;">775 @if ( streamerMarquee == "True" )776 {777 <marquee>@streamerMessage</marquee>778 }779 else780 {781 @streamerMessage782 }783 </div>784 </div>785 </div>786 </div>787 </div>788 </a>789 }790 </section>791 }792793 </div>794 <div class="e-nav js-e-nav modal p-0" data-backdrop="false">795 <div class="e-nav-container navbar">796797 @if ( !string.IsNullOrEmpty( Espresso.Area.Item.HeaderPageID ) && isImageBankArea == false )798 {799 @sectionStart( "e-header-section p-section e-section custom-USP-bar bg-light order-4", "col-12" )800801 @RenderPageContent( int.Parse( Espresso.Area.Item.HeaderPageID ) )802803 @sectionEnd()804 }805806 @if ( string.IsNullOrEmpty( navigationHtml[ "utilities-primary" ] ) == false && isImageBankArea == false )807 {808 @sectionStart( "e-header-section e-section order-3 order-lg-1", "col-12" )809 @:<div class="col-12 e-header-section-content">810 <nav class="e-nav-utilities-primary js-e-nav-utilities-primary">811 <ul class="nav">812 <li class="dropdown nav-item mr-auto">813 <a href="@selectorCountries[ contextCountryCode ].domain?countrycode=@selectorCountries[ contextCountryCode ].countrycode.ToLower()&currencycode=@selectorCountries[ contextCountryCode ].currencycode.ToLower()" class="dropdown-toggle nav-link icon-flag-@selectorCountries[ contextCountryCode ].countrycode.ToLower() nav-utility-bg-light-gray " data-toggle="dropdown" data-collapse-toggle="true" data-collapse-target="#countries">814 <i class="e-nav-pageicon e-nav-pageicon-language js-e-nav-pageicon-language"></i><span class="e-nav-pagename ">@selectorCountries[ contextCountryCode ].title</span><i class="material-icons e-nav-pageicon-dropdown ">keyboard_arrow_down</i>815 </a>816 <div class="dropdown-menu collapse" id="countries">817 <ul class="nav">818 @foreach ( KeyValuePair< string, dynamic > selectorCountry in selectorCountries )819 {820 if ( selectorCountry.Value.countrycode.ToLower() != contextCountryCode.ToLower() )821 {822 <li class="dropdown-item nav-item ">823 <form action="@selectorCountry.Value.domain.ToLower()" method="post">824 <input type="hidden" name="countrycode" value="@selectorCountry.Value.countrycode">825 <input type="hidden" name="currencycode" value="@selectorCountry.Value.currencycode">826 <input type="hidden" name="EcomOrderDeliveryCountry" value="@selectorCountry.Value.countrycode">827 <input type="hidden" name="EcomOrderDeliveryCountryCode" value="@selectorCountry.Value.countrycode">828 <input type="hidden" name="EcomOrderCustomerCountry" value="@selectorCountry.Value.countrycode">829 <input type="hidden" name="EcomOrderCustomerCountryCode" value="@selectorCountry.Value.countrycode">830 <button class="nav-link border-0 bg-transparent icon-flag-@selectorCountry.Value.countrycode.ToLower()" type="submit"><i class="e-nav-pageicon e-nav-pageicon-language js-e-nav-pageicon-language"></i><span class="e-nav-pagename">@selectorCountry.Value.title</span></button>831 </form>832 </li>833 }834 }835 </ul>836 </div>837 </li>838 @navigationHtml[ "utilities-primary" ]839 </ul>840 </nav>841 @:</div>842 @sectionEnd()843 }844845 @sectionStart( "e-header-section e-header-section-primary e-section order-2 order-lg-1", "col-12" )846 <div class="col-12 e-header-section-content">847848 @if ( isImageBankArea == false )849 {850 <div class="@logoClassList">851 <a class="e-logo-link" href="/">852 <img src="@logoPrimary" class="e-logo-img e-logo-img-primary" alt="@Espresso.Area.Item.CompanyName">853 <img src="@logoSecondary" class="e-logo-img e-logo-img-secondary" alt="@Espresso.Area.Item.CompanyName">854 @if ( string.IsNullOrEmpty( tagline ) == false )855 {856 <p class="e-logo-tagline">@tagline</p>857 }858 </a>859 </div>860 }861 else862 {863 <div class="@logoClassList">864 <a class="e-logo-link my-2 p-0" href="@logoLink">865 <img src="@logoPrimary" class="e-logo-img e-logo-img-primary" alt="@Espresso.Area.Item.CompanyName">866 <img src="@logoSecondary" class="e-logo-img e-logo-img-secondary" alt="@Espresso.Area.Item.CompanyName">867 @if ( string.IsNullOrEmpty( tagline ) == false )868 {869 <p class="e-logo-tagline">@tagline</p>870 }871 </a>872 </div>873 }874875876 @if ( Espresso.Item.NavigationHide != "True" )877 {878 <nav class="e-nav-global mx-auto js-e-nav-global">879 <ul class="nav">880 @navigationHtml[ "global" ]881 </ul>882 </nav>883884 <div class="e-nav-item-hamburger-close">885 <a class="nav-link" data-target=".modal.e-nav" data-toggle="modal" href="#">886 <i class="e-nav-pageicon material-icons">close</i>887 <span class="e-nav-pagename">@Translate( "Header - Hamburger menu close - Button", "Close" )</span>888 </a>889 </div>890891892 if ( isImageBankArea == false )893 {894895 }896897 if ( string.IsNullOrEmpty( navigationHtml[ "hamburger-aside" ] ) == false )898 {899 <nav class="e-nav-hamburger-aside">900 <ul class="nav">901 @navigationHtml[ "hamburger-aside" ]902 </ul>903 </nav>904 }905 }906 @if ( Espresso.Item.BackButton == "True" )907 {908 <a class="@backButtonClassList" href="@backButtonLink">909 @if ( Espresso.Item.BackButtonIcon != "" )910 {911 <i class="@backButtonIconClassList">@Espresso.Item.BackButtonIcon</i>912 }913 @Espresso.Item.BackButtonText914 </a>915 }916 </div>917 @sectionEnd()918919920921 @if ( isExtranet )922 {923 @sectionStart( "e-header-section e-section bg-light", "col-12" )924 @:<div class="col-12 e-header-section-content kabooki-imagebank-bar">925926 <p>927 <i class="material-icons">lock_open</i> @Translate( "Header - Imagebank login - Intro", "Du er logget ind i vores" ) <a href="@imageBankLoginPage">@Translate( "Header - Imagebank login - Imagebank", "image bank" )</a>928 </p>929 <p>930 <a class="btn" href="/Admin/Public/extranetlogoff.aspx">@Translate( "Header - Imagebank login - button", "Log ud" )</a>931 </p>932 @:</div>933 @sectionEnd()934 }935936937 @if ( streamerActive != "False" )938 {939 <section class="e-header-section e-section kabooki-seasonal-streamer" style="background-color: @streamerBackgroundColor;">940941 @if ( streamerLink == "" )942 {943 <div class="container-fluid">944 <div class="row">945 <div class="col-12">946 <div class="row">947 <div class="col-12 d-flex pt-1 pb-1 @streamerTextColor" style="min-height: 2em;">948 @if ( streamerMarquee == "True" )949 {950 <marquee>@streamerMessage</marquee>951 }952 else953 {954 @streamerMessage955 }956 </div>957 </div>958 </div>959 </div>960 </div>961 }962 else963 {964 <a href="@streamerLink">965 <div class="container-fluid">966 <div class="row">967 <div class="col-12">968 <div class="row">969 <div class="col-12 d-flex pt-1 pb-1 @streamerTextColor" style="min-height: 2em;">970 @if ( streamerMarquee == "True" )971 {972 <marquee>@streamerMessage</marquee>973 }974 else975 {976 @streamerMessage977 }978 </div>979 </div>980 </div>981 </div>982 </div>983 </a>984 }985 </section>986 }987988989990991 </div>992 </div>993994 </header>995 }996997 @using Dynamicweb.Frontend998 @using Dynamicweb.Security.UserManagement999 @{1000 User currentUser = PageView.Current().User;1001 if ( currentUser != null )1002 {1003 User currentSecondaryUser = currentUser.CurrentSecondaryUser;1004 if ( currentSecondaryUser != null )1005 {1006 @sectionStart( "e-section bg-warning e-text-dark js-e-section is-sticky zi-fixed py-1", "col-12 small" )1007 <div class="align-self-center col-12 col-lg-9 col-md-8">1008 <p class="line-height-sm mb-1 mb-md-0 text-center text-md-left">1009 <i class="material-icons material-icons-2x">supervisor_account</i>&nbsp;@Translate( "Extranet Impersonation - Active impersonation message - Text", "You are currently impersonating this user:" ) <strong>@currentUser.Name &mdash; @currentUser.Company </strong>1010 </p>1011 </div>1012 <div class="align-self-center col-12 col-lg-3 col-md-4">1013 <form class="mb-0 small text-center text-md-right" method="post" action="@Espresso.Area.Item.ExtranetImpersonationPage">1014 <button class="btn btn-primary" name="DwExtranetRemoveSecondaryUser" type="submit">@Translate( "Extranet Impersonation - Stop impersonation - Button", "Stop impersonation" )</button>1015 </form>1016 </div>1017 @sectionEnd()1018 }1019 }1020 }102110221023 <main id="dwcontentmain" class="e-content js-e-content @Espresso.ContentArea.ClassList">1024 @using Dynamicweb.Content;1025 @using Dynamicweb.Extensibility;1026 @{1027 string eBreadcrumbClasslist = "e-breadcrumb js-e-breadcrumb d-none d-lg-block";1028 if ( Espresso.Item.Breadcrumb != "auto" && Espresso.Item.Breadcrumb != "none" && String.IsNullOrEmpty( Espresso.Item.Breadcrumb ) == false )1029 {1030 eBreadcrumbClasslist += string.Format( " e-breadcrumb-{0}", Espresso.Item.Breadcrumb );1031 }1032 string navigationHtmlBreadcrumb = RenderNavigation( new1033 {1034 id = "dwnav-breadcrumb",1035 template = "breadcrumb.xslt",1036 startlevel = 1,1037 endlevel = 10,1038 expandmode = "pathonly",1039 sitemapmode = true1040 } );1041 }10421043 @if ( string.IsNullOrEmpty( navigationHtmlBreadcrumb ) == false && Espresso.Item.Breadcrumb != "none" && string.IsNullOrEmpty( Espresso.Item.Breadcrumb ) == false )1044 {1045 <section class="e-section @eBreadcrumbClasslist">1046 <div class="container-fluid">1047 <div class="row">1048 <div class="col-12">1049 <div class="row">10501051 <div class="col-12">1052 <nav class="e-breadcrumb-container">1053 <ol class="breadcrumb nav">1054 <li class="breadcrumb-item m-0 p-0">1055 <a class="arrow-left breadcrumb-back-link js-e-back-link px-0" href="/">@Translate( "Breadcrumb - Back link", "Back" )</a>1056 <span class="breadcrumb-prefix-text">1057 @Translate( "Breadcrumb - Prefix - Text", "You are here:" )1058 </span>1059 <a href="/">1060 @ServiceLocator.Current.GetPageService().GetFirstPageForArea( GetInteger( "DwAreaID" ) ).MenuText1061 </a>1062 </li>1063 @navigationHtmlBreadcrumb1064 </ol>1065 </nav>1066 </div>10671068 </div>1069 </div>1070 </div>1071 </div>1072 </section>1073 }10741075 <article class="e-content-article">1076 @{1077 int NavigationLocalHorizontalParentPageId = 0;1078 if ( !string.IsNullOrEmpty( Espresso.Item.NavigationLocalParentPage ) )1079 {1080 int.TryParse( Espresso.Item.NavigationLocalParentPage, out NavigationLocalHorizontalParentPageId );1081 }1082 if ( NavigationLocalHorizontalParentPageId == 0 )1083 {1084 NavigationLocalHorizontalParentPageId = PageView.Current().Page.ID;1085 if ( !Dynamicweb.Services.Pages.GetPagesByParentID( NavigationLocalHorizontalParentPageId ).Any() )1086 {1087 NavigationLocalHorizontalParentPageId = PageView.Current().Page.ParentPageId;1088 }1089 }1090 string NavigationLocalHorizontalClassList = "e-nav-local e-nav-local-horizontal js-e-nav-local-horizontal";1091 string NavigationLocalHorizontalContainerClassList = "e-nav-local-container";1092 string NavigationLocalHorizontalTemplate = "local-" + Espresso.Item.NavigationLocalLayout + ".xslt";1093 if ( string.IsNullOrEmpty( Espresso.Item.NavigationLocalTemplate ) == false && Path.GetExtension( Espresso.Item.NavigationLocalTemplate ) == ".xslt" )1094 {1095 NavigationLocalHorizontalTemplate = Path.GetFileName( Espresso.Item.NavigationLocalTemplate );1096 }10971098 if ( Espresso.Item.NavigationLocalShow == "True" && Espresso.Item.NavigationLocalLayout == "horizontal" )1099 {1100 NavigationLocalHorizontalClassList += " " + Espresso.Item.NavigationLocalCustomClasses;1101 if ( Espresso.Item.NavigationLocalSticky == "True" )1102 {1103 NavigationLocalHorizontalClassList += " is-sticky";1104 }1105 if ( Espresso.Item.NavigationLocalAbsolute == "True" )1106 {1107 NavigationLocalHorizontalClassList += " is-absolute";1108 }1109 else1110 {1111 if ( Espresso.Item.NavigationLocalMarginTop != "0" && Espresso.Item.NavigationLocalMarginTop != "" )1112 {1113 NavigationLocalHorizontalClassList += " mt-" + Espresso.Item.NavigationLocalMarginTop;1114 }1115 if ( Espresso.Item.NavigationLocalMarginBottom != "0" && Espresso.Item.NavigationLocalMarginBottom != "" )1116 {1117 NavigationLocalHorizontalClassList += " mb-" + Espresso.Item.NavigationLocalMarginBottom;1118 }1119 }1120 }1121 }1122 @if ( Espresso.Item.NavigationLocalShow == "True" && Espresso.Item.NavigationLocalLayout == "horizontal" )1123 {1124 <section class="e-section @NavigationLocalHorizontalClassList">1125 <div class="container-fluid">1126 <div class="row">1127 <div class="col-12">1128 <div class="row">11291130 <div class="col-12">1131 <nav id="dwnav-local-horizontal-@NavigationLocalHorizontalParentPageId" class="@NavigationLocalHorizontalContainerClassList">1132 <ul class="justify-content-start nav">1133 @if ( Espresso.Item.NavigationLocalHeading != "" )1134 {1135 <li class="e-nav-local-heading">1136 <h2>@Espresso.Item.NavigationLocalHeading</h2>1137 </li>1138 }1139 @RenderNavigation( new1140 {1141 id = "dwnav-local-horizontal-" + NavigationLocalHorizontalParentPageId,1142 parentid = NavigationLocalHorizontalParentPageId,1143 template = NavigationLocalHorizontalTemplate,1144 startlevel = Espresso.Item.NavigationLocalLevelStart,1145 endlevel = Espresso.Item.NavigationLocalLevelEnd,1146 expandmode = Espresso.Item.NavigationLocalPageTreeExpand == "True" ? "all" : "path"1147 } )1148 </ul>1149 </nav>1150 </div>11511152 </div>1153 </div>1154 </div>1155 </div>1156 </section>1157 }115811591160 @{1161 int NavigationLocalVerticalParentPageId = 0;1162 if ( !string.IsNullOrEmpty( Espresso.Item.NavigationLocalParentPage ) )1163 {1164 int.TryParse( Espresso.Item.NavigationLocalParentPage, out NavigationLocalVerticalParentPageId );1165 }1166 if ( NavigationLocalVerticalParentPageId == 0 )1167 {1168 NavigationLocalVerticalParentPageId = PageView.Current().Page.ID;1169 if ( !Dynamicweb.Services.Pages.GetPagesByParentID( NavigationLocalVerticalParentPageId ).Any() )1170 {1171 NavigationLocalVerticalParentPageId = PageView.Current().Page.ParentPageId;1172 }1173 }11741175 string NavigationLocalVerticalClassList = "e-nav-local e-nav-local-vertical js-e-nav-local-vertical";1176 string NavigationLocalVerticalContainerClassList = "e-nav-local-container";1177 string NavigationLocalVerticalTemplate = "local-" + Espresso.Item.NavigationLocalLayout + ".xslt";1178 if ( string.IsNullOrEmpty( Espresso.Item.NavigationLocalTemplate ) == false && Path.GetExtension( Espresso.Item.NavigationLocalTemplate ) == ".xslt" )1179 {1180 NavigationLocalVerticalTemplate = Path.GetFileName( Espresso.Item.NavigationLocalTemplate );1181 }11821183 if ( Espresso.Item.NavigationLocalShow == "True" && Espresso.Item.NavigationLocalLayout == "vertical" )1184 {1185 NavigationLocalVerticalClassList += " " + Espresso.Item.NavigationLocalCustomClasses;11861187 if ( Espresso.Item.NavigationLocalMarginTop != "0" && Espresso.Item.NavigationLocalMarginTop != "" )1188 {1189 NavigationLocalVerticalClassList += " mt-" + Espresso.Item.NavigationLocalMarginTop;1190 }1191 if ( Espresso.Item.NavigationLocalMarginBottom != "0" && Espresso.Item.NavigationLocalMarginBottom != "" )1192 {1193 NavigationLocalVerticalClassList += " mb-" + Espresso.Item.NavigationLocalMarginBottom;1194 }11951196 if ( Espresso.Item.NavigationLocalSticky == "True" )1197 {1198 NavigationLocalVerticalClassList += " is-sticky";1199 }12001201 if ( Espresso.Item.NavigationLocalAbsolute == "True" )1202 {1203 NavigationLocalVerticalClassList += " is-absolute";1204 }1205 else1206 {1207 Espresso.ContentSection.ClassList.Clear();1208 Espresso.ContentSection.ClassList.AddClasses( "wtf col-12 col-lg-9 ml-auto" );1209 }1210 }1211 }12121213 @if ( Espresso.Item.NavigationLocalShow == "True" && Espresso.Item.NavigationLocalLayout == "vertical" )1214 {1215 <section class="e-section @NavigationLocalVerticalClassList">1216 <div class="container-fluid">1217 <div class="row">1218 <div class="col-12">1219 <div class="row">12201221 <div class="col-3">1222 <nav id="dwnav-local-@NavigationLocalVerticalParentPageId" class="@NavigationLocalVerticalContainerClassList">1223 <ul class="flex-column nav">1224 @if ( Espresso.Item.NavigationLocalHeading != "" )1225 {1226 <li class="e-nav-local-heading">1227 <h2>@Espresso.Item.NavigationLocalHeading</h2>1228 </li>1229 }1230 @RenderNavigation( new1231 {1232 id = "dwnav-local-" + NavigationLocalVerticalParentPageId,1233 parentid = NavigationLocalVerticalParentPageId,1234 template = NavigationLocalVerticalTemplate,1235 startlevel = Espresso.Item.NavigationLocalLevelStart,1236 endlevel = Espresso.Item.NavigationLocalLevelEnd,1237 expandmode = Espresso.Item.NavigationLocalPageTreeExpand == "True" ? "all" : "path",1238 } )1239 </ul>1240 </nav>1241 </div>12421243 </div>1244 </div>1245 </div>1246 </div>1247 </section>1248 }124912501251 @sectionStart()1252 @GetValue("DwContent(dwcontentmain)")1253 @sectionEnd()1254 </article>1255 </main>1256 @using Dynamicweb.Frontend1257 @{1258 string FooterContentClassList = "e-footer-content e-section";1259 }1260 @if ( Espresso.Item.FooterHide != "True" )1261 {1262 <footer class="e-footer">1263 <article class="e-footer-wrapper">1264 <section class="@FooterContentClassList">1265 <div class="container-fluid">1266 <div class="row">1267 @if ( !string.IsNullOrEmpty( Espresso.Area.Item.FooterPageId ) )1268 {1269 @RenderPageContent( int.Parse( Espresso.Area.Item.FooterPageId ) )1270 }1271 @*1272 @if ( string.IsNullOrEmpty( GetString( "DwNavigation(dwnavutilitiessecondaryfooter)" ) ) == false )1273 {1274 <div class="col-12">1275 <aside class="e-nav-utilities-secondary">1276 <ul class="nav nav-inline">1277 @GetValue("DwNavigation(dwnavutilitiessecondaryfooter)")1278 </ul>1279 </aside>1280 </div>1281 }*@1282 </div>1283 </div>1284 </section>1285 <section class="e-footer-copyright e-section">1286 <div class="container-fluid">1287 <div class="align-items-center row">1288 <div class="col-12 col-sm-9">1289 <p class="e-copyright">1290 &copy; @DateTime.Now.Year.ToString()&nbsp;1291 @Translate( "Footer - Copyright - Text", "Copyright &copy;" )&nbsp;12921293 &nbsp;@Translate( "Footer - All Rights Reserved - Text", "All rights reserved." )1294 </p>1295 </div>1296 @if ( isImageBankArea == false )1297 {1298 string creditcardImage = "creditcards_DK.svg";1299 if ( areaID == 25 )1300 {1301 creditcardImage = "creditcards_EN.svg";1302 }1303 if ( areaID == 27 )1304 {1305 creditcardImage = "creditcards_DE.svg";1306 }1307 <div class="col-12 col-sm-3 text-left text-sm-right custom-creditcards-wrapper">1308 <img class="custom-creditcards" src="/Files/Templates/Designs/legowear/_assets/img/@creditcardImage" alt="">1309 </div>1310 }1311 </div>1312 </div>1313 </section>1314 </article>1315 </footer>1316 }13171318 @if( string.IsNullOrEmpty( GetString("DwContent(dwcontentcta)") ) == false ) {1319 <aside id="dwcontentcta" class="js-e-cta e-cta is-hidden fixed-top">1320 <section class="e-section">1321 <div class="container-fluid">1322 <div class="row no-gutters">1323 <div class="col-12">1324 <div class="row no-gutters justify-content-center align-items-center">1325 @GetValue("DwContent(dwcontentcta)")1326 @* <p><a class="d-flex align-items-center justify-content-center justify-content-lg-left text-black text-decoration-none small" href="/bliv-ringet-op"><i class="material-icons material-icons-large text-primary mr-1">phone</i>Bliv ringet op</a></p> *@1327 </div>1328 </div>1329 </div>1330 </div>1331 </section>1332 </aside>1333 }13341335 <div class="e-cart-msg modal fade small" id="js-e-cart-msg" data-backdrop="false">1336 <div class="modal-dialog e-cart-msg-modal-dialog">1337 <div class="modal-content">1338 <div class="modal-header">1339 <h4 class="js-e-cart-msg-heading modal-title">1340 <i class="material-icons material-icons-large text-success">check_circle</i>1341 <span>@Translate( "eCom Cart - Product Added - Heading", "Added to your cart" )</span>1342 </h4>1343 <button class="close" data-dismiss="modal" type="button">1344 <i class="material-icons">close</i>1345 </button>1346 </div>1347 <div class="modal-body">1348 <div class="js-e-cart-msg-content">1349 <script id="js-e-handlebars-tmpl-cart-msg-lastadded" type="text/x-handlebars-template">1350 <div class="row">1351 {{#each cart.lastAdded}}1352 <div class="col-12 py-1">1353 <div class="row">1354 <div class="col-4">1355 <a class="" href="{{url}}">1356 <img alt="" class="img-fluid" src="{{imageLarge}}">1357 </a>1358 </div>1359 <div class="col-8">1360 <h3 class="mb-0">1361 <a href="{{url}}" class="text-decoration-none">{{name}} {{#if hasTypeRO}}<span>{{typeRO}}</span>{{/if}}</a>1362 </h3>1363 <p class="mb-0 text-muted">{{variantText}}</p>1364 <p class="mb-0">1365 <a href="{{url}}" class="text-auto text-decoration-none">1366 {{{cartMsgPrice}}}<br>1367 {{{stock.text}}}<br>1368 {{{stock.delivery}}}<br>1369 </a>1370 </p>1371 </div>1372 </div>1373 </div>1374 {{/each}}1375 </div>1376 </script>1377 </div>1378 </div>1379 <div class="bg-info e-cart-msg-footer modal-footer border-top-0">1380 <a class="btn btn-secondary mr-1" href="/shop/cart" data-dismiss="modal">@Translate( "eCom Cart - Continue Shopping - Button", "Continue shopping" )</a>1381 <a class="arrow-right btn btn-primary" href="/shop/cart">@Translate( "eCom Cart - Checkout - Button", "Checkout" )</a>1382 </div>1383 </div>1384 </div>1385 </div>13861387 @using Dynamicweb.Frontend1388 @{1389 string ecomOrderDeliveryCountry = HttpContext.Current.Request.Form[ "EcomOrderDeliveryCountry" ];1390 bool modalDeliveryCountryFormPosted = !string.IsNullOrEmpty(ecomOrderDeliveryCountry);1391 string currentDomain = "//" + PageView.GetAreaByDomain().DomainLock + "/";1392 string currentUrl = PageView.Current().SearchFriendlyUrl;1393 string formAction = "";1394 }13951396 <!-- Modal -->1397 <div class="modal fade js-modal-deliverycountry" data-form-posted="@modalDeliveryCountryFormPosted" data-param-ecomorderdeliverycountry="@ecomOrderDeliveryCountry" id="modalDeliveryCountry" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">1398 <div class="modal-dialog" role="document">1399 <div class="modal-content">1400 <div class="modal-body">1401 <div class="" id="countries">1402 <h3 class="text-center mb-0 text-uppercase">@Translate( "global Modal - Langauge select - Heading", "Select your country" )</h3>1403 <p class="text-center mb-2">@Translate( "global Modal - Langauge select - Text", "So we can easily deliver to you" )</p>1404 <div class="e-nav-utilities-primary kabooki-custom-language-select">14051406 @foreach (KeyValuePair<string, dynamic> selectorCountry in selectorCountries)1407 {1408 if (selectorCountry.Value.domain.ToLower() == currentDomain)1409 {1410 formAction = currentUrl;1411 }1412 else1413 {1414 formAction = selectorCountry.Value.domain.ToLower();1415 }1416 <div>1417 <form action="@formAction" method="post">1418 <input type="hidden" name="countrycode" value="@selectorCountry.Value.countrycode">1419 <input type="hidden" name="currencycode" value="@selectorCountry.Value.currencycode">1420 <input type="hidden" name="EcomOrderDeliveryCountry" value="@selectorCountry.Value.countrycode">1421 <input type="hidden" name="EcomOrderDeliveryCountryCode" value="@selectorCountry.Value.countrycode">1422 <input type="hidden" name="EcomOrderCustomerCountry" value="@selectorCountry.Value.countrycode">1423 <input type="hidden" name="EcomOrderCustomerCountryCode" value="@selectorCountry.Value.countrycode">1424 <button class="nav-link border-0 bg-transparent icon-flag-@selectorCountry.Value.countrycode.ToLower()" type="submit">1425 <i class="e-nav-pageicon e-nav-pageicon-language js-e-nav-pageicon-language"></i><span class="e-nav-pagename">@selectorCountry.Value.title</span>1426 </button>1427 </form>1428 </div>1429 }1430 </div>1431 </div>1432 </div>1433 </div>1434 </div>1435 </div>14361437 </div>14381439 @using Co3.Espresso.Base.Extensions1440 @using Co3.Espresso.Website.Services1441 <div class="modal fade e-search js-e-search js-e-search-modal modal-fullscreen" data-backdrop="false" data-keyboard="true" data-focus="true">1442 <div class="modal-dialog">1443 <div class="modal-content">14441445 <div class="modal-header">1446 <a class="btn btn-sm btn-secondary js-e-back-link arrow-left" href="/" data-dismiss="modal">1447 @Translate("Search - Back button", "Back")1448 </a>1449 <div class="e-logo">1450 <a href="/" class="e-logo-link my-0">1451 <img src="@logoPrimary" class="e-logo-img e-logo-img-primary" alt="@Espresso.Area.Item.CompanyName">1452 <img src="@logoSecondary" class="e-logo-img e-logo-img-secondary" alt="@Espresso.Area.Item.CompanyName">1453 </a>1454 </div>1455 </div>14561457 <div class="modal-body">14581459 <div class="container-fluid">14601461 <div class="e-search-form-container">1462 <div class="row justify-content-center">1463 <div class="col-12 col-md-10 col-lg-8 col-xl-6 mt-3">1464 <form action="" class="e-search-form js-e-search-form">1465 <div class="js-e-search-input-group e-search-input-group is-empty">1466 <label class="e-search-label" for="e-search-input"><span class="search-custom-search-icon"></span></label>1467 @{ string Translate_Search_InputText = Translate("Search - Input Placeholder - Text", "Search"); }1468 <input type="text" class="js-e-search-input e-search-input form-control-plaintext border-0" name="q" id="e-search-input" placeholder="@Translate_Search_InputText">1469 <span class="js-e-search-clear e-search-clear"><i class="material-icons">close</i></span>1470 <button class="e-search-submit btn btn-primary" type="submit"><span class="search-custom-search-icon white"></span></button>1471 </div>1472 </form>1473 </div>1474 </div>1475 </div>14761477 <div class="js-e-search-result-container e-search-result-container">14781479 <div class="row justify-content-center">1480 <div class="col-12 col-md-10 col-lg-8 col-xl-6">1481 <p class="e-search-result-info small text-muted mt-1 mb-3"><span class="js-e-search-result-count">0</span> @Translate("Search - Result Count - Text", "results")</p>1482 </div>1483 </div>14841485 <div class="row justify-content-center">1486 <div class="col-12 col-xl-10">1487 <div class="js-e-search-result-products e-search-result-products is-empty mb-4">1488 @{string productlistItemClassList = ProductlistService.Instance.GetGridItemWidth( null ).ToResponsiveClasses();}1489 <script id="js-e-handlebars-tmpl-search-result-item-product" type="text/x-handlebars-template">1490 <div class="e-products">1491 <div class="row justify-content-center">1492 {{#each products}}1493 <div class="@productlistItemClassList"">1494 <div class="e-products-item js-e-products-item js-e-products-item-{{id}} js-e-block-link e-block-link" data-variant-id="{{variantId}}" style="background-image:url('{{imageLarge}}'); background-position:center; background-size: cover;">1495 <div class="e-products-item-container">1496 <div class="e-products-item-image-container">1497 <a class="e-products-item-image-wrapper" href="{{{url}}}">1498 @*<img src="{{{imageLarge}}}" alt="" class="e-products-item-image">*@1499 {{#if hasDiscount}}1500 <img src="/Files/Images/kabooki/system/lego_wear_badge_percentage.svg" alt="" class="custom-products-item-badge">1501 {{/if}}1502 </a>1503 </div>1504 </div>1505 </div>15061507 <div class="e-products-item-text-container text-left small mb-2">1508 <h3 class="e-products-item-name mb-0 mt-0">1509 <a href="{{{url}}}">{{name}} {{#if hasTypeRO}}<span>{{typeRO}}</span>{{/if}}</a>1510 </h3>1511 <p class="e-products-item-text mb-0">1512 <span class="e-products-item-price">1513 <a href="{{{url}}}">1514 {{{price}}}1515 {{#if hasDiscount}}1516 <span class="custom-products-item-beforeprice">{{{priceBefore}}}</span>1517 {{/if}}1518 </a>1519 </span>1520 </p>1521 </div>15221523 </div>1524 {{/each}}1525 </div>1526 <p class="js-e-search-products-show-all text-center"><a href="" class="btn btn-secondary px-6">@Translate( "Search - View All Products - Button", "View All Products" )</a></p>1527 </div>1528 </script>1529 </div>1530 </div>1531 </div>15321533 <div class="row justify-content-center">1534 <div class="col-12 col-md-10 col-lg-8 col-xl-6">1535 <div class="js-e-search-result-pages e-search-result-pages is-empty mb-3">1536 <script id="js-e-handlebars-tmpl-search-result-item-page" type="text/x-handlebars-template">1537 <div class="row">1538 {{#each pages}}1539 <div class="col-12">1540 <p class="mb-0"><a href="{{{url}}}" class="text-bold">{{{title}}}</a></p>1541 <p class="mb-0 small text-truncate">1542 <a href="{{{url}}}" class="text-auto text-muted text-decoration-none"><span class="d-none d-sm-inline">@HttpContext.Current.Request.Url.Host</span>{{{url}}}</a></p>1543 <p class="small">{{{text}}}...</p>1544 </div>1545 {{/each}}1546 </div>1547 </script>1548 </div>1549 </div>1550 </div>15511552 <div class="js-e-search-loading-overlay e-loading-overlay e-search-loading-overlay">1553 <div class="e-loading-spinner"></div>1554 </div>15551556 </div>15571558 </div>1559 </div>1560 </div>1561 </div>1562 </div>15631564 @if( Espresso.Area.Item.BackToTopLink == "True" ){1565 <a href="#top" class="e-back-to-top js-e-back-to-top"><i class="material-icons">keyboard_arrow_up</i></a>1566 }156715681569 @*1570 @using System.Web;1571 @inherits Co3.Espresso.Website.TemplateBases.Pages.PageBase15721573 @{1574 HttpCookie optInLevel = HttpContext.Current.Request.Cookies[ "Dynamicweb.CookieOptInLevel" ];1575 bool showCookieWarning = optInLevel == null;1576 if ( optInLevel != null )1577 {1578 showCookieWarning = optInLevel.Value != "2";1579 }1580 }15811582 @if ( showCookieWarning )1583 {1584 <div class="e-cookie js-e-cookie py-1" hidden="">1585 <aside class="e-cookie-wrapper">1586 <section class="e-section">1587 <div class="container-fluid">1588 <div class="align-items-center row">1589 <div class="col-12 col-lg-10 col-md-9 my-1">1590 <p class="line-height-sm mb-0 small text-center text-md-left">1591 <span class="d-md-inline d-none">1592 @Translate( "Cookie Warning - Message Long - Text", "This website uses cookies to provide necessary site functionality and improve your experience. By using our website, you agree to our" )1593 </span>1594 <span class="d-md-none">1595 @Translate( "Cookie Warning - Message Short - Text", "This website uses cookies to improve your experience. Learn more about our" )1596 </span>1597 &nbsp;1598 <a href="@Espresso.Area.Item.CookieMessage">@Translate( "Cookie Warning - Policy - Link", "cookie policy" )</a>1599 </p>1600 </div>1601 <div class="col-12 col-lg-2 col-md-3 my-1">1602 <p class="mb-0 text-center text-md-right">1603 <button class="btn e-cookie-accept-btn js-e-cookie-accept-btn" type="button">1604 @Translate( "Cookie Warning - Accept - Button", "OKAY" )1605 </button>1606 </p>1607 </div>1608 </div>1609 </div>1610 </section>1611 </aside>1612 </div>1613 }16141615 @if ( 1 == 2 )1616 {1617 @GetValue( "DwCookieWarning" )1618 }16191620 *@16211622<script async="" src="/Files/Templates/Designs/kabooki-shop/_assets/_dist/js/default.js?v=1.2.0"></script>@*<script type="text/javascript">var _lf_popup='00f7213ba4f7722d2117fd8747b47663';"undefined"!=typeof window.lf_popup_runtime?-1===window.lf_popup_runtime.indexOf(_lf_popup)&&window.lf_popup_runtime.push(_lf_popup):window.lf_popup_runtime=[_lf_popup],function(e,d,t){var i,o=e.getElementsByTagName(d)[0];e.getElementById(t)||(i=e.createElement(d),i.id=t,i.async=true,i.src="https://zone-1.cdn.leadfamly.com/campaign/sdk/popup.min.js",o.parentNode.insertBefore(i,o))}(document,"script","lf-popup");</script>*@<script type="text/javascript">var _lf_popup='00f7213ba4f7722d2117fd8747b47663';"undefined"!=typeof window.lf_popup_runtime?-1===window.lf_popup_runtime.indexOf(_lf_popup)&&window.lf_popup_runtime.push(_lf_popup):window.lf_popup_runtime=[_lf_popup],function(e,d,t){var i,o=e.getElementsByTagName(d)[0];e.getElementById(t)||(i=e.createElement(d),i.id=t,i.async=true,i.src="https://zone-1.cdn.leadfamly.com/campaign/sdk/popup.min.js",o.parentNode.insertBefore(i,o))}(document,"script","lf-popup");</script></body>@GetValue( "CopyRightNotice" )</html>