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_7d57fe4451474196918cc236115c76be.Execute() in D:\dynamicweb.net\Solutions\isabella.espresso4.dk\files\Templates\Designs\isabella\_parsed\espresso.parsed.cshtml:line 114
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 hostName = Dns.GetHostName(); 23 //List< string > visitorIP = ( from ip in host.AddressList where ip.AddressFamily == AddressFamily.InterNetwork select ip.ToString() ).ToList(); 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 @Espresso.CriticalJS 40 @*<meta name="description" content="@Espresso.DynamicwebPage.Description">*@ 41 <link rel="shortcut icon" href="@Espresso.Area.Item.Favicon"> 42 @GetValue( "MetaTags" ) 43 @if ( Espresso.IsStagingUrl ) 44 { 45 <meta content="noindex,nofollow" name="robots"> 46 } 47 <meta property="og:url" content="@openGraphUrl"> 48 <meta property="og:title" content="@Espresso.OpenGraphTitle"> 49 <meta property="og:description" content="@Espresso.OpenGraphDescription"> 50 <meta property="og:image" content="@openGraphImage"> 51 <meta property="og:type" content="website"> 52 <meta name="facebook-domain-verification" content="8kymtn6m9jq0t3gqsk3y6dqbadc3qf"> 53 @if ( string.IsNullOrEmpty( Espresso.Area.Item.GoogleSiteVerification ) == false ) 54 { 55 <meta name="google-site-verification" content="@Espresso.Area.Item.GoogleSiteVerification"> 56 } 57 @{ 58 if ( 1 == 2 ) 59 { 60 @GetValue( "Stylesheets" ) 61 } 62 } 63 64 @inherits Co3.Espresso.Website.TemplateBases.Pages.PageBase 65 @using System.Web; 66 @using System.IO 67 @using Dynamicweb.Content 68 @using Dynamicweb.Content.Items 69 @using Dynamicweb.Rendering 70 @using Dynamicweb.Frontend 71 72 <!-- Hreflang --> 73 @{ 74 @* Get areas from service *@ 75 Dynamicweb.Content.AreaService areaService = new Dynamicweb.Content.AreaService(); 76 IList<Area> areas = areaService.GetAreas(); 77 @* Get current page's relation-text from page-item *@ 78 string currentPageRelation = PageView.Current().Page.Item["PageRelation"] != null ? PageView.Current().Page.Item["PageRelation"].ToString() : string.Empty; 79 @* Frontpage must have 'frontpage' as relation-text *@ 80 81 string frontpageRelation = "i-frontpage"; 82 int REDIRECT_ID = 1; 83 if (PageView.Current().Area.Item["CustomWebsite"] != null && PageView.Current().Area.Item["CustomWebsite"].ToString() == "timeout-website") 84 { 85 frontpageRelation = "t-frontpage"; 86 REDIRECT_ID = 63; 87 } 88 string domainBase = areas.FirstOrDefault( a => a?.ID == REDIRECT_ID ).DomainLock; 89 List<dynamic> areaInfoList = new List< dynamic >(); 90 91 @* Iterate areas *@ 92 foreach ( Area area in areas ) 93 { 94 if ( area.Active == true && area.ID != REDIRECT_ID ) 95 { 96 97 @* Get current area's culture *@ 98 string culture = area.Culture; 99 string name = area.Name; 100 @* Check for IsDefault Hreflang on area *@ 101 string isDefaultHrefLang = area.Item[ "IsDefaultHrefLang" ] != null ? area.Item[ "IsDefaultHrefLang" ].ToString() : string.Empty; 102 @* Check for override-culture text on area *@ 103 string hreflangCultureOverride = area.Item[ "HreflangLanguageOverride" ] != null ? area.Item[ "HreflangLanguageOverride" ].ToString() : string.Empty; 104105 string isWebsiteExcluded = area.Item["ExcludeFromHreflang"] != null ? area.Item["ExcludeFromHreflang"]?.ToString() : string.Empty; 106 @* Get scheme and domain *@ 107 string scheme = GetGlobalValue("Global:Request.Scheme"); 108 string domain = domainBase; 109 @* If we have a primary domain call pageservice and get pages *@ 110111 string productId = HttpContext.Current.Request[ "productid" ]; 112 if (string.IsNullOrEmpty(productId) == false) 113 { 114 currentPageRelation = PageView.Current().Page.Parent.Item["PageRelation"].ToString(); 115 } 116117 if ( string.IsNullOrEmpty(currentPageRelation) == false && string.IsNullOrEmpty(domain) == false ) 118 { 119120121 Dynamicweb.Content.PageService pageService = new Dynamicweb.Content.PageService(); 122 IEnumerable< Dynamicweb.Content.Page > pages = pageService.GetPagesByAreaID(area.ID); 123 @* Iterate pages in area - check if is active + has item + has item-pagerelation + item-pagerelation equals current pagerelation *@ 124 foreach ( Dynamicweb.Content.Page page in pages.Where(p => p.Published && p.Item != null && p.Item[ "PageRelation" ] != null && p.Item[ "PageRelation" ].ToString().Equals(currentPageRelation)) ) 125 { 126127 string url = string.Empty; 128 if ( string.IsNullOrEmpty(productId) == false ) 129 { 130 @* Build url to area product page *@ 131 string prodUrl = string.Format("Default.aspx?ID={0}&ProductId={1}", pageService.GetPagesByParentID(page.ID)?.FirstOrDefault()?.ID, productId); 132 url = string.Format("{0}://{1}{2}", scheme, domain, SearchEngineFriendlyURLs.GetFriendlyUrl(prodUrl, area.EcomLanguageId)); 133 } 134 else 135 { 136 @* Build url to area page *@ 137 url = string.Format("{0}://{1}{2}", scheme, domain, SearchEngineFriendlyURLs.GetFriendlyUrl(page.GetPageHrefValue())); 138 } 139 @* If our current page relation match frontpage - set link to domain only *@ 140 if ( currentPageRelation == frontpageRelation ) 141 { 142 url = string.Format("{0}://{1}/{2}", scheme, domain, name); 143 } 144145 @* If our area item has checked in Default hreflang, we render x-default link *@ 146 if ( isDefaultHrefLang == "True" ) 147 { 148 <link rel="alternate" hreflang="x-default" href="@url"> 149 } 150 @* If we have a value in the area-item to overrule the culture, override the value here *@ 151 if ( string.IsNullOrEmpty(hreflangCultureOverride) == false ) 152 { 153 culture = hreflangCultureOverride; 154 } 155 @* Render hreflang-link *@ 156 if ( isWebsiteExcluded != "True") 157 { 158 <link rel="alternate" hreflang="@culture.ToLower()" href="@url"> 159 } 160161 } 162 } 163 } 164 } 165166 } 167 <!-- End Hreflang --> 168169 @if ( string.IsNullOrEmpty( Espresso.Area.GoogleTagManagerID ) == false && Espresso.Area.GoogleTagManagerID != "GTM-XXXX" ) 170 { 171 <!-- Google Tag Manager --> 172 <script> 173 (function(w, d, s, l, i) { 174 w[l] = w[l] || []; 175 w[l].push({ 176 'gtm.start': 177 new Date().getTime(), 178 event: 'gtm.js' 179 }); 180 var f = d.getElementsByTagName(s)[0], 181 j = d.createElement(s), 182 dl = l != 'dataLayer' ? '&l=' + l : ''; 183 j.async = true; 184 j.src = 185 'https://www.googletagmanager.com/gtm.js?id=' + i + dl; 186 f.parentNode.insertBefore(j, f); 187 })(window, document, 'script', 'dataLayer', '@Espresso.Area.GoogleTagManagerID'); 188 </script> 189 <!-- End Google Tag Manager --> 190 } 191192 <meta name="p:domain_verify" content="f3602094bd5d9d79dad3925721bc1ae4"> 193 <meta name="msvalidate.01" content="DF1E6C310BF3052B5579FABC80E4444D"> 194 <!-- ActiveCampaign --> 195 <script type="text/javascript" defer=""> 196197 (function(e,t,o,n,p,r,i){e.visitorGlobalObjectAlias=n; 198 e[e.visitorGlobalObjectAlias]=e[e.visitorGlobalObjectAlias]||function(){(e[e.visitorGlobalObjectAlias].q=e[e.visitorGlobalObjectAlias].q||[]).push(arguments)}; 199 e[e.visitorGlobalObjectAlias].l=(new Date).getTime(); 200 r=t.createElement("script"); 201 r.src=o;r.async=true; 202 i=t.getElementsByTagName("script")[0]; 203 i.parentNode.insertBefore(r,i)})(window,document,"https://diffuser-cdn.app-us1.com/diffuser/diffuser.js","vgo"); 204 vgo('setAccount', '254430349'); 205 vgo('setTrackByDefault', true); 206 vgo('process'); 207 </script> 208 <!-- ActiveCampaign --> 209 <!-- Sleeknote --> 210 <script id="sleeknoteScript" type="text/javascript"> 211 (function () { 212 var sleeknoteScriptTag = document.createElement("script"); 213 sleeknoteScriptTag.type = "text/javascript"; 214 sleeknoteScriptTag.charset = "utf-8"; 215 sleeknoteScriptTag.src = ("//sleeknotecustomerscripts.sleeknote.com/861.js"); 216 var s = document.getElementById("sleeknoteScript"); 217 s.parentNode.insertBefore(sleeknoteScriptTag, s); 218 })(); 219 </script> 220 <!-- End of Sleeknote signup and lead generation tool - www.sleeknote.com --> 221222 </dynamic></head> 223224 <body class="@Espresso.Item.CustomClasses @customWebsite" data-cart-currencycode="@Context.Currency.Code" data-shop-currencycode="@Pageview.Area.EcomCurrencyId" data-userauthenticated="@isUserAuthenticated.ToString().ToLower()"> 225 @if ( string.IsNullOrEmpty( Espresso.Area.GoogleTagManagerID ) == false && Espresso.Area.GoogleTagManagerID != "GTM-XXXX" ) 226 { 227 <!-- Google Tag Manager (noscript) --> 228 <noscript> 229 <iframe src="https://www.googletagmanager.com/ns.html?id=@Espresso.Area.GoogleTagManagerID" height="0" width="0" style="display: none; visibility: hidden"></iframe> 230 </noscript> 231 <!-- End Google Tag Manager (noscript) --> 232 } 233 @using Dynamicweb.Frontend 234 @inherits Co3.Espresso.Website.TemplateBases.Pages.PageBase 235 @{ 236 Espresso.Canvas.ClassList.AddClasses( "js-e-canvas is-loading" ); 237 if ( Espresso.Item.CanvasFullscreen == "True" ) 238 { 239 Espresso.Canvas.ClassList.AddClasses( "is-fullscreen" ); 240 } 241242 } 243244245246 @using System.Globalization 247 @using System.Security.Cryptography.X509Certificates 248 @using Co3.Espresso.Base.Extensions 249 @using Co3.Espresso.Website.Models.FrontEnd 250 @using Co3.Espresso.Website.Services 251 @using Co3.Isabella.Dw.Models.FrontEnd.Ecommerce 252 @using Dynamicweb.Content 253 @using Dynamicweb.Ecommerce.Products 254 @using Dynamicweb.Frontend 255 @using Dynamicweb.Rendering 256 @using Dynamicweb.Rendering.Translation 257 @using EcomContext = Dynamicweb.Ecommerce.Common.Context 258 @using eProductService = Co3.Espresso.Website.Services.ProductService 259260 @functions { 261262 public string getCountryCodeFromArea(Area area) 263 { 264 RegionInfo regionInfo = new RegionInfo( area.CultureInfo.LCID ); 265 return regionInfo.TwoLetterISORegionName; 266 } 267268 public string getCheckoutSetup(string shopType = "") 269 { 270 bool isB2bCheckout = PageView.Current().User != null; 271 string checkoutStepSetup = isB2bCheckout ? "shipping,customer,approve" : shopType == "B2C" ? "shipping,payment,approve" : "customer,approve"; 272 return checkoutStepSetup; 273 } 274275 public static string GetStandardCollapseToggleTextExpand() 276 { 277 return "Se mere"; 278 } 279280 public static string GetStandardCollapseToggleTextCollapse() 281 { 282 return "Se mindre"; 283 } 284285 public string getModelTypeLink() 286 { 287 bool isUserAuthenticated = PageView.Current().User != null; 288 string eComCountryCode = PageView.Current().Area.Item[ "EcommerceCountryCode" ] != null ? PageView.Current().Area.Item[ "EcommerceCountryCode" ].ToString() : ""; 289 string returnValue = string.Empty; 290291 if ( isUserAuthenticated == false ) 292 { 293 if ( string.IsNullOrEmpty(eComCountryCode) == false) 294 { 295 { 296 returnValue = string.Format( "Ecom:Product.CategoryField.ModelType.ModelTypeLink_{0}.Value", eComCountryCode ); 297 } 298 } 299 else 300 { 301 returnValue = "Ecom:Product.CategoryField.ModelType.ModelTypeLink.Value"; 302 } 303 } 304 else 305 { 306 if ( string.IsNullOrEmpty(eComCountryCode) == false) 307 { 308 { 309 returnValue = string.Format( "Ecom:Product.CategoryField.ModelType.ModelTypeLinkB2B_{0}.Value", eComCountryCode ); 310 } 311 } 312 else 313 { 314 returnValue = "Ecom:Product.CategoryField.ModelType.ModelTypeLinkB2B.Value"; 315 } 316 } 317318 return returnValue; 319 } 320321 } 322323 @helper ProductDescription(string sectionClasses = "e-section", bool sectionCollapse = false, string contentClasses = null, string heading = null, string content = null, string collapseToggleTextExpand = null, string collapseToggleTextCollapse = null) 324 { 325 if ( string.IsNullOrEmpty( content ) == false ) 326 { 327 ClassList headingClassList = new ClassList(); 328 headingClassList.AddClasses( "col-12" ); 329 ClassList contentClassList = new ClassList(); 330 contentClassList.AddClasses( "col-12" ); 331332 @sectionStart( sectionClasses: sectionClasses, sectionCollapse: sectionCollapse, contentClasses: contentClasses, collapseToggleTextCollapse: collapseToggleTextCollapse, collapseToggleTextExpand: collapseToggleTextExpand ) 333334 if ( string.IsNullOrEmpty( heading ) == false ) 335 { 336 <div class="@headingClassList"> 337 <h2>@heading</h2> 338 </div> 339 } 340 <div class="@contentClassList"> 341 @content 342 </div> 343344 @sectionEnd() 345 } 346 } 347348349 @helper ProductVideo(string sectionClasses = "e-section", string contentClasses = null, string heading = null, string videoURL = null) 350 { 351 if ( string.IsNullOrEmpty( videoURL ) == false ) 352 { 353 ClassList headingClassList = new ClassList(); 354 headingClassList.AddClasses( "col-12" ); 355 ClassList contentClassList = new ClassList(); 356 contentClassList.AddClasses( "col-12" ); 357358359 @sectionStart( sectionClasses: sectionClasses, contentClasses: contentClasses ) 360361 if ( string.IsNullOrEmpty( heading ) == false ) 362 { 363 <div class="@headingClassList"> 364 <h2>@heading</h2> 365 </div> 366 } 367368 <div class="@contentClassList"> 369 <div class="embed-responsive embed-responsive-16by9 mb-2"> 370 <iframe class="embed-responsive-item" src="@videoURL" width="1080" height="608" frameborder="0" webkitallowfullscreen="" mozallowfullscreen="" allowfullscreen=""></iframe> 371 </div> 372 </div> 373 @sectionEnd() 374 } 375 } 376377 @helper ProductRelatedProducts(string sectionClasses = "e-section", bool sectionCollapse = false, string contentClasses = null, string heading = null, string content = null, string collapseToggleTextExpand = null, string collapseToggleTextCollapse = null, 378 IEnumerable< Product > productLoop = null) 379 { 380 if ( productLoop != null && productLoop.Any() == true ) 381 { 382 ClassList headingClassList = new ClassList(); 383 headingClassList.AddClasses( "col-12" ); 384 ClassList contentClassList = new ClassList(); 385 contentClassList.AddClasses( "col-12" ); 386387 @sectionStart( sectionClasses: sectionClasses, sectionCollapse: sectionCollapse, contentClasses: contentClasses, collapseToggleTextCollapse: collapseToggleTextCollapse, collapseToggleTextExpand: collapseToggleTextExpand ) 388389 if ( string.IsNullOrEmpty( heading ) == false ) 390 { 391 <div class="@headingClassList"> 392 <h4 class="isabella-text-bullets-left mb-3">@heading</h4> 393 </div> 394 } 395 <div class="@contentClassList"> 396 <div class="e-products mb-2"> 397 <div class="row"> 398 @{ 399 string productlistItemClassList = "col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3"; 400 } 401 @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)) ) 402 { 403 @ProductlistItem(product, productlistItemClassList) 404 } 405 </div> 406 </div> 407 </div> 408409 @sectionEnd() 410 } 411 } 412413414 @helper ProductlistItem(Product product, string productlistItemClassList = null, string isModelProductList = null) 415 { 416 Dynamicweb.Ecommerce.Products.ProductService dwProductService = new Dynamicweb.Ecommerce.Products.ProductService(); 417418 string productLink = eProductService.Instance.GetProductLink( product.GetDefaultGroupByShopId( product.DefaultShopId ).Id, product.Id, product.VariantId ); 419 productLink = SearchEngineFriendlyURLs.GetFriendlyUrl( productLink ); 420421 string productlistDetailImage = product.Details.FirstOrDefault( pd => pd.Type == 0 && pd.GroupId == 4 )?.Value; 422423 if ( product != null ) 424 { 425 dynamic productData = new 426 { 427 id = product.Id, 428 url = productLink, 429 number = product.Number, 430 name = product.Name, 431 imageDefault = Co3.Isabella.Dw.Services.ImageService.Instance.GetImageURL( Dynamicweb.Ecommerce.Services.Details.GetDefaultDetail( product.Id, product.VariantId, 432 EcomContext.LanguageID )?.Value, 400, 225, 0, 75, "jpg", "/Files/Templates/Designs/isabella/_assets/img/NoImage.gif" ), 433 price = Co3.Isabella.Dw.Services.ProductService.Instance.GetPrice( product.Id ).Format(), 434 priceClean = Co3.Isabella.Dw.Services.ProductService.Instance.GetPrice( product.Id ).Price, 435 productIntroText = product.GetCategoryValue( "ProductsGeneral", "ProductIntroText" )?.ToString(), 436 news = product.GetCategoryValue( "ProductsGeneral", "News" )?.ToString(), 437 productType = product.GetCategoryValue( "ProductsGeneral", "ProductType" )?.ToString(), 438 isModelProductList = isModelProductList, 439 productlistDetailImage = Co3.Isabella.Dw.Services.ImageService.Instance.GetImageURL( productlistDetailImage ), 440 }; 441442 <div class="@productlistItemClassList"> 443 <div class="border-1 card mb-6"> 444 <a href="@productData.url"> 445 @if ( productData.isModelProductList == "True" ) 446 { 447 <img src="@productData.productlistDetailImage" alt="@productData.name @productData.productType" class="col-12 p-0"> 448 } 449 else 450 { 451 <img src="@productData.imageDefault" alt="@productData.name @productData.productType" class="col-12 p-0"> 452 } 453 @if ( productData.news == "True" ) 454 { 455 <div class="isabella-product-item-news"> 456 @Dynamicweb.Rendering.Translation.Translation.GetTranslation( "Ecom Product - News Badge - Text" ) 457 </div> 458 } 459 </a> 460 <div class="card-body p-1 p-lg-3"> 461 <h4 class="e-products-item-name mb-0"> 462 <a href="@productData.url"> 463 @productData.name 464 </a> 465 </h4> 466 @if ( string.IsNullOrEmpty( productData.productIntroText ) == false ) 467 { 468 @productData.productIntroText 469 } 470 </div> 471 </div> 472 </div> 473 } 474 } 475476477 @helper sectionStart(string sectionClasses = "e-section", string contentClasses = null, bool sectionCollapse = false, string sectionId = null, string collapseToggleTextExpand = null, string collapseToggleTextCollapse = null) 478 { 479 sectionId = string.IsNullOrEmpty( sectionId ) ? Guid.NewGuid().ToString( "N" ) : sectionId; 480 ClassList sectionClassList = new ClassList(); 481 sectionClassList.AddClasses( sectionClasses ); 482 ClassList contentClassList; 483484 if ( contentClasses == null ) 485 { 486 contentClassList = Co3.Espresso.Website.Services.PageService.Instance.GetResponsiveClassesFromPageItem( PageView.Current().Page.Item ); 487 } 488 else 489 { 490 contentClassList = new ClassList(); 491 contentClassList.AddClasses( contentClasses ); 492 } 493494 // TODO: Split collapse logic into separate helper function. 495 string collapseId = Guid.NewGuid().ToString( "N" ); 496 ClassList collapseToggleClassList = new ClassList(); 497 if ( sectionCollapse ) 498 { 499 sectionClassList.AddClasses( "p-section-collapse js-p-section-collapse" ); 500 collapseToggleClassList.AddClasses( contentClasses ); 501 collapseToggleClassList.AddClasses( "p-section-collapse-toggle collapsed order-last text-center" ); 502 contentClassList.AddClasses( "p-section-collapse-content collapse is-md" ); 503 } 504505 @:<section class="@sectionClassList" id="@sectionId"> 506 @:<div class="container-fluid"> 507 @:<div class="row"> 508509 // TODO: Split collapse logic into separate helper function. 510 if ( sectionCollapse ) 511 { 512 <div class="@collapseToggleClassList" data-toggle="collapse" data-target="#@collapseId"> 513 <button class="btn btn-primary p-section-collapse-toggle-btn" type="button"> 514 <i class="material-icons p-section-collapse-toggle-icon">keyboard_arrow_down</i> 515 </button> 516 <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> 517 </div> 518 } 519520 @:<div class="@contentClassList" id="@collapseId"> 521 @:<div class="row"> 522 } 523524 @helper sectionEnd() 525 { 526 @:</div> 527 @:</div> 528 @:</div> 529 @:</div> 530 @:</section> 531 } 532533534535536537 <div class="e-loading-overlay e-page-loading-overlay is-loading js-e-page-loading-overlay"> 538 <svg class="e-loading-spinner isabella-loading-spinner-logo" viewbox="0 0 316.9 383"> 539 <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 540 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 541 L264.2,150.9z"></path> 542 <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 543 C79.6,364.6,78.2,345.4,76.1,324.8"></path> 544 <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> 545 <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> 546 <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> 547 <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> 548 </svg> 549550551 </div> 552 @* https://medium.com/clio-calliope/making-google-fonts-faster-aadf3c02a36d *@ 553 @SnippetStart("webfonts") 554 <link crossorigin="" href="https://fonts.gstatic.com/" rel="preconnect"> 555 <link href="https://fonts.googleapis.com/css?family=IBM+Plex+Sans:400,700%7CMaterial+Icons" media="@Espresso.StylesheetAttributeMedia" rel="@Espresso.StylesheetAttributeRel" as="style"> 556 @SnippetEnd("webfonts") 557558559560 <div class="@Espresso.Canvas.ClassList"> 561 @using Dynamicweb.Frontend 562 @{ 563 ClassList headerClassList = new ClassList(); 564 headerClassList.AddClasses( "e-header js-e-header is-sticky" ); 565 if ( Espresso.Item.HeaderTransparent == "True" ) 566 { 567 headerClassList.AddClasses( "is-transparent" ); 568 } 569570 ClassList logoClassList = new ClassList(); 571 logoClassList.AddClasses( "e-logo" ); 572573 string backButtonLink = Espresso.Item.BackButtonLink; 574 ClassList backButtonClassList = new ClassList(); 575 ClassList backButtonIconClassList = new ClassList(); 576 if ( Espresso.Item.BackButton == "True" ) 577 { 578 backButtonClassList.AddClasses( "btn btn-sm btn-secondary my-1 align-self-center" ); 579 if ( backButtonLink == "" || backButtonLink == "/" ) 580 { 581 backButtonLink = "/"; 582 backButtonClassList.AddClasses( "js-e-back-link" ); 583 } 584 backButtonIconClassList.AddClasses( "material-icons material-icons-large" ); 585 if ( Espresso.Item.BackButtonPosition == "right" ) 586 { 587 backButtonClassList.AddClasses( "mr-0 ml-auto order-last" ); 588 logoClassList.AddClasses( "order-first" ); 589 } 590 else 591 { 592 backButtonClassList.AddClasses( "order-first" ); 593 logoClassList.AddClasses( "mr-0 ml-auto order-last" ); 594 } 595 if ( Espresso.Item.BackButtonIcon == "arrow_back" ) 596 { 597 backButtonClassList.AddClasses( "arrow-left" ); 598 backButtonIconClassList.AddClasses( "d-none" ); 599 } 600 else if ( Espresso.Item.BackButtonIcon == "arrow_forward" ) 601 { 602 backButtonClassList.AddClasses( "arrow-right" ); 603 backButtonIconClassList.AddClasses( "d-none" ); 604 } 605 } 606607 string logoPrimary = Espresso.Area.Item.LogoPrimary; 608 string logoSecondary = Espresso.Area.Item.LogoSecondary; 609 if ( string.IsNullOrEmpty( logoSecondary ) == true ) 610 { 611 logoSecondary = logoPrimary; 612 } 613 string tagline = Espresso.Area.Item.Tagline; 614 Dictionary< string, string > navigationHtml = new Dictionary< string, string > 615 { 616 { 617 "global", RenderNavigation( new 618 { 619 id = "dwnav-global", 620 template = "global.xslt", 621 startlevel = 1, 622 endlevel = 8, 623 expandmode = "all" 624 } ) 625 }, 626 { 627 "utilities-primary", RenderNavigation( new 628 { 629 id = "dwnav-utilities-primary", 630 template = "utilities.xslt", 631 startlevel = 4, 632 endlevel = 5, 633 expandmode = "all", 634 parenttag = "utilities-primary" 635 } ) 636 }, 637 { 638 "utilities-secondary", RenderNavigation( new 639 { 640 id = "dwnav-utilities-secondary", 641 template = "utilities.xslt", 642 startlevel = 4, 643 endlevel = 4, 644 expandmode = "all", 645 parenttag = "utilities-secondary" 646 } ) 647 }, 648 { 649 "hamburger-header", RenderNavigation( new 650 { 651 id = "dwnav-hamburger-header", 652 template = "utilities.xslt", 653 startlevel = 4, 654 endlevel = 4, 655 expandmode = "all", 656 parenttag = "hamburger-header" 657 } ) 658 }, 659 { 660 "hamburger-aside", RenderNavigation( new 661 { 662 id = "dwnav-hamburger-aside", 663 template = "utilities.xslt", 664 startlevel = 4, 665 endlevel = 4, 666 expandmode = "all", 667 parenttag = "hamburger-aside" 668 } ) 669 } 670 }; 671672 } 673 @if ( Espresso.Item.HeaderHide != "True" ) 674 { 675 <header class="@headerClassList" data-autohide="true"> 676677 <div class="e-header-hamburger"> 678 @sectionStart( "e-header-section e-section", "col-12" ) 679 <div class="col-12 e-header-section-content"> 680 <div class="@logoClassList"> 681 <a class="e-logo-link" href="/@globalAreaName/"> 682 <img src="@logoPrimary" class="e-logo-img e-logo-img-primary" alt="@Espresso.Area.Item.CompanyName"> 683 <img src="@logoSecondary" class="e-logo-img e-logo-img-secondary" alt="@Espresso.Area.Item.CompanyName"> 684 @if ( string.IsNullOrEmpty( tagline ) == false ) 685 { 686 <p class="e-logo-tagline">@tagline</p> 687 } 688 </a> 689 </div> 690 @if ( Espresso.Item.NavigationHide != "True" ) 691 { 692 <section class="e-nav-hamburger-header"> 693 <ul class="nav"> 694 @navigationHtml[ "hamburger-header" ] 695 @* TODO: Move to xslt *@ 696 <li class="e-nav-item-hamburger-open nav-item"> 697 <a class="nav-link" data-target=".modal.e-nav" data-toggle="modal" href="#"> 698 <i class="e-nav-pageicon material-icons">menu</i> 699 <span class="e-nav-pagename">@Translate( "Header - Hamburger menu open - Button", "Menu" )</span> 700 </a> 701 </li> 702 </ul> 703 </section> 704 } 705 @if ( Espresso.Item.BackButton == "True" ) 706 { 707 <a class="@backButtonClassList" href="@backButtonLink"> 708 @if ( Espresso.Item.BackButtonIcon != "" ) 709 { 710 <i class="@backButtonIconClassList">@Espresso.Item.BackButtonIcon</i> 711 } 712 @Espresso.Item.BackButtonText 713 </a> 714 } 715 </div> 716 @sectionEnd() 717 </div> 718 <div class="e-nav js-e-nav modal p-0" data-backdrop="false"> 719 <div class="e-nav-container navbar flex-column d-flex"> 720721 @sectionStart( "e-header-section e-header-section-primary e-section order-xl-2", "col-12" ) 722 <div class="col-12 e-header-section-content"> 723 <div class="@logoClassList"> 724 <a class="e-logo-link" href="/@globalAreaName/"> 725 <span class="d-none d-xl-inline">@GetSvgFileData(@logoPrimary)</span> 726 <img src="@logoSecondary" class="e-logo-img e-logo-img-secondary" alt="@Espresso.Area.Item.CompanyName"> 727 @if ( string.IsNullOrEmpty( tagline ) == false ) 728 { 729 <p class="e-logo-tagline">@tagline</p> 730 } 731 </a> 732 </div> 733734 @if ( Espresso.Item.NavigationHide != "True" ) 735 { 736 <nav class="e-nav-global js-e-nav-global"> 737 <ul class="nav"> 738 @navigationHtml[ "global" ] 739 </ul> 740 </nav> 741742 <div class="e-nav-item-hamburger-close"> 743 <a class="nav-link" data-target=".modal.e-nav" data-toggle="modal" href="#"> 744 <i class="e-nav-pageicon material-icons">close</i> 745 <span class="e-nav-pagename">@Translate( "Header - Hamburger menu close - Button", "Close" )</span> 746 </a> 747 </div> 748749 if ( string.IsNullOrEmpty( navigationHtml[ "utilities-primary" ] ) == false ) 750 { 751 @:</div> 752 @sectionEnd() 753 @sectionStart( "e-header-section e-header-section-secondary e-section order-xl-1", "col-12" ) 754 @:<div class="col-12 e-header-section-content"> 755756 <nav class="e-nav-utilities-primary js-e-nav-utilities-primary"> 757 <ul class="nav"> 758 @navigationHtml[ "utilities-primary" ] 759 </ul> 760 </nav> 761 } 762763 if ( string.IsNullOrEmpty( navigationHtml[ "utilities-secondary" ] ) == false ) 764 { 765 <nav class="e-nav-utilities-secondary"> 766 <ul class="nav"> 767 @navigationHtml[ "utilities-secondary" ] 768 </ul> 769 </nav> 770 } 771 if ( string.IsNullOrEmpty( navigationHtml[ "hamburger-aside" ] ) == false ) 772 { 773 <nav class="e-nav-hamburger-aside"> 774 <ul class="nav"> 775 @navigationHtml[ "hamburger-aside" ] 776 </ul> 777 </nav> 778 } 779 } 780 @if ( Espresso.Item.BackButton == "True" ) 781 { 782 <a class="@backButtonClassList" href="@backButtonLink"> 783 @if ( Espresso.Item.BackButtonIcon != "" ) 784 { 785 <i class="@backButtonIconClassList">@Espresso.Item.BackButtonIcon</i> 786 } 787 @Espresso.Item.BackButtonText 788 </a> 789 } 790 </div> 791 @sectionEnd() 792793 </div> 794 </div> 795796 </header> 797 } 798799 @helper GetSvgFileData(string svgfile) 800 { 801 string rtnValue = svgfile; 802 if (!string.IsNullOrEmpty(svgfile)) 803 { 804 string FilePath = svgfile; 805806 if (System.IO.Path.GetExtension(FilePath) == ".svg") 807 { 808 System.Xml.XmlReaderSettings settings = new System.Xml.XmlReaderSettings(); 809 settings.DtdProcessing = System.Xml.DtdProcessing.Ignore; 810 string svgFilePath = System.Web.HttpContext.Current.Server.MapPath(FilePath) ?? string.Empty; 811 if (System.IO.File.Exists(svgFilePath)) 812 { 813 using (System.IO.StreamReader sr = new System.IO.StreamReader(svgFilePath)) 814 { 815 using (System.Xml.XmlReader xr = System.Xml.XmlReader.Create(sr, settings)) 816 { 817 bool done = false; 818 while (xr.Read() && !done) 819 { 820 if (xr.NodeType == System.Xml.XmlNodeType.Element && xr.Name == "svg") 821 { 822 rtnValue = xr.ReadOuterXml(); 823 done = true; 824 } 825 } 826 } 827 } 828 } 829 } 830 } 831 @rtnValue; 832 } 833834835 @*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> } 836 @using Dynamicweb.Frontend 837 @using Dynamicweb.Security.UserManagement 838 @{ 839 User currentUser = PageView.Current().User; 840 if ( currentUser != null ) 841 { 842 User currentSecondaryUser = currentUser.CurrentSecondaryUser; 843 if ( currentSecondaryUser != null ) 844 { 845 @sectionStart( "e-section bg-warning e-text-dark js-e-section is-sticky zi-fixed py-1", "col-12 small" ) 846 <div class="align-self-center col-12 col-lg-9 col-md-8"> 847 <p class="line-height-sm mb-1 mb-md-0 text-center text-md-left"> 848 <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> 849 </p> 850 </div> 851 <div class="align-self-center col-12 col-lg-3 col-md-4"> 852 <form class="mb-0 small text-center text-md-right" method="post" action="@Espresso.Area.Item.ExtranetImpersonationPage"> 853 <button class="btn btn-primary" name="DwExtranetRemoveSecondaryUser" type="submit">@Translate( "Extranet Impersonation - Stop impersonation - Button", "Stop impersonation" )</button> 854 </form> 855 </div> 856 @sectionEnd() 857 } 858 } 859 } 860861862 <main id="dwcontentmain" class="e-content js-e-content @Espresso.ContentArea.ClassList"> 863 @using Dynamicweb.Content; 864 @using Dynamicweb.Extensibility; 865 @{ 866 string eBreadcrumbClasslist = "e-breadcrumb js-e-breadcrumb d-none d-lg-block"; 867 if ( Espresso.Item.Breadcrumb != "auto" && Espresso.Item.Breadcrumb != "none" && String.IsNullOrEmpty( Espresso.Item.Breadcrumb ) == false ) 868 { 869 eBreadcrumbClasslist += string.Format( " e-breadcrumb-{0}", Espresso.Item.Breadcrumb ); 870 } 871 string navigationHtmlBreadcrumb = RenderNavigation( new 872 { 873 id = "dwnav-breadcrumb", 874 template = "breadcrumb.xslt", 875 startlevel = 1, 876 endlevel = 10, 877 expandmode = "pathonly", 878 sitemapmode = true 879 } ); 880 } 881882 @if ( string.IsNullOrEmpty( navigationHtmlBreadcrumb ) == false && Espresso.Item.Breadcrumb != "none" && string.IsNullOrEmpty( Espresso.Item.Breadcrumb ) == false ) 883 { 884 <section class="e-section @eBreadcrumbClasslist"> 885 <div class="container-fluid"> 886 <div class="row"> 887 <div class="col-12"> 888 <div class="row"> 889890 <div class="col-12"> 891 <nav class="e-breadcrumb-container"> 892 <ol class="breadcrumb nav text-muted" itemscope="" itemtype="https://schema.org/BreadcrumbList"> 893 <li class="breadcrumb-item m-0 p-0"> 894 <a class="arrow-left breadcrumb-back-link js-e-back-link px-0" href="/">@Translate( "Breadcrumb - Back link", "Back" )</a> 895 <span class="breadcrumb-prefix-text"> 896 @Translate( "Breadcrumb - Prefix - Text", "You are here:" ) 897 </span> 898 <a href="/"> 899 @ServiceLocator.Current.GetPageService().GetFirstPageForArea( GetInteger( "DwAreaID" ) ).MenuText 900 </a> 901 </li> 902 @navigationHtmlBreadcrumb 903 </ol> 904 </nav> 905 </div> 906907 </div> 908 </div> 909 </div> 910 </div> 911 </section> 912 } 913914915 <article class="e-content-article"> 916 @{ 917 int NavigationLocalHorizontalParentPageId = 0; 918 if ( !string.IsNullOrEmpty( Espresso.Item.NavigationLocalParentPage ) ) 919 { 920 int.TryParse( Espresso.Item.NavigationLocalParentPage, out NavigationLocalHorizontalParentPageId ); 921 } 922 if ( NavigationLocalHorizontalParentPageId == 0 ) 923 { 924 NavigationLocalHorizontalParentPageId = PageView.Current().Page.ID; 925 if ( !Dynamicweb.Services.Pages.GetPagesByParentID( NavigationLocalHorizontalParentPageId ).Any() ) 926 { 927 NavigationLocalHorizontalParentPageId = PageView.Current().Page.ParentPageId; 928 } 929 } 930 string NavigationLocalHorizontalClassList = "e-nav-local e-nav-local-horizontal js-e-nav-local-horizontal"; 931 string NavigationLocalHorizontalContainerClassList = "e-nav-local-container"; 932 string NavigationLocalHorizontalTemplate = "local-" + Espresso.Item.NavigationLocalLayout + ".xslt"; 933 if ( string.IsNullOrEmpty( Espresso.Item.NavigationLocalTemplate ) == false && Path.GetExtension( Espresso.Item.NavigationLocalTemplate ) == ".xslt" ) 934 { 935 NavigationLocalHorizontalTemplate = Path.GetFileName( Espresso.Item.NavigationLocalTemplate ); 936 } 937938 if ( Espresso.Item.NavigationLocalShow == "True" && Espresso.Item.NavigationLocalLayout == "horizontal" ) 939 { 940 NavigationLocalHorizontalClassList += " " + Espresso.Item.NavigationLocalCustomClasses; 941 if ( Espresso.Item.NavigationLocalSticky == "True" ) 942 { 943 NavigationLocalHorizontalClassList += " is-sticky"; 944 } 945 if ( Espresso.Item.NavigationLocalAbsolute == "True" ) 946 { 947 NavigationLocalHorizontalClassList += " is-absolute"; 948 } 949 else 950 { 951 if ( Espresso.Item.NavigationLocalMarginTop != "0" && Espresso.Item.NavigationLocalMarginTop != "" ) 952 { 953 NavigationLocalHorizontalClassList += " mt-" + Espresso.Item.NavigationLocalMarginTop; 954 } 955 if ( Espresso.Item.NavigationLocalMarginBottom != "0" && Espresso.Item.NavigationLocalMarginBottom != "" ) 956 { 957 NavigationLocalHorizontalClassList += " mb-" + Espresso.Item.NavigationLocalMarginBottom; 958 } 959 } 960 } 961 } 962 @if ( Espresso.Item.NavigationLocalShow == "True" && Espresso.Item.NavigationLocalLayout == "horizontal" ) 963 { 964 <section class="e-section @NavigationLocalHorizontalClassList"> 965 <div class="container-fluid"> 966 <div class="row"> 967 <div class="col-12"> 968 <div class="row"> 969970 <div class="col-12"> 971 <nav id="dwnav-local-horizontal-@NavigationLocalHorizontalParentPageId" class="@NavigationLocalHorizontalContainerClassList"> 972 <ul class="justify-content-start nav"> 973 @if ( Espresso.Item.NavigationLocalHeading != "" ) 974 { 975 <li class="e-nav-local-heading"> 976 <h2>@Espresso.Item.NavigationLocalHeading</h2> 977 </li> 978 } 979 @RenderNavigation( new 980 { 981 id = "dwnav-local-horizontal-" + NavigationLocalHorizontalParentPageId, 982 parentid = NavigationLocalHorizontalParentPageId, 983 template = NavigationLocalHorizontalTemplate, 984 startlevel = Espresso.Item.NavigationLocalLevelStart, 985 endlevel = Espresso.Item.NavigationLocalLevelEnd, 986 expandmode = Espresso.Item.NavigationLocalPageTreeExpand == "True" ? "all" : "path" 987 } ) 988 </ul> 989 </nav> 990 </div> 991992 </div> 993 </div> 994 </div> 995 </div> 996 </section> 997 } 9989991000 @{ 1001 int NavigationLocalVerticalParentPageId = 0; 1002 if ( !string.IsNullOrEmpty( Espresso.Item.NavigationLocalParentPage ) ) 1003 { 1004 int.TryParse( Espresso.Item.NavigationLocalParentPage, out NavigationLocalVerticalParentPageId ); 1005 } 1006 if ( NavigationLocalVerticalParentPageId == 0 ) 1007 { 1008 NavigationLocalVerticalParentPageId = PageView.Current().Page.ID; 1009 if ( !Dynamicweb.Services.Pages.GetPagesByParentID( NavigationLocalVerticalParentPageId ).Any() ) 1010 { 1011 NavigationLocalVerticalParentPageId = PageView.Current().Page.ParentPageId; 1012 } 1013 } 10141015 string NavigationLocalVerticalClassList = "e-nav-local e-nav-local-vertical js-e-nav-local-vertical"; 1016 string NavigationLocalVerticalContainerClassList = "e-nav-local-container"; 1017 string NavigationLocalVerticalTemplate = "local-" + Espresso.Item.NavigationLocalLayout + ".xslt"; 1018 if ( string.IsNullOrEmpty( Espresso.Item.NavigationLocalTemplate ) == false && Path.GetExtension( Espresso.Item.NavigationLocalTemplate ) == ".xslt" ) 1019 { 1020 NavigationLocalVerticalTemplate = Path.GetFileName( Espresso.Item.NavigationLocalTemplate ); 1021 } 10221023 if ( Espresso.Item.NavigationLocalShow == "True" && Espresso.Item.NavigationLocalLayout == "vertical" ) 1024 { 1025 NavigationLocalVerticalClassList += " " + Espresso.Item.NavigationLocalCustomClasses; 10261027 if ( Espresso.Item.NavigationLocalMarginTop != "0" && Espresso.Item.NavigationLocalMarginTop != "" ) 1028 { 1029 NavigationLocalVerticalClassList += " mt-" + Espresso.Item.NavigationLocalMarginTop; 1030 } 1031 if ( Espresso.Item.NavigationLocalMarginBottom != "0" && Espresso.Item.NavigationLocalMarginBottom != "" ) 1032 { 1033 NavigationLocalVerticalClassList += " mb-" + Espresso.Item.NavigationLocalMarginBottom; 1034 } 10351036 if ( Espresso.Item.NavigationLocalSticky == "True" ) 1037 { 1038 NavigationLocalVerticalClassList += " is-sticky"; 1039 } 10401041 if ( Espresso.Item.NavigationLocalAbsolute == "True" ) 1042 { 1043 NavigationLocalVerticalClassList += " is-absolute"; 1044 } 1045 else 1046 { 1047 Espresso.ContentSection.ClassList.Clear(); 1048 Espresso.ContentSection.ClassList.AddClasses( "wtf col-12 col-lg-9 ml-auto" ); 1049 } 1050 } 1051 } 10521053 @if ( Espresso.Item.NavigationLocalShow == "True" && Espresso.Item.NavigationLocalLayout == "vertical" ) 1054 { 1055 <section class="e-section @NavigationLocalVerticalClassList"> 1056 <div class="container-fluid"> 1057 <div class="row"> 1058 <div class="col-12"> 1059 <div class="row"> 10601061 <div class="col-3"> 1062 <nav id="dwnav-local-@NavigationLocalVerticalParentPageId" class="@NavigationLocalVerticalContainerClassList"> 1063 <ul class="flex-column nav"> 1064 @if ( Espresso.Item.NavigationLocalHeading != "" ) 1065 { 1066 <li class="e-nav-local-heading"> 1067 <h2>@Espresso.Item.NavigationLocalHeading</h2> 1068 </li> 1069 } 1070 @RenderNavigation( new 1071 { 1072 id = "dwnav-local-" + NavigationLocalVerticalParentPageId, 1073 parentid = NavigationLocalVerticalParentPageId, 1074 template = NavigationLocalVerticalTemplate, 1075 startlevel = Espresso.Item.NavigationLocalLevelStart, 1076 endlevel = Espresso.Item.NavigationLocalLevelEnd, 1077 expandmode = Espresso.Item.NavigationLocalPageTreeExpand == "True" ? "all" : "path", 1078 } ) 1079 </ul> 1080 </nav> 1081 </div> 10821083 </div> 1084 </div> 1085 </div> 1086 </div> 1087 </section> 1088 } 108910901091 @sectionStart() 1092 @GetValue("DwContent(dwcontentmain)") 1093 @sectionEnd() 1094 </article> 1095 </main> 1096 @{ 1097 string FooterContentClassList = "e-footer-content e-section"; 1098 } 1099 @if ( Espresso.Item.FooterHide != "True" ) 1100 { 1101 <footer class="e-footer"> 1102 <article class="e-footer-wrapper"> 1103 <section class="@FooterContentClassList"> 1104 <div class="container-fluid"> 1105 <div class="row"> 1106 @if ( !string.IsNullOrEmpty( Espresso.Area.Item.FooterPageId ) ) 1107 { 1108 @RenderPageContent( int.Parse( Espresso.Area.Item.FooterPageId ) ) 1109 } 1110 </div> 1111 </div> 1112 </section> 1113 <section class="e-footer-copyright e-section"> 1114 <div class="container-fluid"> 1115 <div class="align-items-baseline row"> 1116 <div class="col-12 col-lg-5"> 1117 @if (string.IsNullOrEmpty(Espresso.Area.Item.Adresse) == false) 1118 { 1119 @Espresso.Area.Item.Adresse 1120 } 1121 </div> 1122 <div class="col-12 col-lg-4"> 1123 @if ( string.IsNullOrEmpty( GetString( "DwNavigation(dwnavutilitiessecondaryfooter)" ) ) == false ) 1124 { 1125 <div class="col-12 p-0"> 1126 <aside class="e-nav-utilities-secondary"> 1127 <ul class="nav nav-inline"> 1128 @GetValue("DwNavigation(dwnavutilitiessecondaryfooter)") 1129 </ul> 1130 </aside> 1131 </div> 1132 } 1133 </div> 1134 <div class="col-12 col-lg-3 text-lg-right"> 1135 <p class="e-copyright nav-link"> 1136 @*@Translate( "Footer - Copyright - Text", "Copyright &copy;" )&nbsp;*@ 1137 @*@DateTime.Now.Year.ToString()&nbsp;*@ 1138 @Translate( "Footer - All Rights Reserved - Text", "All rights reserved." )&nbsp; 1139 @Espresso.Area.Item.CompanyName.&nbsp; 1140 </p> 1141 </div> 1142 </div> 1143 </div> 1144 </section> 1145 </article> 1146 </footer> 1147 } 1148 @if( string.IsNullOrEmpty( GetString("DwContent(dwcontentcta)") ) == false ) { 1149 <aside id="dwcontentcta" class="js-e-cta e-cta is-hidden fixed-top"> 1150 <section class="e-section"> 1151 <div class="container-fluid"> 1152 <div class="row no-gutters"> 1153 <div class="col-12"> 1154 <div class="row no-gutters justify-content-center align-items-center"> 1155 @GetValue("DwContent(dwcontentcta)") 1156 @* <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> *@ 1157 </div> 1158 </div> 1159 </div> 1160 </div> 1161 </section> 1162 </aside> 1163 } 11641165 @using Dynamicweb.Frontend 11661167 @{ 1168 string cartUrl = "/cart"; 11691170 if ( PageView.Current().Area.Name.Contains( "webshop" ) == false ) 1171 { 1172 cartUrl = string.Format("{0}{1}", PageView.Current().Area.Name, cartUrl); 1173 } 1174 else 1175 { 1176 cartUrl = string.Format("{0}/shop{1}", PageView.Current().Area.Name.ToLower(), cartUrl); 1177 } 11781179 var ShopType = PageView.Current().Area.Item["ShopType"]; 1180 } 1181 <div class="e-cart-msg modal fade small" id="js-e-cart-msg" data-backdrop="false"> 1182 <div class="modal-dialog e-cart-msg-modal-dialog"> 1183 <div class="modal-content"> 1184 <div class="modal-header"> 1185 <h4 class="js-e-cart-msg-heading modal-title"> 1186 <i class="material-icons material-icons-large text-success">check_circle</i> 1187 <span>@Translate( "eCom Cart - Product Added - Heading", "Added to your cart" )</span> 1188 </h4> 1189 <button class="close" data-dismiss="modal" type="button"> 1190 <i class="material-icons">close</i> 1191 </button> 1192 </div> 1193 <div class="modal-body"> 1194 <div class="js-e-cart-msg-content"> 1195 <script id="js-e-handlebars-tmpl-cart-msg-lastadded" type="text/x-handlebars-template"> 1196 <div class="row"> 1197 {{#each cart.lastAdded}} 1198 <div class="col-12 py-1"> 1199 <div class="row"> 1200 <div class="col-4"> 1201 <a class="" href="{{url}}"> 1202 <img alt="" class="img-fluid" src="{{imageDefault}}"> 1203 </a> 1204 </div> 1205 <div class="col-8"> 1206 <h3 class="mb-0"> 1207 <a href="{{url}}" class="text-decoration-none">{{name}}</a> 1208 </h3> 1209 <p class="mb-0"> 1210 <a href="{{url}}" class="text-auto text-decoration-none"> 1211 {{{price}}} 1212 @if (ShopType?.ToString() != "B2C") 1213 { 1214 <span> 1215 <br> 1216 {{{stock.text}}}<br> 1217 {{{stock.delivery}}}<br> 1218 </span> 1219 } 12201221 </a> 1222 </p> 1223 </div> 1224 </div> 1225 </div> 1226 {{/each}} 1227 </div> 1228 </script> 1229 </div> 1230 </div> 1231 <div class="bg-info e-cart-msg-footer modal-footer border-top-0"> 1232 <a class="btn btn-secondary mr-1" href="/" data-dismiss="modal">@Translate( "eCom Cart - Continue Shopping - Button", "Continue shopping" )</a> 1233 <a class="arrow-right btn btn-primary" href="@cartUrl">@Translate( "eCom Cart - Checkout - Button", "Checkout" )</a> 1234 </div> 1235 </div> 1236 </div> 1237 </div> 12381239 </div> 12401241 @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> 1242 @if( Espresso.Area.Item.BackToTopLink == "True" ){ 1243 <a href="#top" class="e-back-to-top js-e-back-to-top"><i class="material-icons">keyboard_arrow_up</i></a> 1244 } 124512461247 @* @using System.Web; 1248 @inherits Co3.Espresso.Website.TemplateBases.Pages.PageBase 12491250 @{ 1251 HttpCookie optInLevel = HttpContext.Current.Request.Cookies[ "Dynamicweb.CookieOptInLevel" ]; 1252 bool showCookieWarning = optInLevel == null; 1253 if ( optInLevel != null ) 1254 { 1255 showCookieWarning = optInLevel.Value != "2"; 1256 } 1257 } 12581259 @if ( showCookieWarning ) 1260 { 1261 <div class="e-cookie js-e-cookie py-1" hidden=""> 1262 <aside class="e-cookie-wrapper"> 1263 <section class="e-section"> 1264 <div class="container-fluid"> 1265 <div class="align-items-center row"> 1266 <div class="col-12 col-lg-10 col-md-9 my-1"> 1267 <p class="line-height-sm mb-0 small text-center text-md-left"> 1268 <span class="d-md-inline d-none"> 1269 @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" ) 1270 </span> 1271 <span class="d-md-none"> 1272 @Translate( "Cookie Warning - Message Short - Text", "This website uses cookies to improve your experience. Learn more about our" ) 1273 </span> 1274 &nbsp; 1275 <a href="@Espresso.Area.Item.CookieMessage">@Translate( "Cookie Warning - Policy - Link", "cookie policy" )</a> 1276 </p> 1277 </div> 1278 <div class="col-12 col-lg-2 col-md-3 my-1"> 1279 <p class="mb-0 text-center text-md-right"> 1280 <button class="btn e-cookie-accept-btn js-e-cookie-accept-btn" type="button"> 1281 @Translate( "Cookie Warning - Accept - Button", "OKAY" ) 1282 </button> 1283 </p> 1284 </div> 1285 </div> 1286 </div> 1287 </section> 1288 </aside> 1289 </div> 1290 } 12911292 @if ( 1 == 2 ) 1293 { 1294 @GetValue( "DwCookieWarning" ) 1295 } 12961297 *@ 12981299 <script data-cookieconsent="ignore" async="" src="/Files/Templates/Designs/isabella/_assets/_dist/js/default.js?v=3.0.8"></script> 1300 <script> 13011302 window.dataLayer.push({ 1303 'event':'ipEvent', 1304 'ipAddress' : '@Dynamicweb.Context.Current.Request.UserHostAddress' 1305 }); 1306 </script> 1307 </body> 13081309 @GetValue( "CopyRightNotice" ) 1310 </html> 1311