Error executing template "Designs/isabella/_parsed/espresso.parsed.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
at CompiledRazorTemplates.Dynamic.RazorEngine_73dd905ac60340f79bb046b085e47c52.Execute() in F:\dynamicweb.net\Solutions\isabella.espresso4.dk\Files\Templates\Designs\isabella\_parsed\espresso.parsed.cshtml:line 57
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.<RunCompile>b__0(TextWriter writer)
at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template)
at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template)
at Dynamicweb.Rendering.Template.RenderRazorTemplate()

1 @inherits Co3.Espresso.Website.TemplateBases.Pages.PageBase 2 @using System.IO 3 @using System.Web 4 @using Co3.Espresso.Website.Services 5 @using Dynamicweb.Admin.dk.dynamicweb.templates 6 @using Dynamicweb.Ecommerce.Common 7 @using Dynamicweb.Frontend 8 @using System.Net 9 @using System.Net.Sockets 10 @{ 11 string globalAreaLang = PageView.Current().Area.CultureInfo.TwoLetterISOLanguageName; 12 string globalAreaName = string.Empty; 13 globalAreaName = PageView.Current().Area.Name; 14 string currencySeparatorDecimal = PageView.Current().Area.CultureInfo.NumberFormat.NumberDecimalSeparator; 15 string currencySeparatorInteger = PageView.Current().Area.CultureInfo.NumberFormat.NumberGroupSeparator; 16 bool isProductPage = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request["productid"]); 17 string openGraphUrl = PageView.Current().SearchFriendlyUrl; 18 string openGraphImage = HttpContext.Current.Request.Url.Scheme + "://" + HttpContext.Current.Request.Url.Host + Espresso.OpenGraphImage; 19 string openGraphTitle = Espresso.OpenGraphTitle; 20 string openGraphDescription = Espresso.OpenGraphDescription; 21 if (string.IsNullOrEmpty(openGraphImage)) 22 { 23 openGraphImage = HttpContext.Current.Request.Url.Scheme + "://" + HttpContext.Current.Request.Url.Host + (string)PageView.Current().Area.Item["OpenGraphImage"]; 24 } 25 if (string.IsNullOrEmpty(openGraphTitle)) 26 { 27 openGraphTitle = (string)PageView.Current().Area.Item["OpenGraphTitle"]; 28 } 29 if (string.IsNullOrEmpty(openGraphDescription)) 30 { 31 openGraphDescription = (string)PageView.Current().Area.Item["OpenGraphDescription"]; 32 } 33 34 35 bool isUserAuthenticated = PageView.Current().User != null; 36 string webfontsSnippetHtml = RenderSnippet( "webfonts" ).ToString().Trim(); 37 string customWebsite = PageView.Current().Area.Item["CustomWebsite"]?.ToString(); 38 string shopType = PageView.Current().Area.Item["ShopType"]?.ToString(); 39 string isOutletClass = shopType == "Outlet" ? "is-outlet" : string.Empty; 40 } 41 42 <!DOCTYPE html> 43 <html lang="@globalAreaLang" data-separator-integer="@currencySeparatorInteger" data-separator-decimal="@currencySeparatorDecimal" data-area="@globalAreaName" data-shop="@shopType"> 44 <head> 45 @GetValue( "CopyRightNotice" ) 46 <meta charset="utf-8"> 47 <meta content="width=device-width, initial-scale=1, shrink-to-fit=no, minimal-ui" name="viewport"> 48 <meta content="ie=edge" http-equiv="x-ua-compatible"> 49 <title>@GetValue("Title")</title> 50 @Espresso.CriticalCSS 51 @if ( webfontsSnippetHtml != "<!--$$Snippet(webfonts)-->" ) 52 { 53 @webfontsSnippetHtml 54 } 55 <link href="/Files/Templates/Designs/isabella/_assets/_dist/css/default.css?v=1.09" media="@Espresso.StylesheetAttributeMedia" rel="@Espresso.StylesheetAttributeRel" as="style"> 56 57 @Espresso.CriticalJS 58 @*<meta name="description" content="@Espresso.DynamicwebPage.Description">*@ 59 <link rel="shortcut icon" href="@Espresso.Area.Item.Favicon"> 60 @GetValue( "MetaTags" ) 61 @if ( Espresso.IsStagingUrl ) 62 { 63 <meta content="noindex,nofollow" name="robots"> 64 } 65 @if (isProductPage) 66 { 67 @RenderSnippet( "ProductOpenGraph" ) 68 } 69 else 70 { 71 <meta property="og:title" content="@openGraphTitle"> 72 <meta property="og:description" content="@openGraphDescription"> 73 <meta property="og:image" content="@openGraphImage"> 74 } 75 <meta property="og:url" content="@openGraphUrl"> 76 <meta property="og:type" content="website"> 77 78 <meta name="facebook-domain-verification" content="8kymtn6m9jq0t3gqsk3y6dqbadc3qf"> 79 @if ( string.IsNullOrEmpty( Espresso.Area.Item.GoogleSiteVerification ) == false ) 80 { 81 <meta name="google-site-verification" content="@Espresso.Area.Item.GoogleSiteVerification"> 82 } 83 @{ 84 if ( 1 == 2 ) 85 { 86 @GetValue( "Stylesheets" ) 87 } 88 } 89 90 @inherits Co3.Espresso.Website.TemplateBases.Pages.PageBase 91 @using System.Web; 92 @using System.IO 93 @using Dynamicweb.Content 94 @using Dynamicweb.Content.Items 95 @using Dynamicweb.Rendering 96 @using Dynamicweb.Frontend 97 98 <!-- Hreflang --> 99 @{ 100 @* Get areas from service *@ 101 Dynamicweb.Content.AreaService areaService = new Dynamicweb.Content.AreaService(); 102 IList<Area> areas = areaService.GetAreas(); 103 @* Get current page's relation-text from page-item *@ 104 string currentPageRelation = PageView.Current().Page.Item["PageRelation"] != null ? PageView.Current().Page.Item["PageRelation"].ToString() : string.Empty; 105 @* Frontpage must have 'frontpage' as relation-text *@ 106107 string frontpageRelation = "i-frontpage"; 108 int REDIRECT_ID = 1; 109 if (PageView.Current().Area.Item["CustomWebsite"] != null && PageView.Current().Area.Item["CustomWebsite"].ToString() == "timeout-website") 110 { 111 frontpageRelation = "t-frontpage"; 112 REDIRECT_ID = 63; 113 } 114 string domainBase = areas.FirstOrDefault( a => a?.ID == REDIRECT_ID ).DomainLock; 115 List<dynamic> areaInfoList = new List< dynamic >(); 116117 @* Iterate areas *@ 118 foreach ( Area area in areas ) 119 { 120 if ( area.Active == true && area.ID != REDIRECT_ID ) 121 { 122123 @* Get current area's culture *@ 124 string culture = area.Culture; 125 string name = area.Name; 126 @* Check for IsDefault Hreflang on area *@ 127 string isDefaultHrefLang = area.Item[ "IsDefaultHrefLang" ] != null ? area.Item[ "IsDefaultHrefLang" ].ToString() : string.Empty; 128 @* Check for override-culture text on area *@ 129 string hreflangCultureOverride = area.Item[ "HreflangLanguageOverride" ] != null ? area.Item[ "HreflangLanguageOverride" ].ToString() : string.Empty; 130131 string isWebsiteExcluded = area.Item["ExcludeFromHreflang"] != null ? area.Item["ExcludeFromHreflang"]?.ToString() : string.Empty; 132 @* Get scheme and domain *@ 133 string scheme = GetGlobalValue("Global:Request.Scheme"); 134 string domain = domainBase; 135 @* If we have a primary domain call pageservice and get pages *@ 136137 string productId = HttpContext.Current.Request[ "productid" ]; 138 if (string.IsNullOrEmpty(productId) == false) 139 { 140 if (PageView.Current().Page.Parent != null && PageView.Current().Page.Parent.Item != null && PageView.Current().Page.Parent.Item["PageRelation"] != null) 141 { 142 currentPageRelation = PageView.Current().Page.Parent.Item["PageRelation"].ToString(); 143 } 144145 } 146147 if ( string.IsNullOrEmpty(currentPageRelation) == false && string.IsNullOrEmpty(domain) == false ) 148 { 149150151 Dynamicweb.Content.PageService pageService = new Dynamicweb.Content.PageService(); 152 IEnumerable< Dynamicweb.Content.Page > pages = pageService.GetPagesByAreaID(area.ID); 153 @* Iterate pages in area - check if is active + has item + has item-pagerelation + item-pagerelation equals current pagerelation *@ 154 foreach ( Dynamicweb.Content.Page page in pages.Where(p => p.Published && p.Item != null && p.Item[ "PageRelation" ] != null && p.Item[ "PageRelation" ].ToString().Equals(currentPageRelation)) ) 155 { 156157 string url = string.Empty; 158 if ( string.IsNullOrEmpty(productId) == false ) 159 { 160 @* Build url to area product page *@ 161 string prodUrl = string.Format("Default.aspx?ID={0}&ProductId={1}", pageService.GetPagesByParentID(page.ID)?.FirstOrDefault()?.ID, productId); 162 url = string.Format("{0}://{1}{2}", scheme, domain, SearchEngineFriendlyURLs.GetFriendlyUrl(prodUrl, area.EcomLanguageId)); 163 } 164 else 165 { 166 @* Build url to area page *@ 167 url = string.Format("{0}://{1}{2}", scheme, domain, SearchEngineFriendlyURLs.GetFriendlyUrl(page.GetPageHrefValue())); 168 } 169 @* If our current page relation match frontpage - set link to domain only *@ 170 if ( currentPageRelation == frontpageRelation ) 171 { 172 url = string.Format("{0}://{1}/{2}", scheme, domain, name); 173 } 174175 @* If our area item has checked in Default hreflang, we render x-default link *@ 176 if ( isDefaultHrefLang == "True" ) 177 { 178 <link rel="alternate" hreflang="x-default" href="@url"> 179 } 180 @* If we have a value in the area-item to overrule the culture, override the value here *@ 181 if ( string.IsNullOrEmpty(hreflangCultureOverride) == false ) 182 { 183 culture = hreflangCultureOverride; 184 } 185 @* Render hreflang-link *@ 186 if ( isWebsiteExcluded != "True") 187 { 188 <link rel="alternate" hreflang="@culture.ToLower()" href="@url"> 189 } 190191 } 192 } 193 } 194 } 195196 } 197 <!-- End Hreflang --> 198199 <!-- Google Tag Manager --> 200 <script>!function(){"use strict";function l(e){for(var t=e,r=0,n=document.cookie.split(";");r<n.length;r++){var o=n[r].split("=");if(o[0].trim()===t)return o[1]}}function s(e){return localStorage.getItem(e)}function u(e){return window[e]}function d(e,t){e=document.querySelector(e);return t?null==e?void 0:e.getAttribute(t):null==e?void 0:e.textContent}var e=window,t=document,r="script",n="dataLayer",o="TT2Z6XF",a="https://ss.isabella.net",i="",c="vchxjrma",E="stapeUserId",I="",v="",g=!1;try{var g=!!E&&(m=navigator.userAgent,!!(m=new RegExp("Version/([0-9._]+)(.*Mobile)?.*Safari.*").exec(m)))&&16.4<=parseFloat(m[1]),A="stapeUserId"===E,f=g&&!A?function(e,t,r){void 0===t&&(t="");var n={cookie:l,localStorage:s,jsVariable:u,cssSelector:d},t=Array.isArray(t)?t:[t];if(e&&n[e])for(var o=n[e],a=0,i=t;a<i.length;a++){var c=i[a],c=r?o(c,r):o(c);if(c)return c}else console.warn("invalid uid source",e)}(E,I,v):void 0;g=g&&(!!f||A)}catch(e){console.error(e)}var m=e,E=(m[n]=m[n]||[],m[n].push({"gtm.start":(new Date).getTime(),event:"gtm.js"}),t.getElementsByTagName(r)[0]),I="dataLayer"===n?"":"&l="+n,v=f?"&bi="+encodeURIComponent(f):"",A=t.createElement(r),e=g?"kp"+c:c,n=!g&&i?i:a;A.async=!0,A.src=n+"/"+e+".js?st="+o+I+v,null!=(f=E.parentNode)&&f.insertBefore(A,E)}();</script> 201 <!-- End Google Tag Manager --> 202203204 <meta name="p:domain_verify" content="f3602094bd5d9d79dad3925721bc1ae4"> 205 <meta name="msvalidate.01" content="DF1E6C310BF3052B5579FABC80E4444D"> 206 <!-- ActiveCampaign --> 207 <script type="text/javascript" defer=""> 208209 (function(e,t,o,n,p,r,i){e.visitorGlobalObjectAlias=n; 210 e[e.visitorGlobalObjectAlias]=e[e.visitorGlobalObjectAlias]||function(){(e[e.visitorGlobalObjectAlias].q=e[e.visitorGlobalObjectAlias].q||[]).push(arguments)}; 211 e[e.visitorGlobalObjectAlias].l=(new Date).getTime(); 212 r=t.createElement("script"); 213 r.src=o;r.async=true; 214 i=t.getElementsByTagName("script")[0]; 215 i.parentNode.insertBefore(r,i)})(window,document,"https://diffuser-cdn.app-us1.com/diffuser/diffuser.js","vgo"); 216 vgo('setAccount', '254430349'); 217 vgo('setTrackByDefault', true); 218 vgo('process'); 219 </script> 220 <!-- ActiveCampaign --> 221 <!-- Sleeknote --> 222 <script id="sleeknoteScript" type="text/javascript"> 223 (function () { 224 var sleeknoteScriptTag = document.createElement("script"); 225 sleeknoteScriptTag.type = "text/javascript"; 226 sleeknoteScriptTag.charset = "utf-8"; 227 sleeknoteScriptTag.src = ("//sleeknotecustomerscripts.sleeknote.com/861.js"); 228 var s = document.getElementById("sleeknoteScript"); 229 s.parentNode.insertBefore(sleeknoteScriptTag, s); 230 })(); 231 </script> 232 <!-- End of Sleeknote signup and lead generation tool - www.sleeknote.com --> 233234 </dynamic></head> 235236 <body class="@Espresso.Item.CustomClasses @customWebsite @isOutletClass" data-cart-currencycode="@Context.Currency.Code" data-shop-currencycode="@Pageview.Area.EcomCurrencyId" data-userauthenticated="@isUserAuthenticated.ToString().ToLower()"> 237 <!-- Google Tag Manager (noscript) --> 238 <noscript><iframe src="https://ss.isabella.net/ns.html?id=GTM-TT2Z6XF" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> 239 <!-- End Google Tag Manager (noscript) --> 240 @using Dynamicweb.Frontend 241 @inherits Co3.Espresso.Website.TemplateBases.Pages.PageBase 242 @{ 243 Espresso.Canvas.ClassList.AddClasses( "js-e-canvas is-loading" ); 244 if ( Espresso.Item.CanvasFullscreen == "True" ) 245 { 246 Espresso.Canvas.ClassList.AddClasses( "is-fullscreen" ); 247 } 248249 } 250251252253 @using System.Globalization 254 @using System.Security.Cryptography.X509Certificates 255 @using System.Web.Razor.Parser.SyntaxTree 256 @using Co3.Espresso.Base.Extensions 257 @using Co3.Espresso.Website.Models.FrontEnd 258 @using Co3.Espresso.Website.Services 259 @using Co3.Isabella.Dw.Models.FrontEnd.Ecommerce 260 @using Dynamicweb.Content 261 @using Dynamicweb.Ecommerce.Products 262 @using Dynamicweb.Frontend 263 @using Dynamicweb.Rendering 264 @using Dynamicweb.Rendering.Translation 265 @using Dynamicweb.SystemTools 266 @using EcomContext = Dynamicweb.Ecommerce.Common.Context 267 @using eProductService = Co3.Espresso.Website.Services.ProductService 268 @using Page = Dynamicweb.Content.Page 269 @using PageService = Dynamicweb.Content.PageService 270271 @functions { 272273 public string getCountryCodeFromArea(Area area) 274 { 275 RegionInfo regionInfo = new RegionInfo( area.CultureInfo.LCID ); 276 return regionInfo.TwoLetterISORegionName; 277 } 278279 public string getCheckoutSetup(string shopType = "") 280 { 281 bool isB2bCheckout = PageView.Current().User != null; 282 if (isB2bCheckout) 283 { 284 return "shipping,customer,approve"; 285 } else if (shopType == "B2C") 286 { 287 return "shipping,payment,approve"; 288 } else if (shopType == "Outlet") 289 { 290 return "shipping,customer,payment,approve"; 291 } 292293 return "customer,approve"; 294 } 295296 public static string GetStandardCollapseToggleTextExpand() 297 { 298 return "Se mere"; 299 } 300301 public static string GetStandardCollapseToggleTextCollapse() 302 { 303 return "Se mindre"; 304 } 305306 public string getModelTypeLink() 307 { 308 bool isUserAuthenticated = PageView.Current().User != null; 309 string eComCountryCode = PageView.Current().Area.Item[ "EcommerceCountryCode" ] != null ? PageView.Current().Area.Item[ "EcommerceCountryCode" ].ToString() : ""; 310 string returnValue = string.Empty; 311312 if ( isUserAuthenticated == false ) 313 { 314 if ( string.IsNullOrEmpty(eComCountryCode) == false) 315 { 316 { 317 returnValue = string.Format( "Ecom:Product.CategoryField.ModelType.ModelTypeLink_{0}.Value", eComCountryCode ); 318 } 319 } 320 else 321 { 322 returnValue = "Ecom:Product.CategoryField.ModelType.ModelTypeLink.Value"; 323 } 324 } 325 else 326 { 327 if ( string.IsNullOrEmpty(eComCountryCode) == false) 328 { 329 { 330 returnValue = string.Format( "Ecom:Product.CategoryField.ModelType.ModelTypeLinkB2B_{0}.Value", eComCountryCode ); 331 } 332 } 333 else 334 { 335 returnValue = "Ecom:Product.CategoryField.ModelType.ModelTypeLinkB2B.Value"; 336 } 337 } 338339 return returnValue; 340 } 341342 } 343344 @helper ProductDescription(string sectionClasses = "e-section", bool sectionCollapse = false, string contentClasses = null, string heading = null, string content = null, string collapseToggleTextExpand = null, string collapseToggleTextCollapse = null) 345 { 346 if ( string.IsNullOrEmpty( content ) == false ) 347 { 348 ClassList headingClassList = new ClassList(); 349 headingClassList.AddClasses( "col-12" ); 350 ClassList contentClassList = new ClassList(); 351 contentClassList.AddClasses( "col-12" ); 352353 @sectionStart( sectionClasses: sectionClasses, sectionCollapse: sectionCollapse, contentClasses: contentClasses, collapseToggleTextCollapse: collapseToggleTextCollapse, collapseToggleTextExpand: collapseToggleTextExpand ) 354355 if ( string.IsNullOrEmpty( heading ) == false ) 356 { 357 <div class="@headingClassList"> 358 <h2>@heading</h2> 359 </div> 360 } 361 <div class="@contentClassList"> 362 @content 363 </div> 364365 @sectionEnd() 366 } 367 } 368369370 @helper ProductVideo(string sectionClasses = "e-section", string contentClasses = null, string heading = null, string videoURL = null) 371 { 372 if ( string.IsNullOrEmpty( videoURL ) == false ) 373 { 374 ClassList headingClassList = new ClassList(); 375 headingClassList.AddClasses( "col-12" ); 376 ClassList contentClassList = new ClassList(); 377 contentClassList.AddClasses( "col-12" ); 378379380 @sectionStart( sectionClasses: sectionClasses, contentClasses: contentClasses ) 381382 if ( string.IsNullOrEmpty( heading ) == false ) 383 { 384 <div class="@headingClassList"> 385 <h2>@heading</h2> 386 </div> 387 } 388389 <div class="@contentClassList"> 390 <div class="embed-responsive embed-responsive-16by9 mb-2"> 391 <iframe class="embed-responsive-item" src="@videoURL" width="1080" height="608" frameborder="0" webkitallowfullscreen="" mozallowfullscreen="" allowfullscreen=""></iframe> 392 </div> 393 </div> 394 @sectionEnd() 395 } 396 } 397398 @helper ProductRelatedProducts(string sectionClasses = "e-section", bool sectionCollapse = false, string contentClasses = null, string heading = null, string content = null, string collapseToggleTextExpand = null, string collapseToggleTextCollapse = null, 399 IEnumerable< Product > productLoop = null) 400 { 401 if ( productLoop != null && productLoop.Any() == true ) 402 { 403 ClassList headingClassList = new ClassList(); 404 headingClassList.AddClasses( "col-12" ); 405 ClassList contentClassList = new ClassList(); 406 contentClassList.AddClasses( "col-12" ); 407408 @sectionStart( sectionClasses: sectionClasses, sectionCollapse: sectionCollapse, contentClasses: contentClasses, collapseToggleTextCollapse: collapseToggleTextCollapse, collapseToggleTextExpand: collapseToggleTextExpand ) 409410 if ( string.IsNullOrEmpty( heading ) == false ) 411 { 412 <div class="@headingClassList"> 413 <h4 class="isabella-text-bullets-left mb-3">@heading</h4> 414 </div> 415 } 416 <div class="@contentClassList"> 417 <div class="e-products mb-2"> 418 <div class="row"> 419 @{ 420 string productlistItemClassList = "col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3"; 421 } 422 @foreach ( Product product in productLoop.Where(p => p.Groups.Any(g => g.ShopId.Equals("SHOP1")) && (bool) p.GetCategoryValue( "ProductsGeneral", "PIMActive" ) != false && (bool) p.ShowInProductList && p.Active) ) 423 { 424 @ProductlistItem(product, productlistItemClassList) 425 } 426 </div> 427 </div> 428 </div> 429430 @sectionEnd() 431 } 432 } 433434435 @helper ProductlistItem(Product product, string productlistItemClassList = null, string isModelProductList = null) 436 { 437 Dynamicweb.Ecommerce.Products.ProductService dwProductService = new Dynamicweb.Ecommerce.Products.ProductService(); 438 string shopType = PageView.Current().Area.Item["ShopType"]?.ToString(); 439 string productLink = eProductService.Instance.GetProductLink( product.GetDefaultGroupByShopId( product.DefaultShopId ).Id, product.Id, product.VariantId ); 440441442 productLink = SearchEngineFriendlyURLs.GetFriendlyUrl( productLink ); 443444 if (shopType == "Outlet") 445 { 446 Page page = new PageService().GetPageByNavigationTag(PageView.Current().AreaID, "outletdisplaypage"); 447 if (page != null) 448 { 449 productLink = SearchEngineFriendlyURLs.GetFriendlyUrl( $"Default.aspx?ID={page.ID}&productId={product.Id}" ); 450 } 451452 } 453454 string productlistDetailImage = product.Details.FirstOrDefault( pd => pd.Type == 0 && pd.GroupId == 4 )?.Value; 455456 if ( product != null ) 457 { 458 dynamic productData = new 459 { 460 id = product.Id, 461 url = productLink, 462 number = product.Number, 463 name = product.Name, 464 imageDefault = Co3.Isabella.Dw.Services.ImageService.Instance.GetImageURL( Dynamicweb.Ecommerce.Services.Details.GetDefaultDetail( product.Id, product.VariantId, 465 EcomContext.LanguageID )?.Value, 400, 225, 0, 75, "jpg", "/Files/Templates/Designs/isabella/_assets/img/NoImage.gif" ), 466 price = Co3.Isabella.Dw.Services.ProductService.Instance.GetPrice( product.Id ).Format(), 467 priceClean = Co3.Isabella.Dw.Services.ProductService.Instance.GetPrice( product.Id ).Price, 468 productIntroText = product.GetCategoryValue( "ProductsGeneral", "ProductIntroText" )?.ToString(), 469 news = product.GetCategoryValue( "ProductsGeneral", "News" )?.ToString(), 470 productType = product.GetCategoryValue( "ProductsGeneral", "ProductType" )?.ToString(), 471 isModelProductList = isModelProductList, 472 productlistDetailImage = Co3.Isabella.Dw.Services.ImageService.Instance.GetImageURL( productlistDetailImage ), 473 shopType 474 }; 475476 <div class="@productlistItemClassList"> 477 <div class="border-1 card mb-6"> 478 <a href="@productData.url"> 479 @if ( productData.isModelProductList == "True" ) 480 { 481 <img src="@productData.productlistDetailImage" alt="@productData.name @productData.productType" class="col-12 p-0"> 482 } 483 else 484 { 485 <img src="@productData.imageDefault" alt="@productData.name @productData.productType" class="col-12 p-0"> 486 } 487 @if ( productData.news == "True" ) 488 { 489 <div class="isabella-product-item-news"> 490 @Dynamicweb.Rendering.Translation.Translation.GetTranslation( "Ecom Product - News Badge - Text" ) 491 </div> 492 } 493 </a> 494 <div class="card-body p-1 p-lg-3"> 495 <h4 class="e-products-item-name mb-0"> 496 <a href="@productData.url"> 497 @productData.name 498 </a> 499 </h4> 500 @if ( string.IsNullOrEmpty( productData.productIntroText ) == false ) 501 { 502 @productData.productIntroText 503 } 504 </div> 505 </div> 506 </div> 507 } 508 } 509510511 @helper sectionStart(string sectionClasses = "e-section", string contentClasses = null, bool sectionCollapse = false, string sectionId = null, string collapseToggleTextExpand = null, string collapseToggleTextCollapse = null) 512 { 513 sectionId = string.IsNullOrEmpty( sectionId ) ? Guid.NewGuid().ToString( "N" ) : sectionId; 514 ClassList sectionClassList = new ClassList(); 515 sectionClassList.AddClasses( sectionClasses ); 516 ClassList contentClassList; 517518 if ( contentClasses == null ) 519 { 520 contentClassList = Co3.Espresso.Website.Services.PageService.Instance.GetResponsiveClassesFromPageItem( PageView.Current().Page.Item ); 521 } 522 else 523 { 524 contentClassList = new ClassList(); 525 contentClassList.AddClasses( contentClasses ); 526 } 527528 // TODO: Split collapse logic into separate helper function. 529 string collapseId = Guid.NewGuid().ToString( "N" ); 530 ClassList collapseToggleClassList = new ClassList(); 531 if ( sectionCollapse ) 532 { 533 sectionClassList.AddClasses( "p-section-collapse js-p-section-collapse" ); 534 collapseToggleClassList.AddClasses( contentClasses ); 535 collapseToggleClassList.AddClasses( "p-section-collapse-toggle collapsed order-last text-center" ); 536 contentClassList.AddClasses( "p-section-collapse-content collapse is-md" ); 537 } 538539 @:<section class="@sectionClassList" id="@sectionId"> 540 @:<div class="container-fluid"> 541 @:<div class="row"> 542543 // TODO: Split collapse logic into separate helper function. 544 if ( sectionCollapse ) 545 { 546 <div class="@collapseToggleClassList" data-toggle="collapse" data-target="#@collapseId"> 547 <button class="btn btn-primary p-section-collapse-toggle-btn" type="button"> 548 <i class="material-icons p-section-collapse-toggle-icon">keyboard_arrow_down</i> 549 </button> 550 <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> 551 </div> 552 } 553554 @:<div class="@contentClassList" id="@collapseId"> 555 @:<div class="row"> 556 } 557558 @helper sectionEnd() 559 { 560 @:</div> 561 @:</div> 562 @:</div> 563 @:</div> 564 @:</section> 565 } 566567568569570571 <div class="e-loading-overlay e-page-loading-overlay is-loading js-e-page-loading-overlay"> 572 <svg class="e-loading-spinner isabella-loading-spinner-logo" viewbox="0 0 316.9 383"> 573 <path class="isabella-logo crown-top" d="M264.2,150.9l-30.5,45.4L220.2,57.9l-18.5-5l-45.4,122.8L113.7,52.9l-17,5L81.1,196.3l-27.7-46.1 574 c-10,5.1-10,5.1-10,5.1s0,0-5.7,3.4c14.9,39.8,28.4,91.6,35.5,142c45.4-11.4,120.7-12.8,168.3-1.4c8.5-47.6,22-102.9,37.6-140.6 575 L264.2,150.9z"></path> 576 <path class="isabella-logo crown-bottom" d="M76.1,324.8c64.6-14.2,102.2-14.2,163.3-0.7c-2.1,21.3-4.3,40.5-5.7,57.5c-43.3-9.2-105.1-9.2-154.1,1.4 577 C79.6,364.6,78.2,345.4,76.1,324.8"></path> 578 <path class="isabella-logo circle-1" d="M54,153.1c0,0,19-23-1.9-44S0.7,110.7,0,127.7s10.4,25.4,10.4,25.4S33.8,172.8,54,153.1z"></path> 579 <path class="isabella-logo circle-3" d="M241.2,52.4c0,0,19-23-1.9-44s-51.4,1.6-52.1,18.6s10.4,25.4,10.4,25.4S221,72.2,241.2,52.4z"></path> 580 <path class="isabella-logo circle-4" d="M309,110.4c0,0,19,23-1.9,44s-51.4-1.6-52.1-18.6c-0.6-17.1,10.4-25.4,10.4-25.4S288.8,90.7,309,110.4z"></path> 581 <path class="isabella-logo circle-2" d="M122.1,8.8c0,0,19,23-1.9,44s-51.4-1.6-52.1-18.6S78.5,8.8,78.5,8.8S101.9-11,122.1,8.8z"></path> 582 </svg> 583584585 </div> 586 @* https://medium.com/clio-calliope/making-google-fonts-faster-aadf3c02a36d *@ 587 @SnippetStart("webfonts") 588 <link crossorigin="" href="https://fonts.gstatic.com/" rel="preconnect"> 589 <link href="https://fonts.googleapis.com/css?family=IBM+Plex+Sans:400,700%7CMaterial+Icons" media="@Espresso.StylesheetAttributeMedia" rel="@Espresso.StylesheetAttributeRel" as="style"> 590 @SnippetEnd("webfonts") 591592593594 <div class="@Espresso.Canvas.ClassList"> 595 @using Co3.Espresso.Website.Models.FrontEnd 596 @using Dynamicweb.Ecommerce.Orders 597 @using Dynamicweb.Frontend 598 @using Dynamicweb.Frontend.Navigation 599 @{ 600 ClassList headerClassList = new ClassList(); 601 headerClassList.AddClasses( "e-header js-e-header is-sticky" ); 602 if ( Espresso.Item.HeaderTransparent == "True" ) 603 { 604 headerClassList.AddClasses( "is-transparent" ); 605 } 606607 ClassList logoClassList = new ClassList(); 608 logoClassList.AddClasses( "e-logo" ); 609610 string backButtonLink = Espresso.Item.BackButtonLink; 611 ClassList backButtonClassList = new ClassList(); 612 ClassList backButtonIconClassList = new ClassList(); 613 if ( Espresso.Item.BackButton == "True" ) 614 { 615 backButtonClassList.AddClasses( "btn btn-sm btn-secondary my-1 align-self-center" ); 616 if ( backButtonLink == "" || backButtonLink == "/" ) 617 { 618 backButtonLink = "/"; 619 backButtonClassList.AddClasses( "js-e-back-link" ); 620 } 621 backButtonIconClassList.AddClasses( "material-icons material-icons-large" ); 622 if ( Espresso.Item.BackButtonPosition == "right" ) 623 { 624 backButtonClassList.AddClasses( "mr-0 ml-auto order-last" ); 625 logoClassList.AddClasses( "order-first" ); 626 } 627 else 628 { 629 backButtonClassList.AddClasses( "order-first" ); 630 logoClassList.AddClasses( "mr-0 ml-auto order-last" ); 631 } 632 if ( Espresso.Item.BackButtonIcon == "arrow_back" ) 633 { 634 backButtonClassList.AddClasses( "arrow-left" ); 635 backButtonIconClassList.AddClasses( "d-none" ); 636 } 637 else if ( Espresso.Item.BackButtonIcon == "arrow_forward" ) 638 { 639 backButtonClassList.AddClasses( "arrow-right" ); 640 backButtonIconClassList.AddClasses( "d-none" ); 641 } 642 } 643644 string logoPrimary = Espresso.Area.Item.LogoPrimary; 645 string logoSecondary = Espresso.Area.Item.LogoSecondary; 646647 if ( string.IsNullOrEmpty( logoSecondary ) == true ) 648 { 649 logoSecondary = logoPrimary; 650 } 651 string tagline = Espresso.Area.Item.Tagline; 652653 Dictionary< string, string > navigationHtml = new Dictionary< string, string > 654 { 655 { 656 "global", Navigation.RenderNavigation( "navigation/espresso.cshtml", new NavigationSettings() 657 { 658 StartLevel = 1, 659 StopLevel = 8, 660 ExpandMode = ExpandMode.All, 661 Parameters = new Dictionary< string, object >() 662 { 663 { "id", "dwnav-global" } 664 } 665 } ) 666 }, 667 { 668 "utilities-primary", Navigation.RenderNavigation( "navigation/espresso.cshtml", new NavigationSettings() 669 { 670 StartLevel = 4, 671 StopLevel = 5, 672 ExpandMode = ExpandMode.All, 673 RootNavigationTag = "utilities-primary", 674 Parameters = new Dictionary< string, object >() 675 { 676 { "id", "dwnav-utilities-primary" } 677 } 678 } ) 679 }, 680 { 681 "utilities-secondary", Navigation.RenderNavigation( "navigation/espresso.cshtml", new NavigationSettings() 682 { 683 StartLevel = 4, 684 StopLevel = 4, 685 ExpandMode = ExpandMode.All, 686 RootNavigationTag = "utilities-secondary", 687 Parameters = new Dictionary< string, object >() 688 { 689 { "id", "dwnav-utilities-secondary" } 690 } 691 } ) 692 }, 693 { 694 "hamburger-header", Navigation.RenderNavigation( "navigation/espresso.cshtml", new NavigationSettings() 695 { 696 StartLevel = 4, 697 StopLevel = 4, 698 ExpandMode = ExpandMode.All, 699 RootNavigationTag = "hamburger-header", 700 Parameters = new Dictionary< string, object >() 701 { 702 { "id", "dwnav-hamburger-header" } 703 } 704 } ) 705 }, 706 { 707 "hamburger-aside", Navigation.RenderNavigation( "navigation/espresso.cshtml", new NavigationSettings() 708 { 709 StartLevel = 4, 710 StopLevel = 4, 711 ExpandMode = ExpandMode.All, 712 RootNavigationTag = "hamburger-aside", 713 Parameters = new Dictionary< string, object >() 714 { 715 { "id", "dwnav-hamburger-aside" } 716 } 717 } ) 718 } 719 }; 720721 double cartQuantity = 0; 722 var areaCartContext = PageView.Current().Area.Item[ "ContextCart" ]?.ToString(); 723724 Dynamicweb.Ecommerce.Common.Context.CartContext = OrderContext.GetOrderContextById(areaCartContext); 725 Order cart = Dynamicweb.Ecommerce.Common.Context.Cart; 726 if (cart != null ) 727 { 728 cartQuantity = cart.get_ParentProductLineQuantityCount(cart.ProductOrderLines); 729 } 730 } 731732 @SnippetStart("CartQuantity") 733 @cartQuantity 734 @SnippetEnd("CartQuantity") 735736 @if ( Espresso.Item.HeaderHide != "True" ) 737 { 738 <header class="@headerClassList" data-autohide="true"> 739740 <div class="e-header-hamburger"> 741 @sectionStart( "e-header-section e-section", "col-12" ) 742 <div class="col-12 e-header-section-content"> 743 <div class="@logoClassList"> 744 <a class="e-logo-link" href="/@globalAreaName/"> 745 <img src="@logoPrimary" class="e-logo-img e-logo-img-primary" alt="@Espresso.Area.Item.CompanyName"> 746 <img src="@logoSecondary" class="e-logo-img e-logo-img-secondary" alt="@Espresso.Area.Item.CompanyName"> 747 @if ( string.IsNullOrEmpty( tagline ) == false ) 748 { 749 <p class="e-logo-tagline">@tagline</p> 750 } 751 </a> 752 </div> 753 @if ( Espresso.Item.NavigationHide != "True" ) 754 { 755 <section class="e-nav-hamburger-header"> 756 <ul class="nav"> 757 @navigationHtml[ "hamburger-header" ] 758 @* TODO: Move to xslt *@ 759 <li class="e-nav-item-hamburger-open nav-item"> 760 <a class="nav-link" data-target=".modal.e-nav" data-toggle="modal" href="#"> 761 <i class="e-nav-pageicon material-icons">menu</i> 762 <span class="e-nav-pagename">@Translate( "Header - Hamburger menu open - Button", "Menu" )</span> 763 </a> 764 </li> 765 </ul> 766 </section> 767 } 768 @if ( Espresso.Item.BackButton == "True" ) 769 { 770 <a class="@backButtonClassList" href="@backButtonLink"> 771 @if ( Espresso.Item.BackButtonIcon != "" ) 772 { 773 <i class="@backButtonIconClassList">@Espresso.Item.BackButtonIcon</i> 774 } 775 @Espresso.Item.BackButtonText 776 </a> 777 } 778 </div> 779 @sectionEnd() 780 </div> 781 <div class="e-nav js-e-nav modal p-0" data-backdrop="false"> 782 <div class="e-nav-container navbar flex-column d-flex"> 783784 @sectionStart( "e-header-section e-header-section-primary e-section order-xl-2", "col-12" ) 785 <div class="col-12 e-header-section-content"> 786 <div class="@logoClassList"> 787 <a class="e-logo-link" href="/@globalAreaName/"> 788 <img src="@logoPrimary" class="e-logo-img e-logo-img-primary" alt="@Espresso.Area.Item.CompanyName"> 789 <img src="@logoSecondary" class="e-logo-img e-logo-img-secondary" alt="@Espresso.Area.Item.CompanyName"> 790 @if (string.IsNullOrEmpty(tagline) == false) 791 { 792 <p class="e-logo-tagline">@tagline</p> 793 } 794 </a> 795 </div> 796797 @if ( Espresso.Item.NavigationHide != "True" ) 798 { 799 <nav class="e-nav-global js-e-nav-global"> 800 <ul class="nav"> 801 @navigationHtml[ "global" ] 802 </ul> 803 </nav> 804805 <div class="e-nav-item-hamburger-close"> 806 <a class="nav-link" data-target=".modal.e-nav" data-toggle="modal" href="#"> 807 <i class="e-nav-pageicon material-icons">close</i> 808 <span class="e-nav-pagename">@Translate( "Header - Hamburger menu close - Button", "Close" )</span> 809 </a> 810 </div> 811812 if ( string.IsNullOrEmpty( navigationHtml[ "utilities-primary" ] ) == false ) 813 { 814 @:</div> 815 @sectionEnd() 816 @sectionStart( "e-header-section e-header-section-secondary e-section order-xl-1", "col-12" ) 817 @:<div class="col-12 e-header-section-content"> 818819 <nav class="e-nav-utilities-primary js-e-nav-utilities-primary"> 820 <ul class="nav"> 821 @navigationHtml[ "utilities-primary" ] 822 </ul> 823 </nav> 824 } 825826 if ( string.IsNullOrEmpty( navigationHtml[ "utilities-secondary" ] ) == false ) 827 { 828 <nav class="e-nav-utilities-secondary"> 829 <ul class="nav"> 830 @navigationHtml[ "utilities-secondary" ] 831 </ul> 832 </nav> 833 } 834 if ( string.IsNullOrEmpty( navigationHtml[ "hamburger-aside" ] ) == false ) 835 { 836 <nav class="e-nav-hamburger-aside"> 837 <ul class="nav"> 838 @navigationHtml[ "hamburger-aside" ] 839 </ul> 840 </nav> 841 } 842 } 843 @if ( Espresso.Item.BackButton == "True" ) 844 { 845 <a class="@backButtonClassList" href="@backButtonLink"> 846 @if ( Espresso.Item.BackButtonIcon != "" ) 847 { 848 <i class="@backButtonIconClassList">@Espresso.Item.BackButtonIcon</i> 849 } 850 @Espresso.Item.BackButtonText 851 </a> 852 } 853 </div> 854 @sectionEnd() 855856 </div> 857 </div> 858859 </header> 860 } 861862 @helper GetSvgFileData(string svgfile) 863 { 864 string rtnValue = svgfile; 865 if (!string.IsNullOrEmpty(svgfile)) 866 { 867 string FilePath = svgfile; 868869 if (System.IO.Path.GetExtension(FilePath) == ".svg") 870 { 871 System.Xml.XmlReaderSettings settings = new System.Xml.XmlReaderSettings(); 872 settings.DtdProcessing = System.Xml.DtdProcessing.Ignore; 873 string svgFilePath = System.Web.HttpContext.Current.Server.MapPath(FilePath) ?? string.Empty; 874 if (System.IO.File.Exists(svgFilePath)) 875 { 876 using (System.IO.StreamReader sr = new System.IO.StreamReader(svgFilePath)) 877 { 878 using (System.Xml.XmlReader xr = System.Xml.XmlReader.Create(sr, settings)) 879 { 880 bool done = false; 881 while (xr.Read() && !done) 882 { 883 if (xr.NodeType == System.Xml.XmlNodeType.Element && xr.Name == "svg") 884 { 885 rtnValue = xr.ReadOuterXml(); 886 done = true; 887 } 888 } 889 } 890 } 891 } 892 } 893 } 894 @rtnValue; 895 } 896897898 @*General - Website Settings*@ 899900 @if ( Espresso.Item.Notificationbar != "True" ) 901 { 902 if ( !string.IsNullOrEmpty(Espresso.Area.Item.NotificationbarPageId) ) 903 { 904 <section class="e-section"> 905 <div class="container-fluid"> 906 <div class="row"> 907 <div class="col-12"> 908 <div class="row"> 909 @RenderPageContent(int.Parse(Espresso.Area.Item.NotificationbarPageId)) 910 </div> 911 </div> 912 </div> 913 </div> 914 </section> 915 } 916 } 917918 @*Specific - Page*@ 919920 @if ( !string.IsNullOrEmpty(Espresso.Item.NotificationbarPageId) ) 921 { 922 <section class="e-section"> 923 <div class="container-fluid"> 924 <div class="row"> 925 <div class="col-12"> 926 <div class="row"> 927 @RenderPageContent(int.Parse(Espresso.Item.NotificationbarPageId)) 928 </div> 929 </div> 930 </div> 931 </div> 932 </section> 933 } 934 @using Dynamicweb.Frontend 935 @using Dynamicweb.Security.UserManagement 936 @{ 937 User currentUser = PageView.Current().User; 938 if ( currentUser != null ) 939 { 940 User currentSecondaryUser = currentUser.CurrentSecondaryUser; 941 if ( currentSecondaryUser != null ) 942 { 943 @sectionStart( "e-section bg-warning e-text-dark js-e-section is-sticky zi-fixed py-1", "col-12 small" ) 944 <div class="align-self-center col-12 col-lg-9 col-md-8"> 945 <p class="line-height-sm mb-1 mb-md-0 text-center text-md-left"> 946 <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> 947 </p> 948 </div> 949 <div class="align-self-center col-12 col-lg-3 col-md-4"> 950 <form class="mb-0 small text-center text-md-right" method="post" action="@Espresso.Area.Item.ExtranetImpersonationPage"> 951 <button class="btn btn-primary" name="DwExtranetRemoveSecondaryUser" type="submit">@Translate( "Extranet Impersonation - Stop impersonation - Button", "Stop impersonation" )</button> 952 </form> 953 </div> 954 @sectionEnd() 955 } 956 } 957 } 958959960 <main id="dwcontentmain" class="e-content js-e-content @Espresso.ContentArea.ClassList"> 961 @using Dynamicweb.Content; 962 @using Dynamicweb.Extensibility; 963 @{ 964 string eBreadcrumbClasslist = "e-breadcrumb js-e-breadcrumb d-none d-lg-block"; 965 if ( Espresso.Item.Breadcrumb != "auto" && Espresso.Item.Breadcrumb != "none" && String.IsNullOrEmpty( Espresso.Item.Breadcrumb ) == false ) 966 { 967 eBreadcrumbClasslist += string.Format( " e-breadcrumb-{0}", Espresso.Item.Breadcrumb ); 968 } 969 string navigationHtmlBreadcrumb = RenderNavigation( new 970 { 971 id = "dwnav-breadcrumb", 972 template = "breadcrumb.xslt", 973 startlevel = 1, 974 endlevel = 10, 975 expandmode = "pathonly", 976 sitemapmode = true 977 } ); 978 } 979980 @if ( string.IsNullOrEmpty( navigationHtmlBreadcrumb ) == false && Espresso.Item.Breadcrumb != "none" && string.IsNullOrEmpty( Espresso.Item.Breadcrumb ) == false ) 981 { 982 <section class="e-section @eBreadcrumbClasslist"> 983 <div class="container-fluid"> 984 <div class="row"> 985 <div class="col-12"> 986 <div class="row"> 987988 <div class="col-12"> 989 <nav class="e-breadcrumb-container"> 990 <ol class="breadcrumb nav text-muted" itemscope="" itemtype="https://schema.org/BreadcrumbList"> 991 <li class="breadcrumb-item m-0 p-0"> 992 <a class="arrow-left breadcrumb-back-link js-e-back-link px-0" href="/">@Translate( "Breadcrumb - Back link", "Back" )</a> 993 <span class="breadcrumb-prefix-text"> 994 @Translate( "Breadcrumb - Prefix - Text", "You are here:" ) 995 </span> 996 <a href="/"> 997 @ServiceLocator.Current.GetPageService().GetFirstPageForArea( GetInteger( "DwAreaID" ) ).MenuText 998 </a> 999 </li> 1000 @navigationHtmlBreadcrumb 1001 </ol> 1002 </nav> 1003 </div> 10041005 </div> 1006 </div> 1007 </div> 1008 </div> 1009 </section> 1010 } 101110121013 <article class="e-content-article"> 1014 @{ 1015 int NavigationLocalHorizontalParentPageId = 0; 1016 if ( !string.IsNullOrEmpty( Espresso.Item.NavigationLocalParentPage ) ) 1017 { 1018 int.TryParse( Espresso.Item.NavigationLocalParentPage, out NavigationLocalHorizontalParentPageId ); 1019 } 1020 if ( NavigationLocalHorizontalParentPageId == 0 ) 1021 { 1022 NavigationLocalHorizontalParentPageId = PageView.Current().Page.ID; 1023 if ( !Dynamicweb.Services.Pages.GetPagesByParentID( NavigationLocalHorizontalParentPageId ).Any() ) 1024 { 1025 NavigationLocalHorizontalParentPageId = PageView.Current().Page.ParentPageId; 1026 } 1027 } 1028 string NavigationLocalHorizontalClassList = "e-nav-local e-nav-local-horizontal js-e-nav-local-horizontal"; 1029 string NavigationLocalHorizontalContainerClassList = "e-nav-local-container"; 1030 string NavigationLocalHorizontalTemplate = "local-" + Espresso.Item.NavigationLocalLayout + ".xslt"; 1031 if ( string.IsNullOrEmpty( Espresso.Item.NavigationLocalTemplate ) == false && Path.GetExtension( Espresso.Item.NavigationLocalTemplate ) == ".xslt" ) 1032 { 1033 NavigationLocalHorizontalTemplate = Path.GetFileName( Espresso.Item.NavigationLocalTemplate ); 1034 } 10351036 if ( Espresso.Item.NavigationLocalShow == "True" && Espresso.Item.NavigationLocalLayout == "horizontal" ) 1037 { 1038 NavigationLocalHorizontalClassList += " " + Espresso.Item.NavigationLocalCustomClasses; 1039 if ( Espresso.Item.NavigationLocalSticky == "True" ) 1040 { 1041 NavigationLocalHorizontalClassList += " is-sticky"; 1042 } 1043 if ( Espresso.Item.NavigationLocalAbsolute == "True" ) 1044 { 1045 NavigationLocalHorizontalClassList += " is-absolute"; 1046 } 1047 else 1048 { 1049 if ( Espresso.Item.NavigationLocalMarginTop != "0" && Espresso.Item.NavigationLocalMarginTop != "" ) 1050 { 1051 NavigationLocalHorizontalClassList += " mt-" + Espresso.Item.NavigationLocalMarginTop; 1052 } 1053 if ( Espresso.Item.NavigationLocalMarginBottom != "0" && Espresso.Item.NavigationLocalMarginBottom != "" ) 1054 { 1055 NavigationLocalHorizontalClassList += " mb-" + Espresso.Item.NavigationLocalMarginBottom; 1056 } 1057 } 1058 } 1059 } 1060 @if ( Espresso.Item.NavigationLocalShow == "True" && Espresso.Item.NavigationLocalLayout == "horizontal" ) 1061 { 1062 <section class="e-section @NavigationLocalHorizontalClassList"> 1063 <div class="container-fluid"> 1064 <div class="row"> 1065 <div class="col-12"> 1066 <div class="row"> 10671068 <div class="col-12"> 1069 <nav id="dwnav-local-horizontal-@NavigationLocalHorizontalParentPageId" class="@NavigationLocalHorizontalContainerClassList"> 1070 <ul class="justify-content-start nav"> 1071 @if ( Espresso.Item.NavigationLocalHeading != "" ) 1072 { 1073 <li class="e-nav-local-heading"> 1074 <h2>@Espresso.Item.NavigationLocalHeading</h2> 1075 </li> 1076 } 1077 @RenderNavigation( new 1078 { 1079 id = "dwnav-local-horizontal-" + NavigationLocalHorizontalParentPageId, 1080 parentid = NavigationLocalHorizontalParentPageId, 1081 template = NavigationLocalHorizontalTemplate, 1082 startlevel = Espresso.Item.NavigationLocalLevelStart, 1083 endlevel = Espresso.Item.NavigationLocalLevelEnd, 1084 expandmode = Espresso.Item.NavigationLocalPageTreeExpand == "True" ? "all" : "path" 1085 } ) 1086 </ul> 1087 </nav> 1088 </div> 10891090 </div> 1091 </div> 1092 </div> 1093 </div> 1094 </section> 1095 } 109610971098 @{ 1099 int NavigationLocalVerticalParentPageId = 0; 1100 if ( !string.IsNullOrEmpty( Espresso.Item.NavigationLocalParentPage ) ) 1101 { 1102 int.TryParse( Espresso.Item.NavigationLocalParentPage, out NavigationLocalVerticalParentPageId ); 1103 } 1104 if ( NavigationLocalVerticalParentPageId == 0 ) 1105 { 1106 NavigationLocalVerticalParentPageId = PageView.Current().Page.ID; 1107 if ( !Dynamicweb.Services.Pages.GetPagesByParentID( NavigationLocalVerticalParentPageId ).Any() ) 1108 { 1109 NavigationLocalVerticalParentPageId = PageView.Current().Page.ParentPageId; 1110 } 1111 } 11121113 string NavigationLocalVerticalClassList = "e-nav-local e-nav-local-vertical js-e-nav-local-vertical"; 1114 string NavigationLocalVerticalContainerClassList = "e-nav-local-container"; 1115 string NavigationLocalVerticalTemplate = "local-" + Espresso.Item.NavigationLocalLayout + ".xslt"; 1116 if ( string.IsNullOrEmpty( Espresso.Item.NavigationLocalTemplate ) == false && Path.GetExtension( Espresso.Item.NavigationLocalTemplate ) == ".xslt" ) 1117 { 1118 NavigationLocalVerticalTemplate = Path.GetFileName( Espresso.Item.NavigationLocalTemplate ); 1119 } 11201121 if ( Espresso.Item.NavigationLocalShow == "True" && Espresso.Item.NavigationLocalLayout == "vertical" ) 1122 { 1123 NavigationLocalVerticalClassList += " " + Espresso.Item.NavigationLocalCustomClasses; 11241125 if ( Espresso.Item.NavigationLocalMarginTop != "0" && Espresso.Item.NavigationLocalMarginTop != "" ) 1126 { 1127 NavigationLocalVerticalClassList += " mt-" + Espresso.Item.NavigationLocalMarginTop; 1128 } 1129 if ( Espresso.Item.NavigationLocalMarginBottom != "0" && Espresso.Item.NavigationLocalMarginBottom != "" ) 1130 { 1131 NavigationLocalVerticalClassList += " mb-" + Espresso.Item.NavigationLocalMarginBottom; 1132 } 11331134 if ( Espresso.Item.NavigationLocalSticky == "True" ) 1135 { 1136 NavigationLocalVerticalClassList += " is-sticky"; 1137 } 11381139 if ( Espresso.Item.NavigationLocalAbsolute == "True" ) 1140 { 1141 NavigationLocalVerticalClassList += " is-absolute"; 1142 } 1143 else 1144 { 1145 Espresso.ContentSection.ClassList.Clear(); 1146 Espresso.ContentSection.ClassList.AddClasses( "wtf col-12 col-lg-9 ml-auto" ); 1147 } 1148 } 1149 } 11501151 @if ( Espresso.Item.NavigationLocalShow == "True" && Espresso.Item.NavigationLocalLayout == "vertical" ) 1152 { 1153 <section class="e-section @NavigationLocalVerticalClassList"> 1154 <div class="container-fluid"> 1155 <div class="row"> 1156 <div class="col-12"> 1157 <div class="row"> 11581159 <div class="col-3"> 1160 <nav id="dwnav-local-@NavigationLocalVerticalParentPageId" class="@NavigationLocalVerticalContainerClassList"> 1161 <ul class="flex-column nav"> 1162 @if ( Espresso.Item.NavigationLocalHeading != "" ) 1163 { 1164 <li class="e-nav-local-heading"> 1165 <h2>@Espresso.Item.NavigationLocalHeading</h2> 1166 </li> 1167 } 1168 @RenderNavigation( new 1169 { 1170 id = "dwnav-local-" + NavigationLocalVerticalParentPageId, 1171 parentid = NavigationLocalVerticalParentPageId, 1172 template = NavigationLocalVerticalTemplate, 1173 startlevel = Espresso.Item.NavigationLocalLevelStart, 1174 endlevel = Espresso.Item.NavigationLocalLevelEnd, 1175 expandmode = Espresso.Item.NavigationLocalPageTreeExpand == "True" ? "all" : "path", 1176 } ) 1177 </ul> 1178 </nav> 1179 </div> 11801181 </div> 1182 </div> 1183 </div> 1184 </div> 1185 </section> 1186 } 118711881189 @sectionStart() 1190 @GetValue("DwContent(dwcontentmain)") 1191 @sectionEnd() 1192 </article> 1193 </main> 1194 @using Dynamicweb.Frontend 1195 @{ 1196 string FooterContentClassList = "e-footer-content e-section"; 11971198 bool isOutlet = shopType == "Outlet"; 1199 } 1200 @if ( Espresso.Item.FooterHide != "True" ) 1201 { 1202 <footer class="e-footer"> 1203 <article class="e-footer-wrapper"> 1204 <section class="@FooterContentClassList"> 1205 <div class="container-fluid"> 1206 <div class="row"> 1207 @if ( !string.IsNullOrEmpty( Espresso.Area.Item.FooterPageId ) ) 1208 { 1209 @RenderPageContent( int.Parse( Espresso.Area.Item.FooterPageId ) ) 1210 } 1211 </div> 1212 </div> 1213 </section> 1214 @if (!isOutlet) 1215 { 1216 <section class="e-footer-copyright e-section"> 1217 <div class="container-fluid"> 1218 <div class="align-items-baseline row"> 1219 <div class="col-12 col-lg-5"> 1220 @if (string.IsNullOrEmpty(Espresso.Area.Item.Adresse) == false) 1221 { 1222 @Espresso.Area.Item.Adresse 1223 } 1224 </div> 12251226 <div class="col-12 col-lg-4"> 1227 @if (string.IsNullOrEmpty(GetString("DwNavigation(dwnavutilitiessecondaryfooter)")) == false) 1228 { 1229 <div class="col-12 p-0"> 1230 <aside class="e-nav-utilities-secondary"> 1231 <ul class="nav nav-inline"> 1232 @GetValue("DwNavigation(dwnavutilitiessecondaryfooter)") 1233 </ul> 1234 </aside> 1235 </div> 1236 } 1237 </div> 123812391240 <div class="col-12 col-lg-3 text-lg-right"> 1241 <p class="e-copyright nav-link"> 1242 @*@Translate( "Footer - Copyright - Text", "Copyright &copy;" )&nbsp;*@ 1243 @*@DateTime.Now.Year.ToString()&nbsp;*@ 1244 @Translate("Footer - All Rights Reserved - Text", "All rights reserved.")&nbsp; 1245 @Espresso.Area.Item.CompanyName.&nbsp; 1246 </p> 1247 </div> 1248 </div> 1249 </div> 1250 </section> 1251 } 1252 </article> 1253 </footer> 1254 } 1255 @if( string.IsNullOrEmpty( GetString("DwContent(dwcontentcta)") ) == false ) { 1256 <aside id="dwcontentcta" class="js-e-cta e-cta is-hidden fixed-top"> 1257 <section class="e-section"> 1258 <div class="container-fluid"> 1259 <div class="row no-gutters"> 1260 <div class="col-12"> 1261 <div class="row no-gutters justify-content-center align-items-center"> 1262 @GetValue("DwContent(dwcontentcta)") 1263 @* <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> *@ 1264 </div> 1265 </div> 1266 </div> 1267 </div> 1268 </section> 1269 </aside> 1270 } 12711272 @using Dynamicweb.Frontend 12731274 @{ 1275 string cartUrl = "/cart"; 12761277 if ( PageView.Current().Area.Name.Contains( "webshop" ) == false ) 1278 { 1279 cartUrl = string.Format("{0}{1}", PageView.Current().Area.Name, cartUrl); 1280 } 1281 else 1282 { 1283 cartUrl = string.Format("{0}/shop{1}", PageView.Current().Area.Name.ToLower(), cartUrl); 1284 } 12851286 var ShopType = PageView.Current().Area.Item["ShopType"]; 1287 } 1288 <div class="e-cart-msg modal fade small" id="js-e-cart-msg" data-backdrop="false"> 1289 <div class="modal-dialog e-cart-msg-modal-dialog"> 1290 <div class="modal-content"> 1291 <div class="modal-header"> 1292 <h4 class="js-e-cart-msg-heading modal-title"> 1293 <i class="material-icons material-icons-large text-success">check_circle</i> 1294 <span>@Translate( "eCom Cart - Product Added - Heading", "Added to your cart" )</span> 1295 </h4> 1296 <button class="close" data-dismiss="modal" type="button"> 1297 <i class="material-icons">close</i> 1298 </button> 1299 </div> 1300 <div class="modal-body"> 1301 <div class="js-e-cart-msg-content"> 1302 <script id="js-e-handlebars-tmpl-cart-msg-lastadded" type="text/x-handlebars-template"> 1303 <div class="row"> 1304 {{#each cart.lastAdded}} 1305 <div class="col-12 py-1"> 1306 <div class="row"> 1307 <div class="col-4"> 1308 <a class="" href="{{url}}"> 1309 <img alt="" class="img-fluid" src="{{imageDefault}}"> 1310 </a> 1311 </div> 1312 <div class="col-8"> 1313 <h3 class="mb-0"> 1314 <a href="{{url}}" class="text-decoration-none">{{name}}</a> 1315 </h3> 1316 <p class="mb-0"> 1317 <a href="{{url}}" class="text-auto text-decoration-none"> 1318 {{{price}}} 1319 @if (ShopType?.ToString() != "B2C") 1320 { 1321 <span> 1322 <br> 1323 {{{stock.text}}}<br> 1324 {{{stock.delivery}}}<br> 1325 </span> 1326 } 13271328 </a> 1329 </p> 1330 </div> 1331 </div> 1332 </div> 1333 {{/each}} 1334 </div> 1335 </script> 1336 </div> 1337 </div> 1338 <div class="bg-info e-cart-msg-footer modal-footer border-top-0"> 1339 <a class="btn btn-secondary mr-1" href="/" data-dismiss="modal">@Translate( "eCom Cart - Continue Shopping - Button", "Continue shopping" )</a> 1340 <a class="arrow-right btn btn-primary" href="@cartUrl">@Translate( "eCom Cart - Checkout - Button", "Checkout" )</a> 1341 </div> 1342 </div> 1343 </div> 1344 </div> 13451346 </div> 13471348 @using Co3.Espresso.Base.Extensions 1349 @using Co3.Espresso.Website.Services 1350 @using Dynamicweb.Frontend 13511352 <div class="modal fade e-search js-e-search js-e-search-modal modal-fullscreen" data-backdrop="false" data-keyboard="true" data-focus="true"> 1353 <div class="modal-dialog"> 1354 <div class="modal-content"> 135513561357 <div class="modal-header"> 1358 <a class="btn btn-sm btn-secondary js-e-back-link arrow-left" href="/" data-dismiss="modal"> 1359 @Translate("Search - Back button", "Back") 1360 </a> 1361 <div class="e-logo"> 1362 <a href="/" class="e-logo-link my-0"> 1363 <img src="@logoPrimary" class="e-logo-img e-logo-img-primary" alt="@Espresso.Area.Item.CompanyName"> 1364 <img src="@logoSecondary" class="e-logo-img e-logo-img-secondary" alt="@Espresso.Area.Item.CompanyName"> 1365 </a> 1366 </div> 1367 </div> 13681369 <div class="modal-body"> 13701371 <div class="container-fluid"> 13721373 <div class="e-search-form-container"> 1374 <div class="row justify-content-center"> 1375 <div class="col-12 col-md-10 col-lg-8 col-xl-6 mt-3"> 1376 <form action="" class="e-search-form js-e-search-form"> 1377 <div class="js-e-search-input-group e-search-input-group is-empty"> 1378 <label class="e-search-label" for="e-search-input"><i class="material-icons">search</i></label> 1379 @{ string Translate_Search_InputText = Translate("Search - Input Placeholder - Text", "Search"); } 1380 <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"> 1381 <span class="js-e-search-clear e-search-clear"><i class="material-icons">close</i></span> 1382 <button class="e-search-submit btn btn-primary" type="submit"><i class="material-icons">search</i></button> 1383 </div> 1384 </form> 1385 </div> 1386 </div> 1387 </div> 13881389 <div class="js-e-search-result-container e-search-result-container"> 13901391 <div class="row justify-content-center"> 1392 <div class="col-12 col-md-10 col-lg-8 col-xl-6"> 1393 <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> 1394 </div> 1395 </div> 13961397 <div class="row justify-content-center"> 1398 <div class="col-12 col-xl-10"> 1399 <div class="js-e-search-result-products e-search-result-products is-empty mb-4"> 1400 @{string productlistItemClassList = ProductlistService.Instance.GetGridItemWidth(null).ToResponsiveClasses();} 1401 <script id="js-e-handlebars-tmpl-search-result-item-product" type="text/x-handlebars-template"> 1402 <div class="e-products"> 1403 <div class="row justify-content-center"> 1404 {{#each products}} 1405 <div class="@productlistItemClassList"> 1406 <div class="card border-1 mb-6"> 1407 <a href="{{url}}"> 1408 @if (Espresso.Item.ModelProductlist == "True") 1409 { 1410 <img src="{{productlistDetailImage}}" alt="{{name}}" class="col-12 p-0"> 1411 } 1412 else 1413 { 1414 <img src="{{imageDefault}}" alt="{{name}}" class="col-12 p-0"> 1415 } 1416 {{#if news}} 1417 <div class="isabella-product-item-news"> 1418 @Translate("Ecom Product - News Badge - Text", "Nyhed") 1419 </div> 1420 {{/if}} 1421 </a> 1422 <div class="card-body p-1 p-lg-3"> 1423 <h4 class="e-products-item-name mb-0"> 1424 <a href="{{url}}"> 1425 {{{name}}} 1426 </a> 1427 </h4> 1428 {{#if shortDescription}} 1429 {{{shortDescription}}} 1430 {{/if}} 1431 @* @if (PageView.Current().Area.Name.Contains("webshop") != false) 1432 { 1433 <p class="e-products-item-text mt-2 mb-0 @Co3.Isabella.Dw.Services.ProductService.Instance.GetNoBuyB2CandB2B()" style="display: flex"> 1434 <small class="e-products-item-price small"> 1435 <a href="{{url}}" class="text-dark" style="text-decoration: none"> 1436 {{#if pimActive}}{{{price}}}{{else}}@Translate("eCom Product - Add To Cart Form Table - Accessory Discontinued - Text", "Udgået"){{/if}} 1437 </a> 1438 </small> 1439 <a href="{{url}}" style="left: 0" class="isabella-arrow arrow-primary-small ml-auto"></a> 1440 </p> 1441 } 1442 *@ 1443 </div> 1444 </div> 1445 </div> 1446 {{/each}} 1447 </div> 1448 <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> 1449 </div> 1450 </script> 1451 </div> 1452 </div> 1453 </div> 14541455 <div class="row justify-content-center"> 1456 <div class="col-12 col-md-10 col-lg-8 col-xl-6"> 1457 <div class="js-e-search-result-pages e-search-result-pages is-empty mb-3"> 1458 <script id="js-e-handlebars-tmpl-search-result-item-page" type="text/x-handlebars-template"> 1459 <div class="row"> 1460 {{#each pages}} 1461 <div class="col-12"> 1462 <p class="mb-0"><a href="{{{url}}}" class="text-bold">{{{title}}}</a></p> 1463 <p class="mb-0 small text-truncate"> 1464 <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> 1465 <p class="small">{{{text}}}...</p> 1466 </div> 1467 {{/each}} 1468 </div> 1469 </script> 1470 </div> 1471 </div> 1472 </div> 14731474 <div class="js-e-search-loading-overlay e-loading-overlay e-search-loading-overlay"> 1475 <div class="e-loading-spinner"></div> 1476 </div> 14771478 </div> 14791480 </div> 1481 </div> 1482 </div> 1483 </div> 1484 </div> 14851486 @if( Espresso.Area.Item.BackToTopLink == "True" ){ 1487 <a href="#top" class="e-back-to-top js-e-back-to-top"><i class="material-icons">keyboard_arrow_up</i></a> 1488 } 148914901491 @* @using System.Web; 1492 @inherits Co3.Espresso.Website.TemplateBases.Pages.PageBase 14931494 @{ 1495 HttpCookie optInLevel = HttpContext.Current.Request.Cookies[ "Dynamicweb.CookieOptInLevel" ]; 1496 bool showCookieWarning = optInLevel == null; 1497 if ( optInLevel != null ) 1498 { 1499 showCookieWarning = optInLevel.Value != "2"; 1500 } 1501 } 15021503 @if ( showCookieWarning ) 1504 { 1505 <div class="e-cookie js-e-cookie py-1" hidden=""> 1506 <aside class="e-cookie-wrapper"> 1507 <section class="e-section"> 1508 <div class="container-fluid"> 1509 <div class="align-items-center row"> 1510 <div class="col-12 col-lg-10 col-md-9 my-1"> 1511 <p class="line-height-sm mb-0 small text-center text-md-left"> 1512 <span class="d-md-inline d-none"> 1513 @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" ) 1514 </span> 1515 <span class="d-md-none"> 1516 @Translate( "Cookie Warning - Message Short - Text", "This website uses cookies to improve your experience. Learn more about our" ) 1517 </span> 1518 &nbsp; 1519 <a href="@Espresso.Area.Item.CookieMessage">@Translate( "Cookie Warning - Policy - Link", "cookie policy" )</a> 1520 </p> 1521 </div> 1522 <div class="col-12 col-lg-2 col-md-3 my-1"> 1523 <p class="mb-0 text-center text-md-right"> 1524 <button class="btn e-cookie-accept-btn js-e-cookie-accept-btn" type="button"> 1525 @Translate( "Cookie Warning - Accept - Button", "OKAY" ) 1526 </button> 1527 </p> 1528 </div> 1529 </div> 1530 </div> 1531 </section> 1532 </aside> 1533 </div> 1534 } 15351536 @if ( 1 == 2 ) 1537 { 1538 @GetValue( "DwCookieWarning" ) 1539 } 15401541 *@ 15421543 <script data-cookieconsent="ignore" async="" src="/Files/Templates/Designs/isabella/_assets/_dist/js/default.js?v=3.1.1"></script> 1544 <script> 15451546 window.dataLayer.push({ 1547 'event':'ipEvent', 1548 'ipAddress' : '@Dynamicweb.Context.Current.Request.UserHostAddress' 1549 }); 1550 </script> 1551 </body> 15521553 @GetValue( "CopyRightNotice" ) 1554 </html> 1555