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_c34b8bf3a65744ef8b22b5fd41b7206b.Execute() in D:\dynamicweb.net\Solutions\isabella.espresso4.dk\files\Templates\Designs\isabella\_parsed\espresso.parsed.cshtml:line 40
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 string openGraphUrl = PageView.Current().SearchFriendlyUrl; 17 string openGraphImage = HttpContext.Current.Request.Url.Scheme + "://" + HttpContext.Current.Request.Url.Host + Espresso.OpenGraphImage; 18 bool isUserAuthenticated = PageView.Current().User != null; 19 string webfontsSnippetHtml = RenderSnippet( "webfonts" ).ToString().Trim(); 20 string customWebsite = PageView.Current().Area.Item["CustomWebsite"]?.ToString(); 21 string shopType = PageView.Current().Area.Item["ShopType"]?.ToString(); 22 string isOutletClass = shopType == "Outlet" ? "is-outlet" : string.Empty; 23 } 24 25 <!DOCTYPE html> 26 <html lang="@globalAreaLang" data-separator-integer="@currencySeparatorInteger" data-separator-decimal="@currencySeparatorDecimal" data-area="@globalAreaName" data-shop="@shopType"> 27 <head> 28 @GetValue( "CopyRightNotice" ) 29 <meta charset="utf-8"> 30 <meta content="width=device-width, initial-scale=1, shrink-to-fit=no, minimal-ui" name="viewport"> 31 <meta content="ie=edge" http-equiv="x-ua-compatible"> 32 <title>@GetValue("Title")</title> 33 @Espresso.CriticalCSS 34 @if ( webfontsSnippetHtml != "<!--$$Snippet(webfonts)-->" ) 35 { 36 @webfontsSnippetHtml 37 } 38 <link href="/Files/Templates/Designs/isabella/_assets/_dist/css/default.css?v=1.09" media="@Espresso.StylesheetAttributeMedia" rel="@Espresso.StylesheetAttributeRel" as="style"> 39 40 @Espresso.CriticalJS 41 @*<meta name="description" content="@Espresso.DynamicwebPage.Description">*@ 42 <link rel="shortcut icon" href="@Espresso.Area.Item.Favicon"> 43 @GetValue( "MetaTags" ) 44 @if ( Espresso.IsStagingUrl ) 45 { 46 <meta content="noindex,nofollow" name="robots"> 47 } 48 <meta property="og:url" content="@openGraphUrl"> 49 <meta property="og:title" content="@Espresso.OpenGraphTitle"> 50 <meta property="og:description" content="@Espresso.OpenGraphDescription"> 51 <meta property="og:image" content="@openGraphImage"> 52 <meta property="og:type" content="website"> 53 <meta name="facebook-domain-verification" content="8kymtn6m9jq0t3gqsk3y6dqbadc3qf"> 54 @if ( string.IsNullOrEmpty( Espresso.Area.Item.GoogleSiteVerification ) == false ) 55 { 56 <meta name="google-site-verification" content="@Espresso.Area.Item.GoogleSiteVerification"> 57 } 58 @{ 59 if ( 1 == 2 ) 60 { 61 @GetValue( "Stylesheets" ) 62 } 63 } 64 65 @inherits Co3.Espresso.Website.TemplateBases.Pages.PageBase 66 @using System.Web; 67 @using System.IO 68 @using Dynamicweb.Content 69 @using Dynamicweb.Content.Items 70 @using Dynamicweb.Rendering 71 @using Dynamicweb.Frontend 72 73 <!-- Hreflang --> 74 @{ 75 @* Get areas from service *@ 76 Dynamicweb.Content.AreaService areaService = new Dynamicweb.Content.AreaService(); 77 IList<Area> areas = areaService.GetAreas(); 78 @* Get current page's relation-text from page-item *@ 79 string currentPageRelation = PageView.Current().Page.Item["PageRelation"] != null ? PageView.Current().Page.Item["PageRelation"].ToString() : string.Empty; 80 @* Frontpage must have 'frontpage' as relation-text *@ 81 82 string frontpageRelation = "i-frontpage"; 83 int REDIRECT_ID = 1; 84 if (PageView.Current().Area.Item["CustomWebsite"] != null && PageView.Current().Area.Item["CustomWebsite"].ToString() == "timeout-website") 85 { 86 frontpageRelation = "t-frontpage"; 87 REDIRECT_ID = 63; 88 } 89 string domainBase = areas.FirstOrDefault( a => a?.ID == REDIRECT_ID ).DomainLock; 90 List<dynamic> areaInfoList = new List< dynamic >(); 91 92 @* Iterate areas *@ 93 foreach ( Area area in areas ) 94 { 95 if ( area.Active == true && area.ID != REDIRECT_ID ) 96 { 97 98 @* Get current area's culture *@ 99 string culture = area.Culture; 100 string name = area.Name; 101 @* Check for IsDefault Hreflang on area *@ 102 string isDefaultHrefLang = area.Item[ "IsDefaultHrefLang" ] != null ? area.Item[ "IsDefaultHrefLang" ].ToString() : string.Empty; 103 @* Check for override-culture text on area *@ 104 string hreflangCultureOverride = area.Item[ "HreflangLanguageOverride" ] != null ? area.Item[ "HreflangLanguageOverride" ].ToString() : string.Empty; 105106 string isWebsiteExcluded = area.Item["ExcludeFromHreflang"] != null ? area.Item["ExcludeFromHreflang"]?.ToString() : string.Empty; 107 @* Get scheme and domain *@ 108 string scheme = GetGlobalValue("Global:Request.Scheme"); 109 string domain = domainBase; 110 @* If we have a primary domain call pageservice and get pages *@ 111112 string productId = HttpContext.Current.Request[ "productid" ]; 113 if (string.IsNullOrEmpty(productId) == false) 114 { 115 if (PageView.Current().Page.Parent != null && PageView.Current().Page.Parent.Item != null && PageView.Current().Page.Parent.Item["PageRelation"] != null) 116 { 117 currentPageRelation = PageView.Current().Page.Parent.Item["PageRelation"].ToString(); 118 } 119120 } 121122 if ( string.IsNullOrEmpty(currentPageRelation) == false && string.IsNullOrEmpty(domain) == false ) 123 { 124125126 Dynamicweb.Content.PageService pageService = new Dynamicweb.Content.PageService(); 127 IEnumerable< Dynamicweb.Content.Page > pages = pageService.GetPagesByAreaID(area.ID); 128 @* Iterate pages in area - check if is active + has item + has item-pagerelation + item-pagerelation equals current pagerelation *@ 129 foreach ( Dynamicweb.Content.Page page in pages.Where(p => p.Published && p.Item != null && p.Item[ "PageRelation" ] != null && p.Item[ "PageRelation" ].ToString().Equals(currentPageRelation)) ) 130 { 131132 string url = string.Empty; 133 if ( string.IsNullOrEmpty(productId) == false ) 134 { 135 @* Build url to area product page *@ 136 string prodUrl = string.Format("Default.aspx?ID={0}&ProductId={1}", pageService.GetPagesByParentID(page.ID)?.FirstOrDefault()?.ID, productId); 137 url = string.Format("{0}://{1}{2}", scheme, domain, SearchEngineFriendlyURLs.GetFriendlyUrl(prodUrl, area.EcomLanguageId)); 138 } 139 else 140 { 141 @* Build url to area page *@ 142 url = string.Format("{0}://{1}{2}", scheme, domain, SearchEngineFriendlyURLs.GetFriendlyUrl(page.GetPageHrefValue())); 143 } 144 @* If our current page relation match frontpage - set link to domain only *@ 145 if ( currentPageRelation == frontpageRelation ) 146 { 147 url = string.Format("{0}://{1}/{2}", scheme, domain, name); 148 } 149150 @* If our area item has checked in Default hreflang, we render x-default link *@ 151 if ( isDefaultHrefLang == "True" ) 152 { 153 <link rel="alternate" hreflang="x-default" href="@url"> 154 } 155 @* If we have a value in the area-item to overrule the culture, override the value here *@ 156 if ( string.IsNullOrEmpty(hreflangCultureOverride) == false ) 157 { 158 culture = hreflangCultureOverride; 159 } 160 @* Render hreflang-link *@ 161 if ( isWebsiteExcluded != "True") 162 { 163 <link rel="alternate" hreflang="@culture.ToLower()" href="@url"> 164 } 165166 } 167 } 168 } 169 } 170171 } 172 <!-- End Hreflang --> 173174 <!-- Google Tag Manager --> 175 <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> 176 <!-- End Google Tag Manager --> 177178179 <meta name="p:domain_verify" content="f3602094bd5d9d79dad3925721bc1ae4"> 180 <meta name="msvalidate.01" content="DF1E6C310BF3052B5579FABC80E4444D"> 181 <!-- ActiveCampaign --> 182 <script type="text/javascript" defer=""> 183184 (function(e,t,o,n,p,r,i){e.visitorGlobalObjectAlias=n; 185 e[e.visitorGlobalObjectAlias]=e[e.visitorGlobalObjectAlias]||function(){(e[e.visitorGlobalObjectAlias].q=e[e.visitorGlobalObjectAlias].q||[]).push(arguments)}; 186 e[e.visitorGlobalObjectAlias].l=(new Date).getTime(); 187 r=t.createElement("script"); 188 r.src=o;r.async=true; 189 i=t.getElementsByTagName("script")[0]; 190 i.parentNode.insertBefore(r,i)})(window,document,"https://diffuser-cdn.app-us1.com/diffuser/diffuser.js","vgo"); 191 vgo('setAccount', '254430349'); 192 vgo('setTrackByDefault', true); 193 vgo('process'); 194 </script> 195 <!-- ActiveCampaign --> 196 <!-- Sleeknote --> 197 <script id="sleeknoteScript" type="text/javascript"> 198 (function () { 199 var sleeknoteScriptTag = document.createElement("script"); 200 sleeknoteScriptTag.type = "text/javascript"; 201 sleeknoteScriptTag.charset = "utf-8"; 202 sleeknoteScriptTag.src = ("//sleeknotecustomerscripts.sleeknote.com/861.js"); 203 var s = document.getElementById("sleeknoteScript"); 204 s.parentNode.insertBefore(sleeknoteScriptTag, s); 205 })(); 206 </script> 207 <!-- End of Sleeknote signup and lead generation tool - www.sleeknote.com --> 208209 </dynamic></head> 210211 <body class="@Espresso.Item.CustomClasses @customWebsite @isOutletClass" data-cart-currencycode="@Context.Currency.Code" data-shop-currencycode="@Pageview.Area.EcomCurrencyId" data-userauthenticated="@isUserAuthenticated.ToString().ToLower()"> 212 <!-- Google Tag Manager (noscript) --> 213 <noscript><iframe src="https://ss.isabella.net/ns.html?id=GTM-TT2Z6XF" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> 214 <!-- End Google Tag Manager (noscript) --> 215 @using Dynamicweb.Frontend 216 @inherits Co3.Espresso.Website.TemplateBases.Pages.PageBase 217 @{ 218 Espresso.Canvas.ClassList.AddClasses( "js-e-canvas is-loading" ); 219 if ( Espresso.Item.CanvasFullscreen == "True" ) 220 { 221 Espresso.Canvas.ClassList.AddClasses( "is-fullscreen" ); 222 } 223224 } 225226227228 @using System.Globalization 229 @using System.Security.Cryptography.X509Certificates 230 @using System.Web.Razor.Parser.SyntaxTree 231 @using Co3.Espresso.Base.Extensions 232 @using Co3.Espresso.Website.Models.FrontEnd 233 @using Co3.Espresso.Website.Services 234 @using Co3.Isabella.Dw.Models.FrontEnd.Ecommerce 235 @using Dynamicweb.Content 236 @using Dynamicweb.Ecommerce.Products 237 @using Dynamicweb.Frontend 238 @using Dynamicweb.Rendering 239 @using Dynamicweb.Rendering.Translation 240 @using Dynamicweb.SystemTools 241 @using EcomContext = Dynamicweb.Ecommerce.Common.Context 242 @using eProductService = Co3.Espresso.Website.Services.ProductService 243 @using Page = Dynamicweb.Content.Page 244 @using PageService = Dynamicweb.Content.PageService 245246 @functions { 247248 public string getCountryCodeFromArea(Area area) 249 { 250 RegionInfo regionInfo = new RegionInfo( area.CultureInfo.LCID ); 251 return regionInfo.TwoLetterISORegionName; 252 } 253254 public string getCheckoutSetup(string shopType = "") 255 { 256 bool isB2bCheckout = PageView.Current().User != null; 257 if (isB2bCheckout) 258 { 259 return "shipping,customer,approve"; 260 } else if (shopType == "B2C") 261 { 262 return "shipping,payment,approve"; 263 } else if (shopType == "Outlet") 264 { 265 return "shipping,customer,payment,approve"; 266 } 267268 return "customer,approve"; 269 } 270271 public static string GetStandardCollapseToggleTextExpand() 272 { 273 return "Se mere"; 274 } 275276 public static string GetStandardCollapseToggleTextCollapse() 277 { 278 return "Se mindre"; 279 } 280281 public string getModelTypeLink() 282 { 283 bool isUserAuthenticated = PageView.Current().User != null; 284 string eComCountryCode = PageView.Current().Area.Item[ "EcommerceCountryCode" ] != null ? PageView.Current().Area.Item[ "EcommerceCountryCode" ].ToString() : ""; 285 string returnValue = string.Empty; 286287 if ( isUserAuthenticated == false ) 288 { 289 if ( string.IsNullOrEmpty(eComCountryCode) == false) 290 { 291 { 292 returnValue = string.Format( "Ecom:Product.CategoryField.ModelType.ModelTypeLink_{0}.Value", eComCountryCode ); 293 } 294 } 295 else 296 { 297 returnValue = "Ecom:Product.CategoryField.ModelType.ModelTypeLink.Value"; 298 } 299 } 300 else 301 { 302 if ( string.IsNullOrEmpty(eComCountryCode) == false) 303 { 304 { 305 returnValue = string.Format( "Ecom:Product.CategoryField.ModelType.ModelTypeLinkB2B_{0}.Value", eComCountryCode ); 306 } 307 } 308 else 309 { 310 returnValue = "Ecom:Product.CategoryField.ModelType.ModelTypeLinkB2B.Value"; 311 } 312 } 313314 return returnValue; 315 } 316317 } 318319 @helper ProductDescription(string sectionClasses = "e-section", bool sectionCollapse = false, string contentClasses = null, string heading = null, string content = null, string collapseToggleTextExpand = null, string collapseToggleTextCollapse = null) 320 { 321 if ( string.IsNullOrEmpty( content ) == false ) 322 { 323 ClassList headingClassList = new ClassList(); 324 headingClassList.AddClasses( "col-12" ); 325 ClassList contentClassList = new ClassList(); 326 contentClassList.AddClasses( "col-12" ); 327328 @sectionStart( sectionClasses: sectionClasses, sectionCollapse: sectionCollapse, contentClasses: contentClasses, collapseToggleTextCollapse: collapseToggleTextCollapse, collapseToggleTextExpand: collapseToggleTextExpand ) 329330 if ( string.IsNullOrEmpty( heading ) == false ) 331 { 332 <div class="@headingClassList"> 333 <h2>@heading</h2> 334 </div> 335 } 336 <div class="@contentClassList"> 337 @content 338 </div> 339340 @sectionEnd() 341 } 342 } 343344345 @helper ProductVideo(string sectionClasses = "e-section", string contentClasses = null, string heading = null, string videoURL = null) 346 { 347 if ( string.IsNullOrEmpty( videoURL ) == false ) 348 { 349 ClassList headingClassList = new ClassList(); 350 headingClassList.AddClasses( "col-12" ); 351 ClassList contentClassList = new ClassList(); 352 contentClassList.AddClasses( "col-12" ); 353354355 @sectionStart( sectionClasses: sectionClasses, contentClasses: contentClasses ) 356357 if ( string.IsNullOrEmpty( heading ) == false ) 358 { 359 <div class="@headingClassList"> 360 <h2>@heading</h2> 361 </div> 362 } 363364 <div class="@contentClassList"> 365 <div class="embed-responsive embed-responsive-16by9 mb-2"> 366 <iframe class="embed-responsive-item" src="@videoURL" width="1080" height="608" frameborder="0" webkitallowfullscreen="" mozallowfullscreen="" allowfullscreen=""></iframe> 367 </div> 368 </div> 369 @sectionEnd() 370 } 371 } 372373 @helper ProductRelatedProducts(string sectionClasses = "e-section", bool sectionCollapse = false, string contentClasses = null, string heading = null, string content = null, string collapseToggleTextExpand = null, string collapseToggleTextCollapse = null, 374 IEnumerable< Product > productLoop = null) 375 { 376 if ( productLoop != null && productLoop.Any() == true ) 377 { 378 ClassList headingClassList = new ClassList(); 379 headingClassList.AddClasses( "col-12" ); 380 ClassList contentClassList = new ClassList(); 381 contentClassList.AddClasses( "col-12" ); 382383 @sectionStart( sectionClasses: sectionClasses, sectionCollapse: sectionCollapse, contentClasses: contentClasses, collapseToggleTextCollapse: collapseToggleTextCollapse, collapseToggleTextExpand: collapseToggleTextExpand ) 384385 if ( string.IsNullOrEmpty( heading ) == false ) 386 { 387 <div class="@headingClassList"> 388 <h4 class="isabella-text-bullets-left mb-3">@heading</h4> 389 </div> 390 } 391 <div class="@contentClassList"> 392 <div class="e-products mb-2"> 393 <div class="row"> 394 @{ 395 string productlistItemClassList = "col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3"; 396 } 397 @foreach ( Product product in productLoop.Where(p => p.Groups.Any(g => g.ShopId.Equals("SHOP1")) && (bool) p.GetCategoryValue( "ProductsGeneral", "PIMActive" ) != false && (bool) p.ShowInProductList == true && Co3.Isabella.Dw.Services.ProductService.Instance.IsProductAllowed(PageView.Current().User, p)) ) 398 { 399 @ProductlistItem(product, productlistItemClassList) 400 } 401 </div> 402 </div> 403 </div> 404405 @sectionEnd() 406 } 407 } 408409410 @helper ProductlistItem(Product product, string productlistItemClassList = null, string isModelProductList = null) 411 { 412 Dynamicweb.Ecommerce.Products.ProductService dwProductService = new Dynamicweb.Ecommerce.Products.ProductService(); 413 string shopType = PageView.Current().Area.Item["ShopType"]?.ToString(); 414 string productLink = eProductService.Instance.GetProductLink( product.GetDefaultGroupByShopId( product.DefaultShopId ).Id, product.Id, product.VariantId ); 415416417 productLink = SearchEngineFriendlyURLs.GetFriendlyUrl( productLink ); 418419 if (shopType == "Outlet") 420 { 421 Page page = new PageService().GetPageByNavigationTag(PageView.Current().AreaID, "outletdisplaypage"); 422 if (page != null) 423 { 424 productLink = SearchEngineFriendlyURLs.GetFriendlyUrl( $"Default.aspx?ID={page.ID}&productId={product.Id}" ); 425 } 426427 } 428429 string productlistDetailImage = product.Details.FirstOrDefault( pd => pd.Type == 0 && pd.GroupId == 4 )?.Value; 430431 if ( product != null ) 432 { 433 dynamic productData = new 434 { 435 id = product.Id, 436 url = productLink, 437 number = product.Number, 438 name = product.Name, 439 imageDefault = Co3.Isabella.Dw.Services.ImageService.Instance.GetImageURL( Dynamicweb.Ecommerce.Services.Details.GetDefaultDetail( product.Id, product.VariantId, 440 EcomContext.LanguageID )?.Value, 400, 225, 0, 75, "jpg", "/Files/Templates/Designs/isabella/_assets/img/NoImage.gif" ), 441 price = Co3.Isabella.Dw.Services.ProductService.Instance.GetPrice( product.Id ).Format(), 442 priceClean = Co3.Isabella.Dw.Services.ProductService.Instance.GetPrice( product.Id ).Price, 443 productIntroText = product.GetCategoryValue( "ProductsGeneral", "ProductIntroText" )?.ToString(), 444 news = product.GetCategoryValue( "ProductsGeneral", "News" )?.ToString(), 445 productType = product.GetCategoryValue( "ProductsGeneral", "ProductType" )?.ToString(), 446 isModelProductList = isModelProductList, 447 productlistDetailImage = Co3.Isabella.Dw.Services.ImageService.Instance.GetImageURL( productlistDetailImage ), 448 shopType 449 }; 450451 <div class="@productlistItemClassList"> 452 <div class="border-1 card mb-6"> 453 <a href="@productData.url"> 454 @if ( productData.isModelProductList == "True" ) 455 { 456 <img src="@productData.productlistDetailImage" alt="@productData.name @productData.productType" class="col-12 p-0"> 457 } 458 else 459 { 460 <img src="@productData.imageDefault" alt="@productData.name @productData.productType" class="col-12 p-0"> 461 } 462 @if ( productData.news == "True" ) 463 { 464 <div class="isabella-product-item-news"> 465 @Dynamicweb.Rendering.Translation.Translation.GetTranslation( "Ecom Product - News Badge - Text" ) 466 </div> 467 } 468 </a> 469 <div class="card-body p-1 p-lg-3"> 470 <h4 class="e-products-item-name mb-0"> 471 <a href="@productData.url"> 472 @productData.name 473 </a> 474 </h4> 475 @if ( string.IsNullOrEmpty( productData.productIntroText ) == false ) 476 { 477 @productData.productIntroText 478 } 479 </div> 480 </div> 481 </div> 482 } 483 } 484485486 @helper sectionStart(string sectionClasses = "e-section", string contentClasses = null, bool sectionCollapse = false, string sectionId = null, string collapseToggleTextExpand = null, string collapseToggleTextCollapse = null) 487 { 488 sectionId = string.IsNullOrEmpty( sectionId ) ? Guid.NewGuid().ToString( "N" ) : sectionId; 489 ClassList sectionClassList = new ClassList(); 490 sectionClassList.AddClasses( sectionClasses ); 491 ClassList contentClassList; 492493 if ( contentClasses == null ) 494 { 495 contentClassList = Co3.Espresso.Website.Services.PageService.Instance.GetResponsiveClassesFromPageItem( PageView.Current().Page.Item ); 496 } 497 else 498 { 499 contentClassList = new ClassList(); 500 contentClassList.AddClasses( contentClasses ); 501 } 502503 // TODO: Split collapse logic into separate helper function. 504 string collapseId = Guid.NewGuid().ToString( "N" ); 505 ClassList collapseToggleClassList = new ClassList(); 506 if ( sectionCollapse ) 507 { 508 sectionClassList.AddClasses( "p-section-collapse js-p-section-collapse" ); 509 collapseToggleClassList.AddClasses( contentClasses ); 510 collapseToggleClassList.AddClasses( "p-section-collapse-toggle collapsed order-last text-center" ); 511 contentClassList.AddClasses( "p-section-collapse-content collapse is-md" ); 512 } 513514 @:<section class="@sectionClassList" id="@sectionId"> 515 @:<div class="container-fluid"> 516 @:<div class="row"> 517518 // TODO: Split collapse logic into separate helper function. 519 if ( sectionCollapse ) 520 { 521 <div class="@collapseToggleClassList" data-toggle="collapse" data-target="#@collapseId"> 522 <button class="btn btn-primary p-section-collapse-toggle-btn" type="button"> 523 <i class="material-icons p-section-collapse-toggle-icon">keyboard_arrow_down</i> 524 </button> 525 <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> 526 </div> 527 } 528529 @:<div class="@contentClassList" id="@collapseId"> 530 @:<div class="row"> 531 } 532533 @helper sectionEnd() 534 { 535 @:</div> 536 @:</div> 537 @:</div> 538 @:</div> 539 @:</section> 540 } 541542543544545546 <div class="e-loading-overlay e-page-loading-overlay is-loading js-e-page-loading-overlay"> 547 <svg class="e-loading-spinner isabella-loading-spinner-logo" viewbox="0 0 316.9 383"> 548 <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 549 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 550 L264.2,150.9z"></path> 551 <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 552 C79.6,364.6,78.2,345.4,76.1,324.8"></path> 553 <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> 554 <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> 555 <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> 556 <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> 557 </svg> 558559560 </div> 561 @* https://medium.com/clio-calliope/making-google-fonts-faster-aadf3c02a36d *@ 562 @SnippetStart("webfonts") 563 <link crossorigin="" href="https://fonts.gstatic.com/" rel="preconnect"> 564 <link href="https://fonts.googleapis.com/css?family=IBM+Plex+Sans:400,700%7CMaterial+Icons" media="@Espresso.StylesheetAttributeMedia" rel="@Espresso.StylesheetAttributeRel" as="style"> 565 @SnippetEnd("webfonts") 566567568569 <div class="@Espresso.Canvas.ClassList"> 570 @using Co3.Espresso.Website.Models.FrontEnd 571 @using Dynamicweb.Ecommerce.Orders 572 @using Dynamicweb.Frontend 573 @using Dynamicweb.Frontend.Navigation 574 @{ 575 ClassList headerClassList = new ClassList(); 576 headerClassList.AddClasses( "e-header js-e-header is-sticky" ); 577 if ( Espresso.Item.HeaderTransparent == "True" ) 578 { 579 headerClassList.AddClasses( "is-transparent" ); 580 } 581582 ClassList logoClassList = new ClassList(); 583 logoClassList.AddClasses( "e-logo" ); 584585 string backButtonLink = Espresso.Item.BackButtonLink; 586 ClassList backButtonClassList = new ClassList(); 587 ClassList backButtonIconClassList = new ClassList(); 588 if ( Espresso.Item.BackButton == "True" ) 589 { 590 backButtonClassList.AddClasses( "btn btn-sm btn-secondary my-1 align-self-center" ); 591 if ( backButtonLink == "" || backButtonLink == "/" ) 592 { 593 backButtonLink = "/"; 594 backButtonClassList.AddClasses( "js-e-back-link" ); 595 } 596 backButtonIconClassList.AddClasses( "material-icons material-icons-large" ); 597 if ( Espresso.Item.BackButtonPosition == "right" ) 598 { 599 backButtonClassList.AddClasses( "mr-0 ml-auto order-last" ); 600 logoClassList.AddClasses( "order-first" ); 601 } 602 else 603 { 604 backButtonClassList.AddClasses( "order-first" ); 605 logoClassList.AddClasses( "mr-0 ml-auto order-last" ); 606 } 607 if ( Espresso.Item.BackButtonIcon == "arrow_back" ) 608 { 609 backButtonClassList.AddClasses( "arrow-left" ); 610 backButtonIconClassList.AddClasses( "d-none" ); 611 } 612 else if ( Espresso.Item.BackButtonIcon == "arrow_forward" ) 613 { 614 backButtonClassList.AddClasses( "arrow-right" ); 615 backButtonIconClassList.AddClasses( "d-none" ); 616 } 617 } 618619 string logoPrimary = Espresso.Area.Item.LogoPrimary; 620 string logoSecondary = Espresso.Area.Item.LogoSecondary; 621622 if ( string.IsNullOrEmpty( logoSecondary ) == true ) 623 { 624 logoSecondary = logoPrimary; 625 } 626 string tagline = Espresso.Area.Item.Tagline; 627628 Dictionary< string, string > navigationHtml = new Dictionary< string, string > 629 { 630 { 631 "global", Navigation.RenderNavigation( "navigation/espresso.cshtml", new NavigationSettings() 632 { 633 StartLevel = 1, 634 StopLevel = 8, 635 ExpandMode = ExpandMode.All, 636 Parameters = new Dictionary< string, object >() 637 { 638 { "id", "dwnav-global" } 639 } 640 } ) 641 }, 642 { 643 "utilities-primary", Navigation.RenderNavigation( "navigation/espresso.cshtml", new NavigationSettings() 644 { 645 StartLevel = 4, 646 StopLevel = 5, 647 ExpandMode = ExpandMode.All, 648 RootNavigationTag = "utilities-primary", 649 Parameters = new Dictionary< string, object >() 650 { 651 { "id", "dwnav-utilities-primary" } 652 } 653 } ) 654 }, 655 { 656 "utilities-secondary", Navigation.RenderNavigation( "navigation/espresso.cshtml", new NavigationSettings() 657 { 658 StartLevel = 4, 659 StopLevel = 4, 660 ExpandMode = ExpandMode.All, 661 RootNavigationTag = "utilities-secondary", 662 Parameters = new Dictionary< string, object >() 663 { 664 { "id", "dwnav-utilities-secondary" } 665 } 666 } ) 667 }, 668 { 669 "hamburger-header", Navigation.RenderNavigation( "navigation/espresso.cshtml", new NavigationSettings() 670 { 671 StartLevel = 4, 672 StopLevel = 4, 673 ExpandMode = ExpandMode.All, 674 RootNavigationTag = "hamburger-header", 675 Parameters = new Dictionary< string, object >() 676 { 677 { "id", "dwnav-hamburger-header" } 678 } 679 } ) 680 }, 681 { 682 "hamburger-aside", Navigation.RenderNavigation( "navigation/espresso.cshtml", new NavigationSettings() 683 { 684 StartLevel = 4, 685 StopLevel = 4, 686 ExpandMode = ExpandMode.All, 687 RootNavigationTag = "hamburger-aside", 688 Parameters = new Dictionary< string, object >() 689 { 690 { "id", "dwnav-hamburger-aside" } 691 } 692 } ) 693 } 694 }; 695696 double cartQuantity = 0; 697 var areaCartContext = PageView.Current().Area.Item[ "ContextCart" ]?.ToString(); 698699 Dynamicweb.Ecommerce.Common.Context.CartContext = OrderContext.GetOrderContextById(areaCartContext); 700 Order cart = Dynamicweb.Ecommerce.Common.Context.Cart; 701 if (cart != null ) 702 { 703 cartQuantity = cart.get_ParentProductLineQuantityCount(cart.ProductOrderLines); 704 } 705 } 706707 @SnippetStart("CartQuantity") 708 @cartQuantity 709 @SnippetEnd("CartQuantity") 710711 @if ( Espresso.Item.HeaderHide != "True" ) 712 { 713 <header class="@headerClassList" data-autohide="true"> 714715 <div class="e-header-hamburger"> 716 @sectionStart( "e-header-section e-section", "col-12" ) 717 <div class="col-12 e-header-section-content"> 718 <div class="@logoClassList"> 719 <a class="e-logo-link" href="/@globalAreaName/"> 720 <img src="@logoPrimary" class="e-logo-img e-logo-img-primary" alt="@Espresso.Area.Item.CompanyName"> 721 <img src="@logoSecondary" class="e-logo-img e-logo-img-secondary" alt="@Espresso.Area.Item.CompanyName"> 722 @if ( string.IsNullOrEmpty( tagline ) == false ) 723 { 724 <p class="e-logo-tagline">@tagline</p> 725 } 726 </a> 727 </div> 728 @if ( Espresso.Item.NavigationHide != "True" ) 729 { 730 <section class="e-nav-hamburger-header"> 731 <ul class="nav"> 732 @navigationHtml[ "hamburger-header" ] 733 @* TODO: Move to xslt *@ 734 <li class="e-nav-item-hamburger-open nav-item"> 735 <a class="nav-link" data-target=".modal.e-nav" data-toggle="modal" href="#"> 736 <i class="e-nav-pageicon material-icons">menu</i> 737 <span class="e-nav-pagename">@Translate( "Header - Hamburger menu open - Button", "Menu" )</span> 738 </a> 739 </li> 740 </ul> 741 </section> 742 } 743 @if ( Espresso.Item.BackButton == "True" ) 744 { 745 <a class="@backButtonClassList" href="@backButtonLink"> 746 @if ( Espresso.Item.BackButtonIcon != "" ) 747 { 748 <i class="@backButtonIconClassList">@Espresso.Item.BackButtonIcon</i> 749 } 750 @Espresso.Item.BackButtonText 751 </a> 752 } 753 </div> 754 @sectionEnd() 755 </div> 756 <div class="e-nav js-e-nav modal p-0" data-backdrop="false"> 757 <div class="e-nav-container navbar flex-column d-flex"> 758759 @sectionStart( "e-header-section e-header-section-primary e-section order-xl-2", "col-12" ) 760 <div class="col-12 e-header-section-content"> 761 <div class="@logoClassList"> 762 <a class="e-logo-link" href="/@globalAreaName/"> 763 <img src="@logoPrimary" class="e-logo-img e-logo-img-primary" alt="@Espresso.Area.Item.CompanyName"> 764 <img src="@logoSecondary" class="e-logo-img e-logo-img-secondary" alt="@Espresso.Area.Item.CompanyName"> 765 @if (string.IsNullOrEmpty(tagline) == false) 766 { 767 <p class="e-logo-tagline">@tagline</p> 768 } 769 </a> 770 </div> 771772 @if ( Espresso.Item.NavigationHide != "True" ) 773 { 774 <nav class="e-nav-global js-e-nav-global"> 775 <ul class="nav"> 776 @navigationHtml[ "global" ] 777 </ul> 778 </nav> 779780 <div class="e-nav-item-hamburger-close"> 781 <a class="nav-link" data-target=".modal.e-nav" data-toggle="modal" href="#"> 782 <i class="e-nav-pageicon material-icons">close</i> 783 <span class="e-nav-pagename">@Translate( "Header - Hamburger menu close - Button", "Close" )</span> 784 </a> 785 </div> 786787 if ( string.IsNullOrEmpty( navigationHtml[ "utilities-primary" ] ) == false ) 788 { 789 @:</div> 790 @sectionEnd() 791 @sectionStart( "e-header-section e-header-section-secondary e-section order-xl-1", "col-12" ) 792 @:<div class="col-12 e-header-section-content"> 793794 <nav class="e-nav-utilities-primary js-e-nav-utilities-primary"> 795 <ul class="nav"> 796 @navigationHtml[ "utilities-primary" ] 797 </ul> 798 </nav> 799 } 800801 if ( string.IsNullOrEmpty( navigationHtml[ "utilities-secondary" ] ) == false ) 802 { 803 <nav class="e-nav-utilities-secondary"> 804 <ul class="nav"> 805 @navigationHtml[ "utilities-secondary" ] 806 </ul> 807 </nav> 808 } 809 if ( string.IsNullOrEmpty( navigationHtml[ "hamburger-aside" ] ) == false ) 810 { 811 <nav class="e-nav-hamburger-aside"> 812 <ul class="nav"> 813 @navigationHtml[ "hamburger-aside" ] 814 </ul> 815 </nav> 816 } 817 } 818 @if ( Espresso.Item.BackButton == "True" ) 819 { 820 <a class="@backButtonClassList" href="@backButtonLink"> 821 @if ( Espresso.Item.BackButtonIcon != "" ) 822 { 823 <i class="@backButtonIconClassList">@Espresso.Item.BackButtonIcon</i> 824 } 825 @Espresso.Item.BackButtonText 826 </a> 827 } 828 </div> 829 @sectionEnd() 830831 </div> 832 </div> 833834 </header> 835 } 836837 @helper GetSvgFileData(string svgfile) 838 { 839 string rtnValue = svgfile; 840 if (!string.IsNullOrEmpty(svgfile)) 841 { 842 string FilePath = svgfile; 843844 if (System.IO.Path.GetExtension(FilePath) == ".svg") 845 { 846 System.Xml.XmlReaderSettings settings = new System.Xml.XmlReaderSettings(); 847 settings.DtdProcessing = System.Xml.DtdProcessing.Ignore; 848 string svgFilePath = System.Web.HttpContext.Current.Server.MapPath(FilePath) ?? string.Empty; 849 if (System.IO.File.Exists(svgFilePath)) 850 { 851 using (System.IO.StreamReader sr = new System.IO.StreamReader(svgFilePath)) 852 { 853 using (System.Xml.XmlReader xr = System.Xml.XmlReader.Create(sr, settings)) 854 { 855 bool done = false; 856 while (xr.Read() && !done) 857 { 858 if (xr.NodeType == System.Xml.XmlNodeType.Element && xr.Name == "svg") 859 { 860 rtnValue = xr.ReadOuterXml(); 861 done = true; 862 } 863 } 864 } 865 } 866 } 867 } 868 } 869 @rtnValue; 870 } 871872873 @*General - Website Settings*@ 874875 @if ( Espresso.Item.Notificationbar != "True" ) 876 { 877 if ( !string.IsNullOrEmpty(Espresso.Area.Item.NotificationbarPageId) ) 878 { 879 <section class="e-section"> 880 <div class="container-fluid"> 881 <div class="row"> 882 <div class="col-12"> 883 <div class="row"> 884 @RenderPageContent(int.Parse(Espresso.Area.Item.NotificationbarPageId)) 885 </div> 886 </div> 887 </div> 888 </div> 889 </section> 890 } 891 } 892893 @*Specific - Page*@ 894895 @if ( !string.IsNullOrEmpty(Espresso.Item.NotificationbarPageId) ) 896 { 897 <section class="e-section"> 898 <div class="container-fluid"> 899 <div class="row"> 900 <div class="col-12"> 901 <div class="row"> 902 @RenderPageContent(int.Parse(Espresso.Item.NotificationbarPageId)) 903 </div> 904 </div> 905 </div> 906 </div> 907 </section> 908 } 909 @using Dynamicweb.Frontend 910 @using Dynamicweb.Security.UserManagement 911 @{ 912 User currentUser = PageView.Current().User; 913 if ( currentUser != null ) 914 { 915 User currentSecondaryUser = currentUser.CurrentSecondaryUser; 916 if ( currentSecondaryUser != null ) 917 { 918 @sectionStart( "e-section bg-warning e-text-dark js-e-section is-sticky zi-fixed py-1", "col-12 small" ) 919 <div class="align-self-center col-12 col-lg-9 col-md-8"> 920 <p class="line-height-sm mb-1 mb-md-0 text-center text-md-left"> 921 <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> 922 </p> 923 </div> 924 <div class="align-self-center col-12 col-lg-3 col-md-4"> 925 <form class="mb-0 small text-center text-md-right" method="post" action="@Espresso.Area.Item.ExtranetImpersonationPage"> 926 <button class="btn btn-primary" name="DwExtranetRemoveSecondaryUser" type="submit">@Translate( "Extranet Impersonation - Stop impersonation - Button", "Stop impersonation" )</button> 927 </form> 928 </div> 929 @sectionEnd() 930 } 931 } 932 } 933934935 <main id="dwcontentmain" class="e-content js-e-content @Espresso.ContentArea.ClassList"> 936 @using Dynamicweb.Content; 937 @using Dynamicweb.Extensibility; 938 @{ 939 string eBreadcrumbClasslist = "e-breadcrumb js-e-breadcrumb d-none d-lg-block"; 940 if ( Espresso.Item.Breadcrumb != "auto" && Espresso.Item.Breadcrumb != "none" && String.IsNullOrEmpty( Espresso.Item.Breadcrumb ) == false ) 941 { 942 eBreadcrumbClasslist += string.Format( " e-breadcrumb-{0}", Espresso.Item.Breadcrumb ); 943 } 944 string navigationHtmlBreadcrumb = RenderNavigation( new 945 { 946 id = "dwnav-breadcrumb", 947 template = "breadcrumb.xslt", 948 startlevel = 1, 949 endlevel = 10, 950 expandmode = "pathonly", 951 sitemapmode = true 952 } ); 953 } 954955 @if ( string.IsNullOrEmpty( navigationHtmlBreadcrumb ) == false && Espresso.Item.Breadcrumb != "none" && string.IsNullOrEmpty( Espresso.Item.Breadcrumb ) == false ) 956 { 957 <section class="e-section @eBreadcrumbClasslist"> 958 <div class="container-fluid"> 959 <div class="row"> 960 <div class="col-12"> 961 <div class="row"> 962963 <div class="col-12"> 964 <nav class="e-breadcrumb-container"> 965 <ol class="breadcrumb nav text-muted" itemscope="" itemtype="https://schema.org/BreadcrumbList"> 966 <li class="breadcrumb-item m-0 p-0"> 967 <a class="arrow-left breadcrumb-back-link js-e-back-link px-0" href="/">@Translate( "Breadcrumb - Back link", "Back" )</a> 968 <span class="breadcrumb-prefix-text"> 969 @Translate( "Breadcrumb - Prefix - Text", "You are here:" ) 970 </span> 971 <a href="/"> 972 @ServiceLocator.Current.GetPageService().GetFirstPageForArea( GetInteger( "DwAreaID" ) ).MenuText 973 </a> 974 </li> 975 @navigationHtmlBreadcrumb 976 </ol> 977 </nav> 978 </div> 979980 </div> 981 </div> 982 </div> 983 </div> 984 </section> 985 } 986987988 <article class="e-content-article"> 989 @{ 990 int NavigationLocalHorizontalParentPageId = 0; 991 if ( !string.IsNullOrEmpty( Espresso.Item.NavigationLocalParentPage ) ) 992 { 993 int.TryParse( Espresso.Item.NavigationLocalParentPage, out NavigationLocalHorizontalParentPageId ); 994 } 995 if ( NavigationLocalHorizontalParentPageId == 0 ) 996 { 997 NavigationLocalHorizontalParentPageId = PageView.Current().Page.ID; 998 if ( !Dynamicweb.Services.Pages.GetPagesByParentID( NavigationLocalHorizontalParentPageId ).Any() ) 999 { 1000 NavigationLocalHorizontalParentPageId = PageView.Current().Page.ParentPageId; 1001 } 1002 } 1003 string NavigationLocalHorizontalClassList = "e-nav-local e-nav-local-horizontal js-e-nav-local-horizontal"; 1004 string NavigationLocalHorizontalContainerClassList = "e-nav-local-container"; 1005 string NavigationLocalHorizontalTemplate = "local-" + Espresso.Item.NavigationLocalLayout + ".xslt"; 1006 if ( string.IsNullOrEmpty( Espresso.Item.NavigationLocalTemplate ) == false && Path.GetExtension( Espresso.Item.NavigationLocalTemplate ) == ".xslt" ) 1007 { 1008 NavigationLocalHorizontalTemplate = Path.GetFileName( Espresso.Item.NavigationLocalTemplate ); 1009 } 10101011 if ( Espresso.Item.NavigationLocalShow == "True" && Espresso.Item.NavigationLocalLayout == "horizontal" ) 1012 { 1013 NavigationLocalHorizontalClassList += " " + Espresso.Item.NavigationLocalCustomClasses; 1014 if ( Espresso.Item.NavigationLocalSticky == "True" ) 1015 { 1016 NavigationLocalHorizontalClassList += " is-sticky"; 1017 } 1018 if ( Espresso.Item.NavigationLocalAbsolute == "True" ) 1019 { 1020 NavigationLocalHorizontalClassList += " is-absolute"; 1021 } 1022 else 1023 { 1024 if ( Espresso.Item.NavigationLocalMarginTop != "0" && Espresso.Item.NavigationLocalMarginTop != "" ) 1025 { 1026 NavigationLocalHorizontalClassList += " mt-" + Espresso.Item.NavigationLocalMarginTop; 1027 } 1028 if ( Espresso.Item.NavigationLocalMarginBottom != "0" && Espresso.Item.NavigationLocalMarginBottom != "" ) 1029 { 1030 NavigationLocalHorizontalClassList += " mb-" + Espresso.Item.NavigationLocalMarginBottom; 1031 } 1032 } 1033 } 1034 } 1035 @if ( Espresso.Item.NavigationLocalShow == "True" && Espresso.Item.NavigationLocalLayout == "horizontal" ) 1036 { 1037 <section class="e-section @NavigationLocalHorizontalClassList"> 1038 <div class="container-fluid"> 1039 <div class="row"> 1040 <div class="col-12"> 1041 <div class="row"> 10421043 <div class="col-12"> 1044 <nav id="dwnav-local-horizontal-@NavigationLocalHorizontalParentPageId" class="@NavigationLocalHorizontalContainerClassList"> 1045 <ul class="justify-content-start nav"> 1046 @if ( Espresso.Item.NavigationLocalHeading != "" ) 1047 { 1048 <li class="e-nav-local-heading"> 1049 <h2>@Espresso.Item.NavigationLocalHeading</h2> 1050 </li> 1051 } 1052 @RenderNavigation( new 1053 { 1054 id = "dwnav-local-horizontal-" + NavigationLocalHorizontalParentPageId, 1055 parentid = NavigationLocalHorizontalParentPageId, 1056 template = NavigationLocalHorizontalTemplate, 1057 startlevel = Espresso.Item.NavigationLocalLevelStart, 1058 endlevel = Espresso.Item.NavigationLocalLevelEnd, 1059 expandmode = Espresso.Item.NavigationLocalPageTreeExpand == "True" ? "all" : "path" 1060 } ) 1061 </ul> 1062 </nav> 1063 </div> 10641065 </div> 1066 </div> 1067 </div> 1068 </div> 1069 </section> 1070 } 107110721073 @{ 1074 int NavigationLocalVerticalParentPageId = 0; 1075 if ( !string.IsNullOrEmpty( Espresso.Item.NavigationLocalParentPage ) ) 1076 { 1077 int.TryParse( Espresso.Item.NavigationLocalParentPage, out NavigationLocalVerticalParentPageId ); 1078 } 1079 if ( NavigationLocalVerticalParentPageId == 0 ) 1080 { 1081 NavigationLocalVerticalParentPageId = PageView.Current().Page.ID; 1082 if ( !Dynamicweb.Services.Pages.GetPagesByParentID( NavigationLocalVerticalParentPageId ).Any() ) 1083 { 1084 NavigationLocalVerticalParentPageId = PageView.Current().Page.ParentPageId; 1085 } 1086 } 10871088 string NavigationLocalVerticalClassList = "e-nav-local e-nav-local-vertical js-e-nav-local-vertical"; 1089 string NavigationLocalVerticalContainerClassList = "e-nav-local-container"; 1090 string NavigationLocalVerticalTemplate = "local-" + Espresso.Item.NavigationLocalLayout + ".xslt"; 1091 if ( string.IsNullOrEmpty( Espresso.Item.NavigationLocalTemplate ) == false && Path.GetExtension( Espresso.Item.NavigationLocalTemplate ) == ".xslt" ) 1092 { 1093 NavigationLocalVerticalTemplate = Path.GetFileName( Espresso.Item.NavigationLocalTemplate ); 1094 } 10951096 if ( Espresso.Item.NavigationLocalShow == "True" && Espresso.Item.NavigationLocalLayout == "vertical" ) 1097 { 1098 NavigationLocalVerticalClassList += " " + Espresso.Item.NavigationLocalCustomClasses; 10991100 if ( Espresso.Item.NavigationLocalMarginTop != "0" && Espresso.Item.NavigationLocalMarginTop != "" ) 1101 { 1102 NavigationLocalVerticalClassList += " mt-" + Espresso.Item.NavigationLocalMarginTop; 1103 } 1104 if ( Espresso.Item.NavigationLocalMarginBottom != "0" && Espresso.Item.NavigationLocalMarginBottom != "" ) 1105 { 1106 NavigationLocalVerticalClassList += " mb-" + Espresso.Item.NavigationLocalMarginBottom; 1107 } 11081109 if ( Espresso.Item.NavigationLocalSticky == "True" ) 1110 { 1111 NavigationLocalVerticalClassList += " is-sticky"; 1112 } 11131114 if ( Espresso.Item.NavigationLocalAbsolute == "True" ) 1115 { 1116 NavigationLocalVerticalClassList += " is-absolute"; 1117 } 1118 else 1119 { 1120 Espresso.ContentSection.ClassList.Clear(); 1121 Espresso.ContentSection.ClassList.AddClasses( "wtf col-12 col-lg-9 ml-auto" ); 1122 } 1123 } 1124 } 11251126 @if ( Espresso.Item.NavigationLocalShow == "True" && Espresso.Item.NavigationLocalLayout == "vertical" ) 1127 { 1128 <section class="e-section @NavigationLocalVerticalClassList"> 1129 <div class="container-fluid"> 1130 <div class="row"> 1131 <div class="col-12"> 1132 <div class="row"> 11331134 <div class="col-3"> 1135 <nav id="dwnav-local-@NavigationLocalVerticalParentPageId" class="@NavigationLocalVerticalContainerClassList"> 1136 <ul class="flex-column nav"> 1137 @if ( Espresso.Item.NavigationLocalHeading != "" ) 1138 { 1139 <li class="e-nav-local-heading"> 1140 <h2>@Espresso.Item.NavigationLocalHeading</h2> 1141 </li> 1142 } 1143 @RenderNavigation( new 1144 { 1145 id = "dwnav-local-" + NavigationLocalVerticalParentPageId, 1146 parentid = NavigationLocalVerticalParentPageId, 1147 template = NavigationLocalVerticalTemplate, 1148 startlevel = Espresso.Item.NavigationLocalLevelStart, 1149 endlevel = Espresso.Item.NavigationLocalLevelEnd, 1150 expandmode = Espresso.Item.NavigationLocalPageTreeExpand == "True" ? "all" : "path", 1151 } ) 1152 </ul> 1153 </nav> 1154 </div> 11551156 </div> 1157 </div> 1158 </div> 1159 </div> 1160 </section> 1161 } 116211631164 @sectionStart() 1165 @GetValue("DwContent(dwcontentmain)") 1166 @sectionEnd() 1167 </article> 1168 </main> 1169 @using Dynamicweb.Frontend 1170 @{ 1171 string FooterContentClassList = "e-footer-content e-section"; 11721173 bool isOutlet = shopType == "Outlet"; 1174 } 1175 @if ( Espresso.Item.FooterHide != "True" ) 1176 { 1177 <footer class="e-footer"> 1178 <article class="e-footer-wrapper"> 1179 <section class="@FooterContentClassList"> 1180 <div class="container-fluid"> 1181 <div class="row"> 1182 @if ( !string.IsNullOrEmpty( Espresso.Area.Item.FooterPageId ) ) 1183 { 1184 @RenderPageContent( int.Parse( Espresso.Area.Item.FooterPageId ) ) 1185 } 1186 </div> 1187 </div> 1188 </section> 1189 @if (!isOutlet) 1190 { 1191 <section class="e-footer-copyright e-section"> 1192 <div class="container-fluid"> 1193 <div class="align-items-baseline row"> 1194 <div class="col-12 col-lg-5"> 1195 @if (string.IsNullOrEmpty(Espresso.Area.Item.Adresse) == false) 1196 { 1197 @Espresso.Area.Item.Adresse 1198 } 1199 </div> 12001201 <div class="col-12 col-lg-4"> 1202 @if (string.IsNullOrEmpty(GetString("DwNavigation(dwnavutilitiessecondaryfooter)")) == false) 1203 { 1204 <div class="col-12 p-0"> 1205 <aside class="e-nav-utilities-secondary"> 1206 <ul class="nav nav-inline"> 1207 @GetValue("DwNavigation(dwnavutilitiessecondaryfooter)") 1208 </ul> 1209 </aside> 1210 </div> 1211 } 1212 </div> 121312141215 <div class="col-12 col-lg-3 text-lg-right"> 1216 <p class="e-copyright nav-link"> 1217 @*@Translate( "Footer - Copyright - Text", "Copyright &copy;" )&nbsp;*@ 1218 @*@DateTime.Now.Year.ToString()&nbsp;*@ 1219 @Translate("Footer - All Rights Reserved - Text", "All rights reserved.")&nbsp; 1220 @Espresso.Area.Item.CompanyName.&nbsp; 1221 </p> 1222 </div> 1223 </div> 1224 </div> 1225 </section> 1226 } 1227 </article> 1228 </footer> 1229 } 1230 @if( string.IsNullOrEmpty( GetString("DwContent(dwcontentcta)") ) == false ) { 1231 <aside id="dwcontentcta" class="js-e-cta e-cta is-hidden fixed-top"> 1232 <section class="e-section"> 1233 <div class="container-fluid"> 1234 <div class="row no-gutters"> 1235 <div class="col-12"> 1236 <div class="row no-gutters justify-content-center align-items-center"> 1237 @GetValue("DwContent(dwcontentcta)") 1238 @* <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> *@ 1239 </div> 1240 </div> 1241 </div> 1242 </div> 1243 </section> 1244 </aside> 1245 } 12461247 @using Dynamicweb.Frontend 12481249 @{ 1250 string cartUrl = "/cart"; 12511252 if ( PageView.Current().Area.Name.Contains( "webshop" ) == false ) 1253 { 1254 cartUrl = string.Format("{0}{1}", PageView.Current().Area.Name, cartUrl); 1255 } 1256 else 1257 { 1258 cartUrl = string.Format("{0}/shop{1}", PageView.Current().Area.Name.ToLower(), cartUrl); 1259 } 12601261 var ShopType = PageView.Current().Area.Item["ShopType"]; 1262 } 1263 <div class="e-cart-msg modal fade small" id="js-e-cart-msg" data-backdrop="false"> 1264 <div class="modal-dialog e-cart-msg-modal-dialog"> 1265 <div class="modal-content"> 1266 <div class="modal-header"> 1267 <h4 class="js-e-cart-msg-heading modal-title"> 1268 <i class="material-icons material-icons-large text-success">check_circle</i> 1269 <span>@Translate( "eCom Cart - Product Added - Heading", "Added to your cart" )</span> 1270 </h4> 1271 <button class="close" data-dismiss="modal" type="button"> 1272 <i class="material-icons">close</i> 1273 </button> 1274 </div> 1275 <div class="modal-body"> 1276 <div class="js-e-cart-msg-content"> 1277 <script id="js-e-handlebars-tmpl-cart-msg-lastadded" type="text/x-handlebars-template"> 1278 <div class="row"> 1279 {{#each cart.lastAdded}} 1280 <div class="col-12 py-1"> 1281 <div class="row"> 1282 <div class="col-4"> 1283 <a class="" href="{{url}}"> 1284 <img alt="" class="img-fluid" src="{{imageDefault}}"> 1285 </a> 1286 </div> 1287 <div class="col-8"> 1288 <h3 class="mb-0"> 1289 <a href="{{url}}" class="text-decoration-none">{{name}}</a> 1290 </h3> 1291 <p class="mb-0"> 1292 <a href="{{url}}" class="text-auto text-decoration-none"> 1293 {{{price}}} 1294 @if (ShopType?.ToString() != "B2C") 1295 { 1296 <span> 1297 <br> 1298 {{{stock.text}}}<br> 1299 {{{stock.delivery}}}<br> 1300 </span> 1301 } 13021303 </a> 1304 </p> 1305 </div> 1306 </div> 1307 </div> 1308 {{/each}} 1309 </div> 1310 </script> 1311 </div> 1312 </div> 1313 <div class="bg-info e-cart-msg-footer modal-footer border-top-0"> 1314 <a class="btn btn-secondary mr-1" href="/" data-dismiss="modal">@Translate( "eCom Cart - Continue Shopping - Button", "Continue shopping" )</a> 1315 <a class="arrow-right btn btn-primary" href="@cartUrl">@Translate( "eCom Cart - Checkout - Button", "Checkout" )</a> 1316 </div> 1317 </div> 1318 </div> 1319 </div> 13201321 </div> 13221323 @using Co3.Espresso.Base.Extensions 1324 @using Co3.Espresso.Website.Services 1325 @using Dynamicweb.Frontend 13261327 <div class="modal fade e-search js-e-search js-e-search-modal modal-fullscreen" data-backdrop="false" data-keyboard="true" data-focus="true"> 1328 <div class="modal-dialog"> 1329 <div class="modal-content"> 133013311332 <div class="modal-header"> 1333 <a class="btn btn-sm btn-secondary js-e-back-link arrow-left" href="/" data-dismiss="modal"> 1334 @Translate("Search - Back button", "Back") 1335 </a> 1336 <div class="e-logo"> 1337 <a href="/" class="e-logo-link my-0"> 1338 <img src="@logoPrimary" class="e-logo-img e-logo-img-primary" alt="@Espresso.Area.Item.CompanyName"> 1339 <img src="@logoSecondary" class="e-logo-img e-logo-img-secondary" alt="@Espresso.Area.Item.CompanyName"> 1340 </a> 1341 </div> 1342 </div> 13431344 <div class="modal-body"> 13451346 <div class="container-fluid"> 13471348 <div class="e-search-form-container"> 1349 <div class="row justify-content-center"> 1350 <div class="col-12 col-md-10 col-lg-8 col-xl-6 mt-3"> 1351 <form action="" class="e-search-form js-e-search-form"> 1352 <div class="js-e-search-input-group e-search-input-group is-empty"> 1353 <label class="e-search-label" for="e-search-input"><i class="material-icons">search</i></label> 1354 @{ string Translate_Search_InputText = Translate("Search - Input Placeholder - Text", "Search"); } 1355 <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"> 1356 <span class="js-e-search-clear e-search-clear"><i class="material-icons">close</i></span> 1357 <button class="e-search-submit btn btn-primary" type="submit"><i class="material-icons">search</i></button> 1358 </div> 1359 </form> 1360 </div> 1361 </div> 1362 </div> 13631364 <div class="js-e-search-result-container e-search-result-container"> 13651366 <div class="row justify-content-center"> 1367 <div class="col-12 col-md-10 col-lg-8 col-xl-6"> 1368 <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> 1369 </div> 1370 </div> 13711372 <div class="row justify-content-center"> 1373 <div class="col-12 col-xl-10"> 1374 <div class="js-e-search-result-products e-search-result-products is-empty mb-4"> 1375 @{string productlistItemClassList = ProductlistService.Instance.GetGridItemWidth(null).ToResponsiveClasses();} 1376 <script id="js-e-handlebars-tmpl-search-result-item-product" type="text/x-handlebars-template"> 1377 <div class="e-products"> 1378 <div class="row justify-content-center"> 1379 {{#each products}} 1380 <div class="@productlistItemClassList"> 1381 <div class="card border-1 mb-6"> 1382 <a href="{{url}}"> 1383 @if (Espresso.Item.ModelProductlist == "True") 1384 { 1385 <img src="{{productlistDetailImage}}" alt="{{name}}" class="col-12 p-0"> 1386 } 1387 else 1388 { 1389 <img src="{{imageDefault}}" alt="{{name}}" class="col-12 p-0"> 1390 } 1391 {{#if news}} 1392 <div class="isabella-product-item-news"> 1393 @Translate("Ecom Product - News Badge - Text", "Nyhed") 1394 </div> 1395 {{/if}} 1396 </a> 1397 <div class="card-body p-1 p-lg-3"> 1398 <h4 class="e-products-item-name mb-0"> 1399 <a href="{{url}}"> 1400 {{{name}}} 1401 </a> 1402 </h4> 1403 {{#if shortDescription}} 1404 {{{shortDescription}}} 1405 {{/if}} 1406 @* @if (PageView.Current().Area.Name.Contains("webshop") != false) 1407 { 1408 <p class="e-products-item-text mt-2 mb-0 @Co3.Isabella.Dw.Services.ProductService.Instance.GetNoBuyB2CandB2B()" style="display: flex"> 1409 <small class="e-products-item-price small"> 1410 <a href="{{url}}" class="text-dark" style="text-decoration: none"> 1411 {{#if pimActive}}{{{price}}}{{else}}@Translate("eCom Product - Add To Cart Form Table - Accessory Discontinued - Text", "Udgået"){{/if}} 1412 </a> 1413 </small> 1414 <a href="{{url}}" style="left: 0" class="isabella-arrow arrow-primary-small ml-auto"></a> 1415 </p> 1416 } 1417 *@ 1418 </div> 1419 </div> 1420 </div> 1421 {{/each}} 1422 </div> 1423 <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> 1424 </div> 1425 </script> 1426 </div> 1427 </div> 1428 </div> 14291430 <div class="row justify-content-center"> 1431 <div class="col-12 col-md-10 col-lg-8 col-xl-6"> 1432 <div class="js-e-search-result-pages e-search-result-pages is-empty mb-3"> 1433 <script id="js-e-handlebars-tmpl-search-result-item-page" type="text/x-handlebars-template"> 1434 <div class="row"> 1435 {{#each pages}} 1436 <div class="col-12"> 1437 <p class="mb-0"><a href="{{{url}}}" class="text-bold">{{{title}}}</a></p> 1438 <p class="mb-0 small text-truncate"> 1439 <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> 1440 <p class="small">{{{text}}}...</p> 1441 </div> 1442 {{/each}} 1443 </div> 1444 </script> 1445 </div> 1446 </div> 1447 </div> 14481449 <div class="js-e-search-loading-overlay e-loading-overlay e-search-loading-overlay"> 1450 <div class="e-loading-spinner"></div> 1451 </div> 14521453 </div> 14541455 </div> 1456 </div> 1457 </div> 1458 </div> 1459 </div> 14601461 @if( Espresso.Area.Item.BackToTopLink == "True" ){ 1462 <a href="#top" class="e-back-to-top js-e-back-to-top"><i class="material-icons">keyboard_arrow_up</i></a> 1463 } 146414651466 @* @using System.Web; 1467 @inherits Co3.Espresso.Website.TemplateBases.Pages.PageBase 14681469 @{ 1470 HttpCookie optInLevel = HttpContext.Current.Request.Cookies[ "Dynamicweb.CookieOptInLevel" ]; 1471 bool showCookieWarning = optInLevel == null; 1472 if ( optInLevel != null ) 1473 { 1474 showCookieWarning = optInLevel.Value != "2"; 1475 } 1476 } 14771478 @if ( showCookieWarning ) 1479 { 1480 <div class="e-cookie js-e-cookie py-1" hidden=""> 1481 <aside class="e-cookie-wrapper"> 1482 <section class="e-section"> 1483 <div class="container-fluid"> 1484 <div class="align-items-center row"> 1485 <div class="col-12 col-lg-10 col-md-9 my-1"> 1486 <p class="line-height-sm mb-0 small text-center text-md-left"> 1487 <span class="d-md-inline d-none"> 1488 @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" ) 1489 </span> 1490 <span class="d-md-none"> 1491 @Translate( "Cookie Warning - Message Short - Text", "This website uses cookies to improve your experience. Learn more about our" ) 1492 </span> 1493 &nbsp; 1494 <a href="@Espresso.Area.Item.CookieMessage">@Translate( "Cookie Warning - Policy - Link", "cookie policy" )</a> 1495 </p> 1496 </div> 1497 <div class="col-12 col-lg-2 col-md-3 my-1"> 1498 <p class="mb-0 text-center text-md-right"> 1499 <button class="btn e-cookie-accept-btn js-e-cookie-accept-btn" type="button"> 1500 @Translate( "Cookie Warning - Accept - Button", "OKAY" ) 1501 </button> 1502 </p> 1503 </div> 1504 </div> 1505 </div> 1506 </section> 1507 </aside> 1508 </div> 1509 } 15101511 @if ( 1 == 2 ) 1512 { 1513 @GetValue( "DwCookieWarning" ) 1514 } 15151516 *@ 15171518 <script data-cookieconsent="ignore" async="" src="/Files/Templates/Designs/isabella/_assets/_dist/js/default.js?v=3.1.1"></script> 1519 <script> 15201521 window.dataLayer.push({ 1522 'event':'ipEvent', 1523 'ipAddress' : '@Dynamicweb.Context.Current.Request.UserHostAddress' 1524 }); 1525 </script> 1526 </body> 15271528 @GetValue( "CopyRightNotice" ) 1529 </html> 1530