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_e2f5bc20d0884617b04893612fcff029.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 Dynamicweb.Frontend 571 @{ 572 ClassList headerClassList = new ClassList(); 573 headerClassList.AddClasses( "e-header js-e-header is-sticky" ); 574 if ( Espresso.Item.HeaderTransparent == "True" ) 575 { 576 headerClassList.AddClasses( "is-transparent" ); 577 } 578579 ClassList logoClassList = new ClassList(); 580 logoClassList.AddClasses( "e-logo" ); 581582 string backButtonLink = Espresso.Item.BackButtonLink; 583 ClassList backButtonClassList = new ClassList(); 584 ClassList backButtonIconClassList = new ClassList(); 585 if ( Espresso.Item.BackButton == "True" ) 586 { 587 backButtonClassList.AddClasses( "btn btn-sm btn-secondary my-1 align-self-center" ); 588 if ( backButtonLink == "" || backButtonLink == "/" ) 589 { 590 backButtonLink = "/"; 591 backButtonClassList.AddClasses( "js-e-back-link" ); 592 } 593 backButtonIconClassList.AddClasses( "material-icons material-icons-large" ); 594 if ( Espresso.Item.BackButtonPosition == "right" ) 595 { 596 backButtonClassList.AddClasses( "mr-0 ml-auto order-last" ); 597 logoClassList.AddClasses( "order-first" ); 598 } 599 else 600 { 601 backButtonClassList.AddClasses( "order-first" ); 602 logoClassList.AddClasses( "mr-0 ml-auto order-last" ); 603 } 604 if ( Espresso.Item.BackButtonIcon == "arrow_back" ) 605 { 606 backButtonClassList.AddClasses( "arrow-left" ); 607 backButtonIconClassList.AddClasses( "d-none" ); 608 } 609 else if ( Espresso.Item.BackButtonIcon == "arrow_forward" ) 610 { 611 backButtonClassList.AddClasses( "arrow-right" ); 612 backButtonIconClassList.AddClasses( "d-none" ); 613 } 614 } 615616 string logoPrimary = Espresso.Area.Item.LogoPrimary; 617 string logoSecondary = Espresso.Area.Item.LogoSecondary; 618619 if ( string.IsNullOrEmpty( logoSecondary ) == true ) 620 { 621 logoSecondary = logoPrimary; 622 } 623 string tagline = Espresso.Area.Item.Tagline; 624 Dictionary< string, string > navigationHtml = new Dictionary< string, string > 625 { 626 { 627 "global", RenderNavigation( new 628 { 629 id = "dwnav-global", 630 template = "global.xslt", 631 startlevel = 1, 632 endlevel = 8, 633 expandmode = "all" 634 } ) 635 }, 636 { 637 "utilities-primary", RenderNavigation( new 638 { 639 id = "dwnav-utilities-primary", 640 template = "utilities.xslt", 641 startlevel = 4, 642 endlevel = 5, 643 expandmode = "all", 644 parenttag = "utilities-primary" 645 } ) 646 }, 647 { 648 "utilities-secondary", RenderNavigation( new 649 { 650 id = "dwnav-utilities-secondary", 651 template = "utilities.xslt", 652 startlevel = 4, 653 endlevel = 4, 654 expandmode = "all", 655 parenttag = "utilities-secondary" 656 } ) 657 }, 658 { 659 "hamburger-header", RenderNavigation( new 660 { 661 id = "dwnav-hamburger-header", 662 template = "utilities.xslt", 663 startlevel = 4, 664 endlevel = 4, 665 expandmode = "all", 666 parenttag = "hamburger-header" 667 } ) 668 }, 669 { 670 "hamburger-aside", RenderNavigation( new 671 { 672 id = "dwnav-hamburger-aside", 673 template = "utilities.xslt", 674 startlevel = 4, 675 endlevel = 4, 676 expandmode = "all", 677 parenttag = "hamburger-aside" 678 } ) 679 } 680 }; 681682 } 683 @if ( Espresso.Item.HeaderHide != "True" ) 684 { 685 <header class="@headerClassList" data-autohide="true"> 686687 <div class="e-header-hamburger"> 688 @sectionStart( "e-header-section e-section", "col-12" ) 689 <div class="col-12 e-header-section-content"> 690 <div class="@logoClassList"> 691 <a class="e-logo-link" href="/@globalAreaName/"> 692 <img src="@logoPrimary" class="e-logo-img e-logo-img-primary" alt="@Espresso.Area.Item.CompanyName"> 693 <img src="@logoSecondary" class="e-logo-img e-logo-img-secondary" alt="@Espresso.Area.Item.CompanyName"> 694 @if ( string.IsNullOrEmpty( tagline ) == false ) 695 { 696 <p class="e-logo-tagline">@tagline</p> 697 } 698 </a> 699 </div> 700 @if ( Espresso.Item.NavigationHide != "True" ) 701 { 702 <section class="e-nav-hamburger-header"> 703 <ul class="nav"> 704 @navigationHtml[ "hamburger-header" ] 705 @* TODO: Move to xslt *@ 706 <li class="e-nav-item-hamburger-open nav-item"> 707 <a class="nav-link" data-target=".modal.e-nav" data-toggle="modal" href="#"> 708 <i class="e-nav-pageicon material-icons">menu</i> 709 <span class="e-nav-pagename">@Translate( "Header - Hamburger menu open - Button", "Menu" )</span> 710 </a> 711 </li> 712 </ul> 713 </section> 714 } 715 @if ( Espresso.Item.BackButton == "True" ) 716 { 717 <a class="@backButtonClassList" href="@backButtonLink"> 718 @if ( Espresso.Item.BackButtonIcon != "" ) 719 { 720 <i class="@backButtonIconClassList">@Espresso.Item.BackButtonIcon</i> 721 } 722 @Espresso.Item.BackButtonText 723 </a> 724 } 725 </div> 726 @sectionEnd() 727 </div> 728 <div class="e-nav js-e-nav modal p-0" data-backdrop="false"> 729 <div class="e-nav-container navbar flex-column d-flex"> 730731 @sectionStart( "e-header-section e-header-section-primary e-section order-xl-2", "col-12" ) 732 <div class="col-12 e-header-section-content"> 733 <div class="@logoClassList"> 734 <a class="e-logo-link" href="/@globalAreaName/"> 735 <img src="@logoPrimary" class="e-logo-img e-logo-img-primary" alt="@Espresso.Area.Item.CompanyName"> 736 <img src="@logoSecondary" class="e-logo-img e-logo-img-secondary" alt="@Espresso.Area.Item.CompanyName"> 737 @if (string.IsNullOrEmpty(tagline) == false) 738 { 739 <p class="e-logo-tagline">@tagline</p> 740 } 741 </a> 742 </div> 743744 @if ( Espresso.Item.NavigationHide != "True" ) 745 { 746 <nav class="e-nav-global js-e-nav-global"> 747 <ul class="nav"> 748 @navigationHtml[ "global" ] 749 </ul> 750 </nav> 751752 <div class="e-nav-item-hamburger-close"> 753 <a class="nav-link" data-target=".modal.e-nav" data-toggle="modal" href="#"> 754 <i class="e-nav-pageicon material-icons">close</i> 755 <span class="e-nav-pagename">@Translate( "Header - Hamburger menu close - Button", "Close" )</span> 756 </a> 757 </div> 758759 if ( string.IsNullOrEmpty( navigationHtml[ "utilities-primary" ] ) == false ) 760 { 761 @:</div> 762 @sectionEnd() 763 @sectionStart( "e-header-section e-header-section-secondary e-section order-xl-1", "col-12" ) 764 @:<div class="col-12 e-header-section-content"> 765766 <nav class="e-nav-utilities-primary js-e-nav-utilities-primary"> 767 <ul class="nav"> 768 @navigationHtml[ "utilities-primary" ] 769 </ul> 770 </nav> 771 } 772773 if ( string.IsNullOrEmpty( navigationHtml[ "utilities-secondary" ] ) == false ) 774 { 775 <nav class="e-nav-utilities-secondary"> 776 <ul class="nav"> 777 @navigationHtml[ "utilities-secondary" ] 778 </ul> 779 </nav> 780 } 781 if ( string.IsNullOrEmpty( navigationHtml[ "hamburger-aside" ] ) == false ) 782 { 783 <nav class="e-nav-hamburger-aside"> 784 <ul class="nav"> 785 @navigationHtml[ "hamburger-aside" ] 786 </ul> 787 </nav> 788 } 789 } 790 @if ( Espresso.Item.BackButton == "True" ) 791 { 792 <a class="@backButtonClassList" href="@backButtonLink"> 793 @if ( Espresso.Item.BackButtonIcon != "" ) 794 { 795 <i class="@backButtonIconClassList">@Espresso.Item.BackButtonIcon</i> 796 } 797 @Espresso.Item.BackButtonText 798 </a> 799 } 800 </div> 801 @sectionEnd() 802803 </div> 804 </div> 805806 </header> 807 } 808809 @helper GetSvgFileData(string svgfile) 810 { 811 string rtnValue = svgfile; 812 if (!string.IsNullOrEmpty(svgfile)) 813 { 814 string FilePath = svgfile; 815816 if (System.IO.Path.GetExtension(FilePath) == ".svg") 817 { 818 System.Xml.XmlReaderSettings settings = new System.Xml.XmlReaderSettings(); 819 settings.DtdProcessing = System.Xml.DtdProcessing.Ignore; 820 string svgFilePath = System.Web.HttpContext.Current.Server.MapPath(FilePath) ?? string.Empty; 821 if (System.IO.File.Exists(svgFilePath)) 822 { 823 using (System.IO.StreamReader sr = new System.IO.StreamReader(svgFilePath)) 824 { 825 using (System.Xml.XmlReader xr = System.Xml.XmlReader.Create(sr, settings)) 826 { 827 bool done = false; 828 while (xr.Read() && !done) 829 { 830 if (xr.NodeType == System.Xml.XmlNodeType.Element && xr.Name == "svg") 831 { 832 rtnValue = xr.ReadOuterXml(); 833 done = true; 834 } 835 } 836 } 837 } 838 } 839 } 840 } 841 @rtnValue; 842 } 843844845 @*General - Website Settings*@ @if ( Espresso.Item.Notificationbar != "True" ) { if ( !string.IsNullOrEmpty(Espresso.Area.Item.NotificationbarPageId) ) { <section class="e-section"> <div class="container-fluid"> <div class="row"> <div class="col-12"> <div class="row"> @RenderPageContent(int.Parse(Espresso.Area.Item.NotificationbarPageId)) </div> </div> </div> </div> </section> } } @*Specific - Page*@ @if ( !string.IsNullOrEmpty(Espresso.Item.NotificationbarPageId) ) { <section class="e-section"> <div class="container-fluid"> <div class="row"> <div class="col-12"> <div class="row"> @RenderPageContent(int.Parse(Espresso.Item.NotificationbarPageId)) </div> </div> </div> </div> </section> } 846 @using Dynamicweb.Frontend 847 @using Dynamicweb.Security.UserManagement 848 @{ 849 User currentUser = PageView.Current().User; 850 if ( currentUser != null ) 851 { 852 User currentSecondaryUser = currentUser.CurrentSecondaryUser; 853 if ( currentSecondaryUser != null ) 854 { 855 @sectionStart( "e-section bg-warning e-text-dark js-e-section is-sticky zi-fixed py-1", "col-12 small" ) 856 <div class="align-self-center col-12 col-lg-9 col-md-8"> 857 <p class="line-height-sm mb-1 mb-md-0 text-center text-md-left"> 858 <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> 859 </p> 860 </div> 861 <div class="align-self-center col-12 col-lg-3 col-md-4"> 862 <form class="mb-0 small text-center text-md-right" method="post" action="@Espresso.Area.Item.ExtranetImpersonationPage"> 863 <button class="btn btn-primary" name="DwExtranetRemoveSecondaryUser" type="submit">@Translate( "Extranet Impersonation - Stop impersonation - Button", "Stop impersonation" )</button> 864 </form> 865 </div> 866 @sectionEnd() 867 } 868 } 869 } 870871872 <main id="dwcontentmain" class="e-content js-e-content @Espresso.ContentArea.ClassList"> 873 @using Dynamicweb.Content; 874 @using Dynamicweb.Extensibility; 875 @{ 876 string eBreadcrumbClasslist = "e-breadcrumb js-e-breadcrumb d-none d-lg-block"; 877 if ( Espresso.Item.Breadcrumb != "auto" && Espresso.Item.Breadcrumb != "none" && String.IsNullOrEmpty( Espresso.Item.Breadcrumb ) == false ) 878 { 879 eBreadcrumbClasslist += string.Format( " e-breadcrumb-{0}", Espresso.Item.Breadcrumb ); 880 } 881 string navigationHtmlBreadcrumb = RenderNavigation( new 882 { 883 id = "dwnav-breadcrumb", 884 template = "breadcrumb.xslt", 885 startlevel = 1, 886 endlevel = 10, 887 expandmode = "pathonly", 888 sitemapmode = true 889 } ); 890 } 891892 @if ( string.IsNullOrEmpty( navigationHtmlBreadcrumb ) == false && Espresso.Item.Breadcrumb != "none" && string.IsNullOrEmpty( Espresso.Item.Breadcrumb ) == false ) 893 { 894 <section class="e-section @eBreadcrumbClasslist"> 895 <div class="container-fluid"> 896 <div class="row"> 897 <div class="col-12"> 898 <div class="row"> 899900 <div class="col-12"> 901 <nav class="e-breadcrumb-container"> 902 <ol class="breadcrumb nav text-muted" itemscope="" itemtype="https://schema.org/BreadcrumbList"> 903 <li class="breadcrumb-item m-0 p-0"> 904 <a class="arrow-left breadcrumb-back-link js-e-back-link px-0" href="/">@Translate( "Breadcrumb - Back link", "Back" )</a> 905 <span class="breadcrumb-prefix-text"> 906 @Translate( "Breadcrumb - Prefix - Text", "You are here:" ) 907 </span> 908 <a href="/"> 909 @ServiceLocator.Current.GetPageService().GetFirstPageForArea( GetInteger( "DwAreaID" ) ).MenuText 910 </a> 911 </li> 912 @navigationHtmlBreadcrumb 913 </ol> 914 </nav> 915 </div> 916917 </div> 918 </div> 919 </div> 920 </div> 921 </section> 922 } 923924925 <article class="e-content-article"> 926 @{ 927 int NavigationLocalHorizontalParentPageId = 0; 928 if ( !string.IsNullOrEmpty( Espresso.Item.NavigationLocalParentPage ) ) 929 { 930 int.TryParse( Espresso.Item.NavigationLocalParentPage, out NavigationLocalHorizontalParentPageId ); 931 } 932 if ( NavigationLocalHorizontalParentPageId == 0 ) 933 { 934 NavigationLocalHorizontalParentPageId = PageView.Current().Page.ID; 935 if ( !Dynamicweb.Services.Pages.GetPagesByParentID( NavigationLocalHorizontalParentPageId ).Any() ) 936 { 937 NavigationLocalHorizontalParentPageId = PageView.Current().Page.ParentPageId; 938 } 939 } 940 string NavigationLocalHorizontalClassList = "e-nav-local e-nav-local-horizontal js-e-nav-local-horizontal"; 941 string NavigationLocalHorizontalContainerClassList = "e-nav-local-container"; 942 string NavigationLocalHorizontalTemplate = "local-" + Espresso.Item.NavigationLocalLayout + ".xslt"; 943 if ( string.IsNullOrEmpty( Espresso.Item.NavigationLocalTemplate ) == false && Path.GetExtension( Espresso.Item.NavigationLocalTemplate ) == ".xslt" ) 944 { 945 NavigationLocalHorizontalTemplate = Path.GetFileName( Espresso.Item.NavigationLocalTemplate ); 946 } 947948 if ( Espresso.Item.NavigationLocalShow == "True" && Espresso.Item.NavigationLocalLayout == "horizontal" ) 949 { 950 NavigationLocalHorizontalClassList += " " + Espresso.Item.NavigationLocalCustomClasses; 951 if ( Espresso.Item.NavigationLocalSticky == "True" ) 952 { 953 NavigationLocalHorizontalClassList += " is-sticky"; 954 } 955 if ( Espresso.Item.NavigationLocalAbsolute == "True" ) 956 { 957 NavigationLocalHorizontalClassList += " is-absolute"; 958 } 959 else 960 { 961 if ( Espresso.Item.NavigationLocalMarginTop != "0" && Espresso.Item.NavigationLocalMarginTop != "" ) 962 { 963 NavigationLocalHorizontalClassList += " mt-" + Espresso.Item.NavigationLocalMarginTop; 964 } 965 if ( Espresso.Item.NavigationLocalMarginBottom != "0" && Espresso.Item.NavigationLocalMarginBottom != "" ) 966 { 967 NavigationLocalHorizontalClassList += " mb-" + Espresso.Item.NavigationLocalMarginBottom; 968 } 969 } 970 } 971 } 972 @if ( Espresso.Item.NavigationLocalShow == "True" && Espresso.Item.NavigationLocalLayout == "horizontal" ) 973 { 974 <section class="e-section @NavigationLocalHorizontalClassList"> 975 <div class="container-fluid"> 976 <div class="row"> 977 <div class="col-12"> 978 <div class="row"> 979980 <div class="col-12"> 981 <nav id="dwnav-local-horizontal-@NavigationLocalHorizontalParentPageId" class="@NavigationLocalHorizontalContainerClassList"> 982 <ul class="justify-content-start nav"> 983 @if ( Espresso.Item.NavigationLocalHeading != "" ) 984 { 985 <li class="e-nav-local-heading"> 986 <h2>@Espresso.Item.NavigationLocalHeading</h2> 987 </li> 988 } 989 @RenderNavigation( new 990 { 991 id = "dwnav-local-horizontal-" + NavigationLocalHorizontalParentPageId, 992 parentid = NavigationLocalHorizontalParentPageId, 993 template = NavigationLocalHorizontalTemplate, 994 startlevel = Espresso.Item.NavigationLocalLevelStart, 995 endlevel = Espresso.Item.NavigationLocalLevelEnd, 996 expandmode = Espresso.Item.NavigationLocalPageTreeExpand == "True" ? "all" : "path" 997 } ) 998 </ul> 999 </nav> 1000 </div> 10011002 </div> 1003 </div> 1004 </div> 1005 </div> 1006 </section> 1007 } 100810091010 @{ 1011 int NavigationLocalVerticalParentPageId = 0; 1012 if ( !string.IsNullOrEmpty( Espresso.Item.NavigationLocalParentPage ) ) 1013 { 1014 int.TryParse( Espresso.Item.NavigationLocalParentPage, out NavigationLocalVerticalParentPageId ); 1015 } 1016 if ( NavigationLocalVerticalParentPageId == 0 ) 1017 { 1018 NavigationLocalVerticalParentPageId = PageView.Current().Page.ID; 1019 if ( !Dynamicweb.Services.Pages.GetPagesByParentID( NavigationLocalVerticalParentPageId ).Any() ) 1020 { 1021 NavigationLocalVerticalParentPageId = PageView.Current().Page.ParentPageId; 1022 } 1023 } 10241025 string NavigationLocalVerticalClassList = "e-nav-local e-nav-local-vertical js-e-nav-local-vertical"; 1026 string NavigationLocalVerticalContainerClassList = "e-nav-local-container"; 1027 string NavigationLocalVerticalTemplate = "local-" + Espresso.Item.NavigationLocalLayout + ".xslt"; 1028 if ( string.IsNullOrEmpty( Espresso.Item.NavigationLocalTemplate ) == false && Path.GetExtension( Espresso.Item.NavigationLocalTemplate ) == ".xslt" ) 1029 { 1030 NavigationLocalVerticalTemplate = Path.GetFileName( Espresso.Item.NavigationLocalTemplate ); 1031 } 10321033 if ( Espresso.Item.NavigationLocalShow == "True" && Espresso.Item.NavigationLocalLayout == "vertical" ) 1034 { 1035 NavigationLocalVerticalClassList += " " + Espresso.Item.NavigationLocalCustomClasses; 10361037 if ( Espresso.Item.NavigationLocalMarginTop != "0" && Espresso.Item.NavigationLocalMarginTop != "" ) 1038 { 1039 NavigationLocalVerticalClassList += " mt-" + Espresso.Item.NavigationLocalMarginTop; 1040 } 1041 if ( Espresso.Item.NavigationLocalMarginBottom != "0" && Espresso.Item.NavigationLocalMarginBottom != "" ) 1042 { 1043 NavigationLocalVerticalClassList += " mb-" + Espresso.Item.NavigationLocalMarginBottom; 1044 } 10451046 if ( Espresso.Item.NavigationLocalSticky == "True" ) 1047 { 1048 NavigationLocalVerticalClassList += " is-sticky"; 1049 } 10501051 if ( Espresso.Item.NavigationLocalAbsolute == "True" ) 1052 { 1053 NavigationLocalVerticalClassList += " is-absolute"; 1054 } 1055 else 1056 { 1057 Espresso.ContentSection.ClassList.Clear(); 1058 Espresso.ContentSection.ClassList.AddClasses( "wtf col-12 col-lg-9 ml-auto" ); 1059 } 1060 } 1061 } 10621063 @if ( Espresso.Item.NavigationLocalShow == "True" && Espresso.Item.NavigationLocalLayout == "vertical" ) 1064 { 1065 <section class="e-section @NavigationLocalVerticalClassList"> 1066 <div class="container-fluid"> 1067 <div class="row"> 1068 <div class="col-12"> 1069 <div class="row"> 10701071 <div class="col-3"> 1072 <nav id="dwnav-local-@NavigationLocalVerticalParentPageId" class="@NavigationLocalVerticalContainerClassList"> 1073 <ul class="flex-column nav"> 1074 @if ( Espresso.Item.NavigationLocalHeading != "" ) 1075 { 1076 <li class="e-nav-local-heading"> 1077 <h2>@Espresso.Item.NavigationLocalHeading</h2> 1078 </li> 1079 } 1080 @RenderNavigation( new 1081 { 1082 id = "dwnav-local-" + NavigationLocalVerticalParentPageId, 1083 parentid = NavigationLocalVerticalParentPageId, 1084 template = NavigationLocalVerticalTemplate, 1085 startlevel = Espresso.Item.NavigationLocalLevelStart, 1086 endlevel = Espresso.Item.NavigationLocalLevelEnd, 1087 expandmode = Espresso.Item.NavigationLocalPageTreeExpand == "True" ? "all" : "path", 1088 } ) 1089 </ul> 1090 </nav> 1091 </div> 10921093 </div> 1094 </div> 1095 </div> 1096 </div> 1097 </section> 1098 } 109911001101 @sectionStart() 1102 @GetValue("DwContent(dwcontentmain)") 1103 @sectionEnd() 1104 </article> 1105 </main> 1106 @using Dynamicweb.Frontend 1107 @{ 1108 string FooterContentClassList = "e-footer-content e-section"; 11091110 bool isOutlet = shopType == "Outlet"; 1111 } 1112 @if ( Espresso.Item.FooterHide != "True" ) 1113 { 1114 <footer class="e-footer"> 1115 <article class="e-footer-wrapper"> 1116 <section class="@FooterContentClassList"> 1117 <div class="container-fluid"> 1118 <div class="row"> 1119 @if ( !string.IsNullOrEmpty( Espresso.Area.Item.FooterPageId ) ) 1120 { 1121 @RenderPageContent( int.Parse( Espresso.Area.Item.FooterPageId ) ) 1122 } 1123 </div> 1124 </div> 1125 </section> 1126 @if (!isOutlet) 1127 { 1128 <section class="e-footer-copyright e-section"> 1129 <div class="container-fluid"> 1130 <div class="align-items-baseline row"> 1131 <div class="col-12 col-lg-5"> 1132 @if (string.IsNullOrEmpty(Espresso.Area.Item.Adresse) == false) 1133 { 1134 @Espresso.Area.Item.Adresse 1135 } 1136 </div> 11371138 <div class="col-12 col-lg-4"> 1139 @if (string.IsNullOrEmpty(GetString("DwNavigation(dwnavutilitiessecondaryfooter)")) == false) 1140 { 1141 <div class="col-12 p-0"> 1142 <aside class="e-nav-utilities-secondary"> 1143 <ul class="nav nav-inline"> 1144 @GetValue("DwNavigation(dwnavutilitiessecondaryfooter)") 1145 </ul> 1146 </aside> 1147 </div> 1148 } 1149 </div> 115011511152 <div class="col-12 col-lg-3 text-lg-right"> 1153 <p class="e-copyright nav-link"> 1154 @*@Translate( "Footer - Copyright - Text", "Copyright &copy;" )&nbsp;*@ 1155 @*@DateTime.Now.Year.ToString()&nbsp;*@ 1156 @Translate("Footer - All Rights Reserved - Text", "All rights reserved.")&nbsp; 1157 @Espresso.Area.Item.CompanyName.&nbsp; 1158 </p> 1159 </div> 1160 </div> 1161 </div> 1162 </section> 1163 } 1164 </article> 1165 </footer> 1166 } 1167 @if( string.IsNullOrEmpty( GetString("DwContent(dwcontentcta)") ) == false ) { 1168 <aside id="dwcontentcta" class="js-e-cta e-cta is-hidden fixed-top"> 1169 <section class="e-section"> 1170 <div class="container-fluid"> 1171 <div class="row no-gutters"> 1172 <div class="col-12"> 1173 <div class="row no-gutters justify-content-center align-items-center"> 1174 @GetValue("DwContent(dwcontentcta)") 1175 @* <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> *@ 1176 </div> 1177 </div> 1178 </div> 1179 </div> 1180 </section> 1181 </aside> 1182 } 11831184 @using Dynamicweb.Frontend 11851186 @{ 1187 string cartUrl = "/cart"; 11881189 if ( PageView.Current().Area.Name.Contains( "webshop" ) == false ) 1190 { 1191 cartUrl = string.Format("{0}{1}", PageView.Current().Area.Name, cartUrl); 1192 } 1193 else 1194 { 1195 cartUrl = string.Format("{0}/shop{1}", PageView.Current().Area.Name.ToLower(), cartUrl); 1196 } 11971198 var ShopType = PageView.Current().Area.Item["ShopType"]; 1199 } 1200 <div class="e-cart-msg modal fade small" id="js-e-cart-msg" data-backdrop="false"> 1201 <div class="modal-dialog e-cart-msg-modal-dialog"> 1202 <div class="modal-content"> 1203 <div class="modal-header"> 1204 <h4 class="js-e-cart-msg-heading modal-title"> 1205 <i class="material-icons material-icons-large text-success">check_circle</i> 1206 <span>@Translate( "eCom Cart - Product Added - Heading", "Added to your cart" )</span> 1207 </h4> 1208 <button class="close" data-dismiss="modal" type="button"> 1209 <i class="material-icons">close</i> 1210 </button> 1211 </div> 1212 <div class="modal-body"> 1213 <div class="js-e-cart-msg-content"> 1214 <script id="js-e-handlebars-tmpl-cart-msg-lastadded" type="text/x-handlebars-template"> 1215 <div class="row"> 1216 {{#each cart.lastAdded}} 1217 <div class="col-12 py-1"> 1218 <div class="row"> 1219 <div class="col-4"> 1220 <a class="" href="{{url}}"> 1221 <img alt="" class="img-fluid" src="{{imageDefault}}"> 1222 </a> 1223 </div> 1224 <div class="col-8"> 1225 <h3 class="mb-0"> 1226 <a href="{{url}}" class="text-decoration-none">{{name}}</a> 1227 </h3> 1228 <p class="mb-0"> 1229 <a href="{{url}}" class="text-auto text-decoration-none"> 1230 {{{price}}} 1231 @if (ShopType?.ToString() != "B2C") 1232 { 1233 <span> 1234 <br> 1235 {{{stock.text}}}<br> 1236 {{{stock.delivery}}}<br> 1237 </span> 1238 } 12391240 </a> 1241 </p> 1242 </div> 1243 </div> 1244 </div> 1245 {{/each}} 1246 </div> 1247 </script> 1248 </div> 1249 </div> 1250 <div class="bg-info e-cart-msg-footer modal-footer border-top-0"> 1251 <a class="btn btn-secondary mr-1" href="/" data-dismiss="modal">@Translate( "eCom Cart - Continue Shopping - Button", "Continue shopping" )</a> 1252 <a class="arrow-right btn btn-primary" href="@cartUrl">@Translate( "eCom Cart - Checkout - Button", "Checkout" )</a> 1253 </div> 1254 </div> 1255 </div> 1256 </div> 12571258 </div> 12591260 @using Co3.Espresso.Base.Extensions @using Co3.Espresso.Website.Services @using Dynamicweb.Frontend <div class="modal fade e-search js-e-search js-e-search-modal modal-fullscreen" data-backdrop="false" data-keyboard="true" data-focus="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <a class="btn btn-sm btn-secondary js-e-back-link arrow-left" href="/" data-dismiss="modal"> @Translate("Search - Back button", "Back") </a> <div class="e-logo"> <a href="/" class="e-logo-link my-0"> <img src="@logoPrimary" class="e-logo-img e-logo-img-primary" alt="@Espresso.Area.Item.CompanyName"> <img src="@logoSecondary" class="e-logo-img e-logo-img-secondary" alt="@Espresso.Area.Item.CompanyName"> </a> </div> </div> <div class="modal-body"> <div class="container-fluid"> <div class="e-search-form-container"> <div class="row justify-content-center"> <div class="col-12 col-md-10 col-lg-8 col-xl-6 mt-3"> <form action="" class="e-search-form js-e-search-form"> <div class="js-e-search-input-group e-search-input-group is-empty"> <label class="e-search-label" for="e-search-input"><i class="material-icons">search</i></label> @{ string Translate_Search_InputText = Translate("Search - Input Placeholder - Text", "Search"); } <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"> <span class="js-e-search-clear e-search-clear"><i class="material-icons">close</i></span> <button class="e-search-submit btn btn-primary" type="submit"><i class="material-icons">search</i></button> </div> </form> </div> </div> </div> <div class="js-e-search-result-container e-search-result-container"> <div class="row justify-content-center"> <div class="col-12 col-md-10 col-lg-8 col-xl-6"> <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> </div> </div> <div class="row justify-content-center"> <div class="col-12 col-xl-10"> <div class="js-e-search-result-products e-search-result-products is-empty mb-4"> @{string productlistItemClassList = ProductlistService.Instance.GetGridItemWidth(null).ToResponsiveClasses();} <script id="js-e-handlebars-tmpl-search-result-item-product" type="text/x-handlebars-template"> <div class="e-products"> <div class="row justify-content-center"> {{#each products}} <div class="@productlistItemClassList"> <div class="card border-1 mb-6"> <a href="{{url}}"> @if (Espresso.Item.ModelProductlist == "True") { <img src="{{productlistDetailImage}}" alt="{{name}}" class="col-12 p-0"> } else { <img src="{{imageDefault}}" alt="{{name}}" class="col-12 p-0"> } {{#if news}} <div class="isabella-product-item-news"> @Translate("Ecom Product - News Badge - Text", "Nyhed") </div> {{/if}} </a> <div class="card-body p-1 p-lg-3"> <h4 class="e-products-item-name mb-0"> <a href="{{url}}"> {{{name}}} </a> </h4> {{#if shortDescription}} {{{shortDescription}}} {{/if}} @* @if (PageView.Current().Area.Name.Contains("webshop") != false) { <p class="e-products-item-text mt-2 mb-0 @Co3.Isabella.Dw.Services.ProductService.Instance.GetNoBuyB2CandB2B()" style="display: flex"> <small class="e-products-item-price small"> <a href="{{url}}" class="text-dark" style="text-decoration: none"> {{#if pimActive}}{{{price}}}{{else}}@Translate("eCom Product - Add To Cart Form Table - Accessory Discontinued - Text", "Udgået"){{/if}} </a> </small> <a href="{{url}}" style="left: 0" class="isabella-arrow arrow-primary-small ml-auto"></a> </p> } *@ </div> </div> </div> {{/each}} </div> <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> </div> </script> </div> </div> </div> <div class="row justify-content-center"> <div class="col-12 col-md-10 col-lg-8 col-xl-6"> <div class="js-e-search-result-pages e-search-result-pages is-empty mb-3"> <script id="js-e-handlebars-tmpl-search-result-item-page" type="text/x-handlebars-template"> <div class="row"> {{#each pages}} <div class="col-12"> <p class="mb-0"><a href="{{{url}}}" class="text-bold">{{{title}}}</a></p> <p class="mb-0 small text-truncate"> <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> <p class="small">{{{text}}}...</p> </div> {{/each}} </div> </script> </div> </div> </div> <div class="js-e-search-loading-overlay e-loading-overlay e-search-loading-overlay"> <div class="e-loading-spinner"></div> </div> </div> </div> </div> </div> </div> </div> 1261 @if( Espresso.Area.Item.BackToTopLink == "True" ){ 1262 <a href="#top" class="e-back-to-top js-e-back-to-top"><i class="material-icons">keyboard_arrow_up</i></a> 1263 } 126412651266 @* @using System.Web; 1267 @inherits Co3.Espresso.Website.TemplateBases.Pages.PageBase 12681269 @{ 1270 HttpCookie optInLevel = HttpContext.Current.Request.Cookies[ "Dynamicweb.CookieOptInLevel" ]; 1271 bool showCookieWarning = optInLevel == null; 1272 if ( optInLevel != null ) 1273 { 1274 showCookieWarning = optInLevel.Value != "2"; 1275 } 1276 } 12771278 @if ( showCookieWarning ) 1279 { 1280 <div class="e-cookie js-e-cookie py-1" hidden=""> 1281 <aside class="e-cookie-wrapper"> 1282 <section class="e-section"> 1283 <div class="container-fluid"> 1284 <div class="align-items-center row"> 1285 <div class="col-12 col-lg-10 col-md-9 my-1"> 1286 <p class="line-height-sm mb-0 small text-center text-md-left"> 1287 <span class="d-md-inline d-none"> 1288 @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" ) 1289 </span> 1290 <span class="d-md-none"> 1291 @Translate( "Cookie Warning - Message Short - Text", "This website uses cookies to improve your experience. Learn more about our" ) 1292 </span> 1293 &nbsp; 1294 <a href="@Espresso.Area.Item.CookieMessage">@Translate( "Cookie Warning - Policy - Link", "cookie policy" )</a> 1295 </p> 1296 </div> 1297 <div class="col-12 col-lg-2 col-md-3 my-1"> 1298 <p class="mb-0 text-center text-md-right"> 1299 <button class="btn e-cookie-accept-btn js-e-cookie-accept-btn" type="button"> 1300 @Translate( "Cookie Warning - Accept - Button", "OKAY" ) 1301 </button> 1302 </p> 1303 </div> 1304 </div> 1305 </div> 1306 </section> 1307 </aside> 1308 </div> 1309 } 13101311 @if ( 1 == 2 ) 1312 { 1313 @GetValue( "DwCookieWarning" ) 1314 } 13151316 *@ 13171318 <script data-cookieconsent="ignore" async="" src="/Files/Templates/Designs/isabella/_assets/_dist/js/default.js?v=3.1.0"></script> 1319 <script> 13201321 window.dataLayer.push({ 1322 'event':'ipEvent', 1323 'ipAddress' : '@Dynamicweb.Context.Current.Request.UserHostAddress' 1324 }); 1325 </script> 1326 </body> 13271328 @GetValue( "CopyRightNotice" ) 1329 </html> 1330