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_3661ba096d45474981ffba767a9311b0.Execute() in F:\dynamicweb.net\Solutions\isabella.espresso4.dk\Files\Templates\Designs\isabella\_parsed\espresso.parsed.cshtml:line 57
at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader)
at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<RunCompile>b__0(TextWriter writer)
at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template)
at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template)
at Dynamicweb.Rendering.Template.RenderRazorTemplate()
1 @inherits Co3.Espresso.Website.TemplateBases.Pages.PageBase
2 @using System.IO
3 @using System.Web
4 @using Co3.Espresso.Website.Services
5 @using Dynamicweb.Admin.dk.dynamicweb.templates
6 @using Dynamicweb.Ecommerce.Common
7 @using Dynamicweb.Frontend
8 @using System.Net
9 @using System.Net.Sockets
10 @{
11 string globalAreaLang = PageView.Current().Area.CultureInfo.TwoLetterISOLanguageName;
12 string globalAreaName = string.Empty;
13 globalAreaName = PageView.Current().Area.Name;
14 string currencySeparatorDecimal = PageView.Current().Area.CultureInfo.NumberFormat.NumberDecimalSeparator;
15 string currencySeparatorInteger = PageView.Current().Area.CultureInfo.NumberFormat.NumberGroupSeparator;
16 bool isProductPage = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request["productid"]);
17 string openGraphUrl = PageView.Current().SearchFriendlyUrl;
18 string openGraphImage = HttpContext.Current.Request.Url.Scheme + "://" + HttpContext.Current.Request.Url.Host + Espresso.OpenGraphImage;
19 string openGraphTitle = Espresso.OpenGraphTitle;
20 string openGraphDescription = Espresso.OpenGraphDescription;
21 if (string.IsNullOrEmpty(openGraphImage))
22 {
23 openGraphImage = HttpContext.Current.Request.Url.Scheme + "://" + HttpContext.Current.Request.Url.Host + (string)PageView.Current().Area.Item["OpenGraphImage"];
24 }
25 if (string.IsNullOrEmpty(openGraphTitle))
26 {
27 openGraphTitle = (string)PageView.Current().Area.Item["OpenGraphTitle"];
28 }
29 if (string.IsNullOrEmpty(openGraphDescription))
30 {
31 openGraphDescription = (string)PageView.Current().Area.Item["OpenGraphDescription"];
32 }
33 34 35 bool isUserAuthenticated = PageView.Current().User != null;
36 string webfontsSnippetHtml = RenderSnippet( "webfonts" ).ToString().Trim();
37 string customWebsite = PageView.Current().Area.Item["CustomWebsite"]?.ToString();
38 string shopType = PageView.Current().Area.Item["ShopType"]?.ToString();
39 string isOutletClass = shopType == "Outlet" ? "is-outlet" : string.Empty;
40 }
41 42 <!DOCTYPE html>
43 <html lang="@globalAreaLang" data-separator-integer="@currencySeparatorInteger" data-separator-decimal="@currencySeparatorDecimal" data-area="@globalAreaName" data-shop="@shopType">
44 <head>
45 @GetValue( "CopyRightNotice" )
46 <meta charset="utf-8">
47 <meta content="width=device-width, initial-scale=1, shrink-to-fit=no, minimal-ui" name="viewport">
48 <meta content="ie=edge" http-equiv="x-ua-compatible">
49 <title>@GetValue("Title")</title>
50 @Espresso.CriticalCSS
51 @if ( webfontsSnippetHtml != "<!--$$Snippet(webfonts)-->" )
52 {
53 @webfontsSnippetHtml
54 }
55 <link href="/Files/Templates/Designs/isabella/_assets/_dist/css/default.css?v=1.11" media="@Espresso.StylesheetAttributeMedia" rel="@Espresso.StylesheetAttributeRel" as="style">
56 57 @Espresso.CriticalJS
58 @*<meta name="description" content="@Espresso.DynamicwebPage.Description">*@
59 <link rel="shortcut icon" href="@Espresso.Area.Item.Favicon">
60 @GetValue( "MetaTags" )
61 @if ( Espresso.IsStagingUrl )
62 {
63 <meta content="noindex,nofollow" name="robots">
64 }
65 @if (isProductPage)
66 {
67 @RenderSnippet( "ProductOpenGraph" )
68 }
69 else
70 {
71 <meta property="og:title" content="@openGraphTitle">
72 <meta property="og:description" content="@openGraphDescription">
73 <meta property="og:image" content="@openGraphImage">
74 }
75 <meta property="og:url" content="@openGraphUrl">
76 <meta property="og:type" content="website">
77 78 <meta name="facebook-domain-verification" content="8kymtn6m9jq0t3gqsk3y6dqbadc3qf">
79 @if ( string.IsNullOrEmpty( Espresso.Area.Item.GoogleSiteVerification ) == false )
80 {
81 <meta name="google-site-verification" content="@Espresso.Area.Item.GoogleSiteVerification">
82 }
83 @{
84 if ( 1 == 2 )
85 {
86 @GetValue( "Stylesheets" )
87 }
88 }
89 90 @inherits Co3.Espresso.Website.TemplateBases.Pages.PageBase
91 @using System.Web;
92 @using System.IO
93 @using Dynamicweb.Content
94 @using Dynamicweb.Content.Items
95 @using Dynamicweb.Rendering
96 @using Dynamicweb.Frontend
97 98 <!-- Hreflang -->
99 @{
100 @* Get areas from service *@
101 Dynamicweb.Content.AreaService areaService = new Dynamicweb.Content.AreaService();
102 IList<Area> areas = areaService.GetAreas();
103 @* Get current page's relation-text from page-item *@
104 string currentPageRelation = PageView.Current().Page.Item["PageRelation"] != null ? PageView.Current().Page.Item["PageRelation"].ToString() : string.Empty;
105 @* Frontpage must have 'frontpage' as relation-text *@
106107 string frontpageRelation = "i-frontpage";
108 int REDIRECT_ID = 1;
109 if (PageView.Current().Area.Item["CustomWebsite"] != null && PageView.Current().Area.Item["CustomWebsite"].ToString() == "timeout-website")
110 {
111 frontpageRelation = "t-frontpage";
112 REDIRECT_ID = 63;
113 }
114 string domainBase = areas.FirstOrDefault( a => a?.ID == REDIRECT_ID ).DomainLock;
115 List<dynamic> areaInfoList = new List< dynamic >();
116117 @* Iterate areas *@
118 foreach ( Area area in areas )
119 {
120 if ( area.Active == true && area.ID != REDIRECT_ID )
121 {
122123 @* Get current area's culture *@
124 string culture = area.Culture;
125 string name = area.Name;
126 @* Check for IsDefault Hreflang on area *@
127 string isDefaultHrefLang = area.Item[ "IsDefaultHrefLang" ] != null ? area.Item[ "IsDefaultHrefLang" ].ToString() : string.Empty;
128 @* Check for override-culture text on area *@
129 string hreflangCultureOverride = area.Item[ "HreflangLanguageOverride" ] != null ? area.Item[ "HreflangLanguageOverride" ].ToString() : string.Empty;
130131 string isWebsiteExcluded = area.Item["ExcludeFromHreflang"] != null ? area.Item["ExcludeFromHreflang"]?.ToString() : string.Empty;
132 @* Get scheme and domain *@
133 string scheme = GetGlobalValue("Global:Request.Scheme");
134 string domain = domainBase;
135 @* If we have a primary domain call pageservice and get pages *@
136137 string productId = HttpContext.Current.Request[ "productid" ];
138 if (string.IsNullOrEmpty(productId) == false)
139 {
140 if (PageView.Current().Page.Parent != null && PageView.Current().Page.Parent.Item != null && PageView.Current().Page.Parent.Item["PageRelation"] != null)
141 {
142 currentPageRelation = PageView.Current().Page.Parent.Item["PageRelation"].ToString();
143 }
144145 }
146147 if ( string.IsNullOrEmpty(currentPageRelation) == false && string.IsNullOrEmpty(domain) == false )
148 {
149150151 Dynamicweb.Content.PageService pageService = new Dynamicweb.Content.PageService();
152 IEnumerable< Dynamicweb.Content.Page > pages = pageService.GetPagesByAreaID(area.ID);
153 @* Iterate pages in area - check if is active + has item + has item-pagerelation + item-pagerelation equals current pagerelation *@
154 foreach ( Dynamicweb.Content.Page page in pages.Where(p => p.Published && p.Item != null && p.Item[ "PageRelation" ] != null && p.Item[ "PageRelation" ].ToString().Equals(currentPageRelation)) )
155 {
156157 string url = string.Empty;
158 if ( string.IsNullOrEmpty(productId) == false )
159 {
160 @* Build url to area product page *@
161 string prodUrl = string.Format("Default.aspx?ID={0}&ProductId={1}", pageService.GetPagesByParentID(page.ID)?.FirstOrDefault()?.ID, productId);
162 url = string.Format("{0}://{1}{2}", scheme, domain, SearchEngineFriendlyURLs.GetFriendlyUrl(prodUrl, area.EcomLanguageId));
163 }
164 else
165 {
166 @* Build url to area page *@
167 url = string.Format("{0}://{1}{2}", scheme, domain, SearchEngineFriendlyURLs.GetFriendlyUrl(page.GetPageHrefValue()));
168 }
169 @* If our current page relation match frontpage - set link to domain only *@
170 if ( currentPageRelation == frontpageRelation )
171 {
172 url = string.Format("{0}://{1}/{2}", scheme, domain, name);
173 }
174175 @* If our area item has checked in Default hreflang, we render x-default link *@
176 if ( isDefaultHrefLang == "True" )
177 {
178 <link rel="alternate" hreflang="x-default" href="@url">
179 }
180 @* If we have a value in the area-item to overrule the culture, override the value here *@
181 if ( string.IsNullOrEmpty(hreflangCultureOverride) == false )
182 {
183 culture = hreflangCultureOverride;
184 }
185 @* Render hreflang-link *@
186 if ( isWebsiteExcluded != "True")
187 {
188 <link rel="alternate" hreflang="@culture.ToLower()" href="@url">
189 }
190191 }
192 }
193 }
194 }
195196 }
197 <!-- End Hreflang -->
198199 <!-- Google Tag Manager -->
200 <script>!function(){"use strict";function l(e){for(var t=e,r=0,n=document.cookie.split(";");r<n.length;r++){var o=n[r].split("=");if(o[0].trim()===t)return o[1]}}function s(e){return localStorage.getItem(e)}function u(e){return window[e]}function d(e,t){e=document.querySelector(e);return t?null==e?void 0:e.getAttribute(t):null==e?void 0:e.textContent}var e=window,t=document,r="script",n="dataLayer",o="TT2Z6XF",a="https://ss.isabella.net",i="",c="vchxjrma",E="stapeUserId",I="",v="",g=!1;try{var g=!!E&&(m=navigator.userAgent,!!(m=new RegExp("Version/([0-9._]+)(.*Mobile)?.*Safari.*").exec(m)))&&16.4<=parseFloat(m[1]),A="stapeUserId"===E,f=g&&!A?function(e,t,r){void 0===t&&(t="");var n={cookie:l,localStorage:s,jsVariable:u,cssSelector:d},t=Array.isArray(t)?t:[t];if(e&&n[e])for(var o=n[e],a=0,i=t;a<i.length;a++){var c=i[a],c=r?o(c,r):o(c);if(c)return c}else console.warn("invalid uid source",e)}(E,I,v):void 0;g=g&&(!!f||A)}catch(e){console.error(e)}var m=e,E=(m[n]=m[n]||[],m[n].push({"gtm.start":(new Date).getTime(),event:"gtm.js"}),t.getElementsByTagName(r)[0]),I="dataLayer"===n?"":"&l="+n,v=f?"&bi="+encodeURIComponent(f):"",A=t.createElement(r),e=g?"kp"+c:c,n=!g&&i?i:a;A.async=!0,A.src=n+"/"+e+".js?st="+o+I+v,null!=(f=E.parentNode)&&f.insertBefore(A,E)}();</script>
201 <!-- End Google Tag Manager -->
202203204 <meta name="p:domain_verify" content="f3602094bd5d9d79dad3925721bc1ae4">
205 <meta name="msvalidate.01" content="DF1E6C310BF3052B5579FABC80E4444D">
206 <!-- ActiveCampaign -->
207 <script type="text/javascript" defer="">
208209 (function(e,t,o,n,p,r,i){e.visitorGlobalObjectAlias=n;
210 e[e.visitorGlobalObjectAlias]=e[e.visitorGlobalObjectAlias]||function(){(e[e.visitorGlobalObjectAlias].q=e[e.visitorGlobalObjectAlias].q||[]).push(arguments)};
211 e[e.visitorGlobalObjectAlias].l=(new Date).getTime();
212 r=t.createElement("script");
213 r.src=o;r.async=true;
214 i=t.getElementsByTagName("script")[0];
215 i.parentNode.insertBefore(r,i)})(window,document,"https://diffuser-cdn.app-us1.com/diffuser/diffuser.js","vgo");
216 vgo('setAccount', '254430349');
217 vgo('setTrackByDefault', true);
218 vgo('process');
219 </script>
220 <!-- ActiveCampaign -->
221 <!-- Sleeknote -->
222 <script id="sleeknoteScript" type="text/javascript">
223 (function () {
224 var sleeknoteScriptTag = document.createElement("script");
225 sleeknoteScriptTag.type = "text/javascript";
226 sleeknoteScriptTag.charset = "utf-8";
227 sleeknoteScriptTag.src = ("//sleeknotecustomerscripts.sleeknote.com/861.js");
228 var s = document.getElementById("sleeknoteScript");
229 s.parentNode.insertBefore(sleeknoteScriptTag, s);
230 })();
231 </script>
232 <!-- End of Sleeknote signup and lead generation tool - www.sleeknote.com -->
233234 </dynamic></head>
235236 <body class="@Espresso.Item.CustomClasses @customWebsite @isOutletClass" data-cart-currencycode="@Context.Currency.Code" data-shop-currencycode="@Pageview.Area.EcomCurrencyId" data-userauthenticated="@isUserAuthenticated.ToString().ToLower()">
237 <!-- Google Tag Manager (noscript) -->
238 <noscript><iframe src="https://ss.isabella.net/ns.html?id=GTM-TT2Z6XF" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
239 <!-- End Google Tag Manager (noscript) -->
240 @using Dynamicweb.Frontend
241 @inherits Co3.Espresso.Website.TemplateBases.Pages.PageBase
242 @{
243 Espresso.Canvas.ClassList.AddClasses( "js-e-canvas is-loading" );
244 if ( Espresso.Item.CanvasFullscreen == "True" )
245 {
246 Espresso.Canvas.ClassList.AddClasses( "is-fullscreen" );
247 }
248249 }
250251252253 @using System.Globalization
254 @using System.Security.Cryptography.X509Certificates
255 @using System.Web.Razor.Parser.SyntaxTree
256 @using Co3.Espresso.Base.Extensions
257 @using Co3.Espresso.Website.Models.FrontEnd
258 @using Co3.Espresso.Website.Services
259 @using Co3.Isabella.Dw.Models.FrontEnd.Ecommerce
260 @using Dynamicweb.Content
261 @using Dynamicweb.Ecommerce.Products
262 @using Dynamicweb.Frontend
263 @using Dynamicweb.Rendering
264 @using Dynamicweb.Rendering.Translation
265 @using Dynamicweb.SystemTools
266 @using EcomContext = Dynamicweb.Ecommerce.Common.Context
267 @using eProductService = Co3.Espresso.Website.Services.ProductService
268 @using Page = Dynamicweb.Content.Page
269 @using PageService = Dynamicweb.Content.PageService
270271 @functions {
272273 public string getCountryCodeFromArea(Area area)
274 {
275 RegionInfo regionInfo = new RegionInfo( area.CultureInfo.LCID );
276 return regionInfo.TwoLetterISORegionName;
277 }
278279 public string getCheckoutSetup(string shopType = "")
280 {
281 bool isB2bCheckout = PageView.Current().User != null;
282 if (isB2bCheckout)
283 {
284 return "shipping,customer,approve";
285 } else if (shopType == "B2C")
286 {
287 return "shipping,payment,approve";
288 } else if (shopType == "Outlet")
289 {
290 return "shipping,customer,payment,approve";
291 }
292293 return "customer,approve";
294 }
295296 public static string GetStandardCollapseToggleTextExpand()
297 {
298 return "Se mere";
299 }
300301 public static string GetStandardCollapseToggleTextCollapse()
302 {
303 return "Se mindre";
304 }
305306 public string getModelTypeLink()
307 {
308 bool isUserAuthenticated = PageView.Current().User != null;
309 string eComCountryCode = PageView.Current().Area.Item[ "EcommerceCountryCode" ] != null ? PageView.Current().Area.Item[ "EcommerceCountryCode" ].ToString() : "";
310 string returnValue = string.Empty;
311312 if ( isUserAuthenticated == false )
313 {
314 if ( string.IsNullOrEmpty(eComCountryCode) == false)
315 {
316 {
317 returnValue = string.Format( "Ecom:Product.CategoryField.ModelType.ModelTypeLink_{0}.Value", eComCountryCode );
318 }
319 }
320 else
321 {
322 returnValue = "Ecom:Product.CategoryField.ModelType.ModelTypeLink.Value";
323 }
324 }
325 else
326 {
327 if ( string.IsNullOrEmpty(eComCountryCode) == false)
328 {
329 {
330 returnValue = string.Format( "Ecom:Product.CategoryField.ModelType.ModelTypeLinkB2B_{0}.Value", eComCountryCode );
331 }
332 }
333 else
334 {
335 returnValue = "Ecom:Product.CategoryField.ModelType.ModelTypeLinkB2B.Value";
336 }
337 }
338339 return returnValue;
340 }
341342 }
343344 @helper ProductDescription(string sectionClasses = "e-section", bool sectionCollapse = false, string contentClasses = null, string heading = null, string content = null, string collapseToggleTextExpand = null, string collapseToggleTextCollapse = null)
345 {
346 if ( string.IsNullOrEmpty( content ) == false )
347 {
348 ClassList headingClassList = new ClassList();
349 headingClassList.AddClasses( "col-12" );
350 ClassList contentClassList = new ClassList();
351 contentClassList.AddClasses( "col-12" );
352353 @sectionStart( sectionClasses: sectionClasses, sectionCollapse: sectionCollapse, contentClasses: contentClasses, collapseToggleTextCollapse: collapseToggleTextCollapse, collapseToggleTextExpand: collapseToggleTextExpand )
354355 if ( string.IsNullOrEmpty( heading ) == false )
356 {
357 <div class="@headingClassList">
358 <h2>@heading</h2>
359 </div>
360 }
361 <div class="@contentClassList">
362 @content
363 </div>
364365 @sectionEnd()
366 }
367 }
368369370 @helper ProductVideo(string sectionClasses = "e-section", string contentClasses = null, string heading = null, string videoURL = null)
371 {
372 if ( string.IsNullOrEmpty( videoURL ) == false )
373 {
374 ClassList headingClassList = new ClassList();
375 headingClassList.AddClasses( "col-12" );
376 ClassList contentClassList = new ClassList();
377 contentClassList.AddClasses( "col-12" );
378379380 @sectionStart( sectionClasses: sectionClasses, contentClasses: contentClasses )
381382 if ( string.IsNullOrEmpty( heading ) == false )
383 {
384 <div class="@headingClassList">
385 <h2>@heading</h2>
386 </div>
387 }
388389 <div class="@contentClassList">
390 <div class="embed-responsive embed-responsive-16by9 mb-2">
391 <iframe class="embed-responsive-item" src="@videoURL" width="1080" height="608" frameborder="0" webkitallowfullscreen="" mozallowfullscreen="" allowfullscreen=""></iframe>
392 </div>
393 </div>
394 @sectionEnd()
395 }
396 }
397398 @helper ProductRelatedProducts(string sectionClasses = "e-section", bool sectionCollapse = false, string contentClasses = null, string heading = null, string content = null, string collapseToggleTextExpand = null, string collapseToggleTextCollapse = null,
399 IEnumerable< Product > productLoop = null)
400 {
401 if ( productLoop != null && productLoop.Any() == true )
402 {
403 ClassList headingClassList = new ClassList();
404 headingClassList.AddClasses( "col-12" );
405 ClassList contentClassList = new ClassList();
406 contentClassList.AddClasses( "col-12" );
407408 @sectionStart( sectionClasses: sectionClasses, sectionCollapse: sectionCollapse, contentClasses: contentClasses, collapseToggleTextCollapse: collapseToggleTextCollapse, collapseToggleTextExpand: collapseToggleTextExpand )
409410 if ( string.IsNullOrEmpty( heading ) == false )
411 {
412 <div class="@headingClassList">
413 <h4 class="isabella-text-bullets-left mb-3">@heading</h4>
414 </div>
415 }
416 <div class="@contentClassList">
417 <div class="e-products mb-2">
418 <div class="row">
419 @{
420 string productlistItemClassList = "col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3";
421 }
422 @foreach ( Product product in productLoop.Where(p => p.Groups.Any(g => g.ShopId.Equals("SHOP1")) && (bool) p.GetCategoryValue( "ProductsGeneral", "PIMActive" ) != false && (bool) p.ShowInProductList && p.Active) )
423 {
424 @ProductlistItem(product, productlistItemClassList)
425 }
426 </div>
427 </div>
428 </div>
429430 @sectionEnd()
431 }
432 }
433434435 @helper ProductlistItem(Product product, string productlistItemClassList = null, string isModelProductList = null)
436 {
437 Dynamicweb.Ecommerce.Products.ProductService dwProductService = new Dynamicweb.Ecommerce.Products.ProductService();
438 string shopType = PageView.Current().Area.Item["ShopType"]?.ToString();
439 string productLink = eProductService.Instance.GetProductLink( product.GetDefaultGroupByShopId( product.DefaultShopId ).Id, product.Id, product.VariantId );
440441442 productLink = SearchEngineFriendlyURLs.GetFriendlyUrl( productLink );
443444 if (shopType == "Outlet")
445 {
446 Page page = new PageService().GetPageByNavigationTag(PageView.Current().AreaID, "outletdisplaypage");
447 if (page != null)
448 {
449 productLink = SearchEngineFriendlyURLs.GetFriendlyUrl( $"Default.aspx?ID={page.ID}&productId={product.Id}" );
450 }
451452 }
453454 string productlistDetailImage = product.Details.FirstOrDefault( pd => pd.Type == 0 && pd.GroupId == 4 )?.Value;
455456 if ( product != null )
457 {
458 dynamic productData = new
459 {
460 id = product.Id,
461 url = productLink,
462 number = product.Number,
463 name = product.Name,
464 imageDefault = Co3.Isabella.Dw.Services.ImageService.Instance.GetImageURL( Dynamicweb.Ecommerce.Services.Details.GetDefaultDetail( product.Id, product.VariantId,
465 EcomContext.LanguageID )?.Value, 400, 225, 0, 75, "jpg", "/Files/Templates/Designs/isabella/_assets/img/NoImage.gif" ),
466 price = Co3.Isabella.Dw.Services.ProductService.Instance.GetPrice( product.Id ).Format(),
467 priceClean = Co3.Isabella.Dw.Services.ProductService.Instance.GetPrice( product.Id ).Price,
468 productIntroText = product.GetCategoryValue( "ProductsGeneral", "ProductIntroText" )?.ToString(),
469 news = product.GetCategoryValue( "ProductsGeneral", "News" )?.ToString(),
470 productType = product.GetCategoryValue( "ProductsGeneral", "ProductType" )?.ToString(),
471 isModelProductList = isModelProductList,
472 productlistDetailImage = Co3.Isabella.Dw.Services.ImageService.Instance.GetImageURL( productlistDetailImage ),
473 shopType
474 };
475476 <div class="@productlistItemClassList">
477 <div class="border-1 card mb-6">
478 <a href="@productData.url">
479 @if ( productData.isModelProductList == "True" )
480 {
481 <img src="@productData.productlistDetailImage" alt="@productData.name @productData.productType" class="col-12 p-0">
482 }
483 else
484 {
485 <img src="@productData.imageDefault" alt="@productData.name @productData.productType" class="col-12 p-0">
486 }
487 @if ( productData.news == "True" )
488 {
489 <div class="isabella-product-item-news">
490 @Dynamicweb.Rendering.Translation.Translation.GetTranslation( "Ecom Product - News Badge - Text" )
491 </div>
492 }
493 </a>
494 <div class="card-body p-1 p-lg-3">
495 <h4 class="e-products-item-name mb-0">
496 <a href="@productData.url">
497 @productData.name
498 </a>
499 </h4>
500501 </div>
502 </div>
503 </div>
504 }
505 }
506507508 @helper sectionStart(string sectionClasses = "e-section", string contentClasses = null, bool sectionCollapse = false, string sectionId = null, string collapseToggleTextExpand = null, string collapseToggleTextCollapse = null)
509 {
510 sectionId = string.IsNullOrEmpty( sectionId ) ? Guid.NewGuid().ToString( "N" ) : sectionId;
511 ClassList sectionClassList = new ClassList();
512 sectionClassList.AddClasses( sectionClasses );
513 ClassList contentClassList;
514515 if ( contentClasses == null )
516 {
517 contentClassList = Co3.Espresso.Website.Services.PageService.Instance.GetResponsiveClassesFromPageItem( PageView.Current().Page.Item );
518 }
519 else
520 {
521 contentClassList = new ClassList();
522 contentClassList.AddClasses( contentClasses );
523 }
524525 // TODO: Split collapse logic into separate helper function.
526 string collapseId = Guid.NewGuid().ToString( "N" );
527 ClassList collapseToggleClassList = new ClassList();
528 if ( sectionCollapse )
529 {
530 sectionClassList.AddClasses( "p-section-collapse js-p-section-collapse" );
531 collapseToggleClassList.AddClasses( contentClasses );
532 collapseToggleClassList.AddClasses( "p-section-collapse-toggle collapsed order-last text-center" );
533 contentClassList.AddClasses( "p-section-collapse-content collapse is-md" );
534 }
535536 @:<section class="@sectionClassList" id="@sectionId">
537 @:<div class="container-fluid">
538 @:<div class="row">
539540 // TODO: Split collapse logic into separate helper function.
541 if ( sectionCollapse )
542 {
543 <div class="@collapseToggleClassList" data-toggle="collapse" data-target="#@collapseId">
544 <button class="btn btn-primary p-section-collapse-toggle-btn" type="button">
545 <i class="material-icons p-section-collapse-toggle-icon">keyboard_arrow_down</i>
546 </button>
547 <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>
548 </div>
549 }
550551 @:<div class="@contentClassList" id="@collapseId">
552 @:<div class="row">
553 }
554555 @helper sectionEnd()
556 {
557 @:</div>
558 @:</div>
559 @:</div>
560 @:</div>
561 @:</section>
562 }
563564565566567568 <div class="e-loading-overlay e-page-loading-overlay is-loading js-e-page-loading-overlay">
569 <svg class="e-loading-spinner isabella-loading-spinner-logo" viewbox="0 0 316.9 383">
570 <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
571 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
572 L264.2,150.9z"></path>
573 <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
574 C79.6,364.6,78.2,345.4,76.1,324.8"></path>
575 <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>
576 <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>
577 <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>
578 <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>
579 </svg>
580581582 </div>
583 @* https://medium.com/clio-calliope/making-google-fonts-faster-aadf3c02a36d *@
584 @SnippetStart("webfonts")
585 <link crossorigin="" href="https://fonts.gstatic.com/" rel="preconnect">
586 <link href="https://fonts.googleapis.com/css?family=IBM+Plex+Sans:400,700%7CMaterial+Icons" media="@Espresso.StylesheetAttributeMedia" rel="@Espresso.StylesheetAttributeRel" as="style">
587 @SnippetEnd("webfonts")
588589590591 <div class="@Espresso.Canvas.ClassList">
592 @using Co3.Espresso.Website.Models.FrontEnd
593 @using Dynamicweb.Ecommerce.Orders
594 @using Dynamicweb.Frontend
595 @using Dynamicweb.Frontend.Navigation
596 @{
597 ClassList headerClassList = new ClassList();
598 headerClassList.AddClasses( "e-header js-e-header is-sticky" );
599 if ( Espresso.Item.HeaderTransparent == "True" )
600 {
601 headerClassList.AddClasses( "is-transparent" );
602 }
603604 ClassList logoClassList = new ClassList();
605 logoClassList.AddClasses( "e-logo" );
606607 string backButtonLink = Espresso.Item.BackButtonLink;
608 ClassList backButtonClassList = new ClassList();
609 ClassList backButtonIconClassList = new ClassList();
610 if ( Espresso.Item.BackButton == "True" )
611 {
612 backButtonClassList.AddClasses( "btn btn-sm btn-secondary my-1 align-self-center" );
613 if ( backButtonLink == "" || backButtonLink == "/" )
614 {
615 backButtonLink = "/";
616 backButtonClassList.AddClasses( "js-e-back-link" );
617 }
618 backButtonIconClassList.AddClasses( "material-icons material-icons-large" );
619 if ( Espresso.Item.BackButtonPosition == "right" )
620 {
621 backButtonClassList.AddClasses( "mr-0 ml-auto order-last" );
622 logoClassList.AddClasses( "order-first" );
623 }
624 else
625 {
626 backButtonClassList.AddClasses( "order-first" );
627 logoClassList.AddClasses( "mr-0 ml-auto order-last" );
628 }
629 if ( Espresso.Item.BackButtonIcon == "arrow_back" )
630 {
631 backButtonClassList.AddClasses( "arrow-left" );
632 backButtonIconClassList.AddClasses( "d-none" );
633 }
634 else if ( Espresso.Item.BackButtonIcon == "arrow_forward" )
635 {
636 backButtonClassList.AddClasses( "arrow-right" );
637 backButtonIconClassList.AddClasses( "d-none" );
638 }
639 }
640641 string logoPrimary = Espresso.Area.Item.LogoPrimary;
642 string logoSecondary = Espresso.Area.Item.LogoSecondary;
643644 if ( string.IsNullOrEmpty( logoSecondary ) == true )
645 {
646 logoSecondary = logoPrimary;
647 }
648 string tagline = Espresso.Area.Item.Tagline;
649650 Dictionary< string, string > navigationHtml = new Dictionary< string, string >
651 {
652 {
653 "global", Navigation.RenderNavigation( "navigation/espresso.cshtml", new NavigationSettings()
654 {
655 StartLevel = 1,
656 StopLevel = 8,
657 ExpandMode = ExpandMode.All,
658 Parameters = new Dictionary< string, object >()
659 {
660 { "id", "dwnav-global" }
661 }
662 } )
663 },
664 {
665 "utilities-primary", Navigation.RenderNavigation( "navigation/espresso.cshtml", new NavigationSettings()
666 {
667 StartLevel = 4,
668 StopLevel = 5,
669 ExpandMode = ExpandMode.All,
670 RootNavigationTag = "utilities-primary",
671 Parameters = new Dictionary< string, object >()
672 {
673 { "id", "dwnav-utilities-primary" }
674 }
675 } )
676 },
677 {
678 "utilities-secondary", Navigation.RenderNavigation( "navigation/espresso.cshtml", new NavigationSettings()
679 {
680 StartLevel = 4,
681 StopLevel = 4,
682 ExpandMode = ExpandMode.All,
683 RootNavigationTag = "utilities-secondary",
684 Parameters = new Dictionary< string, object >()
685 {
686 { "id", "dwnav-utilities-secondary" }
687 }
688 } )
689 },
690 {
691 "hamburger-header", Navigation.RenderNavigation( "navigation/espresso.cshtml", new NavigationSettings()
692 {
693 StartLevel = 4,
694 StopLevel = 4,
695 ExpandMode = ExpandMode.All,
696 RootNavigationTag = "hamburger-header",
697 Parameters = new Dictionary< string, object >()
698 {
699 { "id", "dwnav-hamburger-header" }
700 }
701 } )
702 },
703 {
704 "hamburger-aside", Navigation.RenderNavigation( "navigation/espresso.cshtml", new NavigationSettings()
705 {
706 StartLevel = 4,
707 StopLevel = 4,
708 ExpandMode = ExpandMode.All,
709 RootNavigationTag = "hamburger-aside",
710 Parameters = new Dictionary< string, object >()
711 {
712 { "id", "dwnav-hamburger-aside" }
713 }
714 } )
715 }
716 };
717718 double cartQuantity = 0;
719 var areaCartContext = PageView.Current().Area.Item[ "ContextCart" ]?.ToString();
720721 Dynamicweb.Ecommerce.Common.Context.CartContext = OrderContext.GetOrderContextById(areaCartContext);
722 Order cart = Dynamicweb.Ecommerce.Common.Context.Cart;
723 if (cart != null )
724 {
725 cartQuantity = cart.get_ParentProductLineQuantityCount(cart.ProductOrderLines);
726 }
727 }
728729 @SnippetStart("CartQuantity")
730 @cartQuantity
731 @SnippetEnd("CartQuantity")
732733 @if ( Espresso.Item.HeaderHide != "True" )
734 {
735 <header class="@headerClassList" data-autohide="true">
736737 <div class="e-header-hamburger">
738 @sectionStart( "e-header-section e-section", "col-12" )
739 <div class="col-12 e-header-section-content">
740 <div class="@logoClassList">
741 <a class="e-logo-link" href="/@globalAreaName/">
742 <img src="@logoPrimary" class="e-logo-img e-logo-img-primary" alt="@Espresso.Area.Item.CompanyName">
743 <img src="@logoSecondary" class="e-logo-img e-logo-img-secondary" alt="@Espresso.Area.Item.CompanyName">
744 @if ( string.IsNullOrEmpty( tagline ) == false )
745 {
746 <p class="e-logo-tagline">@tagline</p>
747 }
748 </a>
749 </div>
750 @if ( Espresso.Item.NavigationHide != "True" )
751 {
752 <section class="e-nav-hamburger-header">
753 <ul class="nav">
754 @navigationHtml[ "hamburger-header" ]
755 @* TODO: Move to xslt *@
756 <li class="e-nav-item-hamburger-open nav-item">
757 <a class="nav-link" data-target=".modal.e-nav" data-toggle="modal" href="#">
758 <i class="e-nav-pageicon material-icons">menu</i>
759 <span class="e-nav-pagename">@Translate( "Header - Hamburger menu open - Button", "Menu" )</span>
760 </a>
761 </li>
762 </ul>
763 </section>
764 }
765 @if ( Espresso.Item.BackButton == "True" )
766 {
767 <a class="@backButtonClassList" href="@backButtonLink">
768 @if ( Espresso.Item.BackButtonIcon != "" )
769 {
770 <i class="@backButtonIconClassList">@Espresso.Item.BackButtonIcon</i>
771 }
772 @Espresso.Item.BackButtonText
773 </a>
774 }
775 </div>
776 @sectionEnd()
777 </div>
778 <div class="e-nav js-e-nav modal p-0" data-backdrop="false">
779 <div class="e-nav-container navbar flex-column d-flex">
780781 @sectionStart( "e-header-section e-header-section-primary e-section order-xl-2", "col-12" )
782 <div class="col-12 e-header-section-content">
783 <div class="@logoClassList">
784 <a class="e-logo-link" href="/@globalAreaName/">
785 <img src="@logoPrimary" class="e-logo-img e-logo-img-primary" alt="@Espresso.Area.Item.CompanyName">
786 <img src="@logoSecondary" class="e-logo-img e-logo-img-secondary" alt="@Espresso.Area.Item.CompanyName">
787 @if (string.IsNullOrEmpty(tagline) == false)
788 {
789 <p class="e-logo-tagline">@tagline</p>
790 }
791 </a>
792 </div>
793794 @if ( Espresso.Item.NavigationHide != "True" )
795 {
796 <nav class="e-nav-global js-e-nav-global">
797 <ul class="nav">
798 @navigationHtml[ "global" ]
799 </ul>
800 </nav>
801802 <div class="e-nav-item-hamburger-close">
803 <a class="nav-link" data-target=".modal.e-nav" data-toggle="modal" href="#">
804 <i class="e-nav-pageicon material-icons">close</i>
805 <span class="e-nav-pagename">@Translate( "Header - Hamburger menu close - Button", "Close" )</span>
806 </a>
807 </div>
808809 if ( string.IsNullOrEmpty( navigationHtml[ "utilities-primary" ] ) == false )
810 {
811 @:</div>
812 @sectionEnd()
813 @sectionStart( "e-header-section e-header-section-secondary e-section order-xl-1", "col-12" )
814 @:<div class="col-12 e-header-section-content">
815816 <nav class="e-nav-utilities-primary js-e-nav-utilities-primary">
817 <ul class="nav">
818 @navigationHtml[ "utilities-primary" ]
819 </ul>
820 </nav>
821 }
822823 if ( string.IsNullOrEmpty( navigationHtml[ "utilities-secondary" ] ) == false )
824 {
825 <nav class="e-nav-utilities-secondary">
826 <ul class="nav">
827 @navigationHtml[ "utilities-secondary" ]
828 </ul>
829 </nav>
830 }
831 if ( string.IsNullOrEmpty( navigationHtml[ "hamburger-aside" ] ) == false )
832 {
833 <nav class="e-nav-hamburger-aside">
834 <ul class="nav">
835 @navigationHtml[ "hamburger-aside" ]
836 </ul>
837 </nav>
838 }
839 }
840 @if ( Espresso.Item.BackButton == "True" )
841 {
842 <a class="@backButtonClassList" href="@backButtonLink">
843 @if ( Espresso.Item.BackButtonIcon != "" )
844 {
845 <i class="@backButtonIconClassList">@Espresso.Item.BackButtonIcon</i>
846 }
847 @Espresso.Item.BackButtonText
848 </a>
849 }
850 </div>
851 @sectionEnd()
852853 </div>
854 </div>
855856 </header>
857 }
858859 @helper GetSvgFileData(string svgfile)
860 {
861 string rtnValue = svgfile;
862 if (!string.IsNullOrEmpty(svgfile))
863 {
864 string FilePath = svgfile;
865866 if (System.IO.Path.GetExtension(FilePath) == ".svg")
867 {
868 System.Xml.XmlReaderSettings settings = new System.Xml.XmlReaderSettings();
869 settings.DtdProcessing = System.Xml.DtdProcessing.Ignore;
870 string svgFilePath = System.Web.HttpContext.Current.Server.MapPath(FilePath) ?? string.Empty;
871 if (System.IO.File.Exists(svgFilePath))
872 {
873 using (System.IO.StreamReader sr = new System.IO.StreamReader(svgFilePath))
874 {
875 using (System.Xml.XmlReader xr = System.Xml.XmlReader.Create(sr, settings))
876 {
877 bool done = false;
878 while (xr.Read() && !done)
879 {
880 if (xr.NodeType == System.Xml.XmlNodeType.Element && xr.Name == "svg")
881 {
882 rtnValue = xr.ReadOuterXml();
883 done = true;
884 }
885 }
886 }
887 }
888 }
889 }
890 }
891 @rtnValue;
892 }
893894895 @*General - Website Settings*@
896897 @if ( Espresso.Item.Notificationbar != "True" )
898 {
899 if ( !string.IsNullOrEmpty(Espresso.Area.Item.NotificationbarPageId) )
900 {
901 <section class="e-section">
902 <div class="container-fluid">
903 <div class="row">
904 <div class="col-12">
905 <div class="row">
906 @RenderPageContent(int.Parse(Espresso.Area.Item.NotificationbarPageId))
907 </div>
908 </div>
909 </div>
910 </div>
911 </section>
912 }
913 }
914915 @*Specific - Page*@
916917 @if ( !string.IsNullOrEmpty(Espresso.Item.NotificationbarPageId) )
918 {
919 <section class="e-section">
920 <div class="container-fluid">
921 <div class="row">
922 <div class="col-12">
923 <div class="row">
924 @RenderPageContent(int.Parse(Espresso.Item.NotificationbarPageId))
925 </div>
926 </div>
927 </div>
928 </div>
929 </section>
930 }
931 @using Dynamicweb.Frontend
932 @using Dynamicweb.Security.UserManagement
933 @{
934 User currentUser = PageView.Current().User;
935 if ( currentUser != null )
936 {
937 User currentSecondaryUser = currentUser.CurrentSecondaryUser;
938 if ( currentSecondaryUser != null )
939 {
940 @sectionStart( "e-section bg-warning e-text-dark js-e-section is-sticky zi-fixed py-1", "col-12 small" )
941 <div class="align-self-center col-12 col-lg-9 col-md-8">
942 <p class="line-height-sm mb-1 mb-md-0 text-center text-md-left">
943 <i class="material-icons material-icons-2x">supervisor_account</i> @Translate( "Extranet Impersonation - Active impersonation message - Text", "You are currently impersonating this user:" ) <strong>@currentUser.Name — @currentUser.Company </strong>
944 </p>
945 </div>
946 <div class="align-self-center col-12 col-lg-3 col-md-4">
947 <form class="mb-0 small text-center text-md-right" method="post" action="@Espresso.Area.Item.ExtranetImpersonationPage">
948 <button class="btn btn-primary" name="DwExtranetRemoveSecondaryUser" type="submit">@Translate( "Extranet Impersonation - Stop impersonation - Button", "Stop impersonation" )</button>
949 </form>
950 </div>
951 @sectionEnd()
952 }
953 }
954 }
955956957 <main id="dwcontentmain" class="e-content js-e-content @Espresso.ContentArea.ClassList">
958 @using Dynamicweb.Content;
959 @using Dynamicweb.Extensibility;
960 @{
961 string eBreadcrumbClasslist = "e-breadcrumb js-e-breadcrumb d-none d-lg-block";
962 if ( Espresso.Item.Breadcrumb != "auto" && Espresso.Item.Breadcrumb != "none" && String.IsNullOrEmpty( Espresso.Item.Breadcrumb ) == false )
963 {
964 eBreadcrumbClasslist += string.Format( " e-breadcrumb-{0}", Espresso.Item.Breadcrumb );
965 }
966 string navigationHtmlBreadcrumb = RenderNavigation( new
967 {
968 id = "dwnav-breadcrumb",
969 template = "breadcrumb.xslt",
970 startlevel = 1,
971 endlevel = 10,
972 expandmode = "pathonly",
973 sitemapmode = true
974 } );
975 }
976977 @if ( string.IsNullOrEmpty( navigationHtmlBreadcrumb ) == false && Espresso.Item.Breadcrumb != "none" && string.IsNullOrEmpty( Espresso.Item.Breadcrumb ) == false )
978 {
979 <section class="e-section @eBreadcrumbClasslist">
980 <div class="container-fluid">
981 <div class="row">
982 <div class="col-12">
983 <div class="row">
984985 <div class="col-12">
986 <nav class="e-breadcrumb-container">
987 <ol class="breadcrumb nav text-muted" itemscope="" itemtype="https://schema.org/BreadcrumbList">
988 <li class="breadcrumb-item m-0 p-0">
989 <a class="arrow-left breadcrumb-back-link js-e-back-link px-0" href="/">@Translate( "Breadcrumb - Back link", "Back" )</a>
990 <span class="breadcrumb-prefix-text">
991 @Translate( "Breadcrumb - Prefix - Text", "You are here:" )
992 </span>
993 <a href="/">
994 @ServiceLocator.Current.GetPageService().GetFirstPageForArea( GetInteger( "DwAreaID" ) ).MenuText
995 </a>
996 </li>
997 @navigationHtmlBreadcrumb
998 </ol>
999 </nav>
1000 </div>
10011002 </div>
1003 </div>
1004 </div>
1005 </div>
1006 </section>
1007 }
100810091010 <article class="e-content-article">
1011 @{
1012 int NavigationLocalHorizontalParentPageId = 0;
1013 if ( !string.IsNullOrEmpty( Espresso.Item.NavigationLocalParentPage ) )
1014 {
1015 int.TryParse( Espresso.Item.NavigationLocalParentPage, out NavigationLocalHorizontalParentPageId );
1016 }
1017 if ( NavigationLocalHorizontalParentPageId == 0 )
1018 {
1019 NavigationLocalHorizontalParentPageId = PageView.Current().Page.ID;
1020 if ( !Dynamicweb.Services.Pages.GetPagesByParentID( NavigationLocalHorizontalParentPageId ).Any() )
1021 {
1022 NavigationLocalHorizontalParentPageId = PageView.Current().Page.ParentPageId;
1023 }
1024 }
1025 string NavigationLocalHorizontalClassList = "e-nav-local e-nav-local-horizontal js-e-nav-local-horizontal";
1026 string NavigationLocalHorizontalContainerClassList = "e-nav-local-container";
1027 string NavigationLocalHorizontalTemplate = "local-" + Espresso.Item.NavigationLocalLayout + ".xslt";
1028 if ( string.IsNullOrEmpty( Espresso.Item.NavigationLocalTemplate ) == false && Path.GetExtension( Espresso.Item.NavigationLocalTemplate ) == ".xslt" )
1029 {
1030 NavigationLocalHorizontalTemplate = Path.GetFileName( Espresso.Item.NavigationLocalTemplate );
1031 }
10321033 if ( Espresso.Item.NavigationLocalShow == "True" && Espresso.Item.NavigationLocalLayout == "horizontal" )
1034 {
1035 NavigationLocalHorizontalClassList += " " + Espresso.Item.NavigationLocalCustomClasses;
1036 if ( Espresso.Item.NavigationLocalSticky == "True" )
1037 {
1038 NavigationLocalHorizontalClassList += " is-sticky";
1039 }
1040 if ( Espresso.Item.NavigationLocalAbsolute == "True" )
1041 {
1042 NavigationLocalHorizontalClassList += " is-absolute";
1043 }
1044 else
1045 {
1046 if ( Espresso.Item.NavigationLocalMarginTop != "0" && Espresso.Item.NavigationLocalMarginTop != "" )
1047 {
1048 NavigationLocalHorizontalClassList += " mt-" + Espresso.Item.NavigationLocalMarginTop;
1049 }
1050 if ( Espresso.Item.NavigationLocalMarginBottom != "0" && Espresso.Item.NavigationLocalMarginBottom != "" )
1051 {
1052 NavigationLocalHorizontalClassList += " mb-" + Espresso.Item.NavigationLocalMarginBottom;
1053 }
1054 }
1055 }
1056 }
1057 @if ( Espresso.Item.NavigationLocalShow == "True" && Espresso.Item.NavigationLocalLayout == "horizontal" )
1058 {
1059 <section class="e-section @NavigationLocalHorizontalClassList">
1060 <div class="container-fluid">
1061 <div class="row">
1062 <div class="col-12">
1063 <div class="row">
10641065 <div class="col-12">
1066 <nav id="dwnav-local-horizontal-@NavigationLocalHorizontalParentPageId" class="@NavigationLocalHorizontalContainerClassList">
1067 <ul class="justify-content-start nav">
1068 @if ( Espresso.Item.NavigationLocalHeading != "" )
1069 {
1070 <li class="e-nav-local-heading">
1071 <h2>@Espresso.Item.NavigationLocalHeading</h2>
1072 </li>
1073 }
1074 @RenderNavigation( new
1075 {
1076 id = "dwnav-local-horizontal-" + NavigationLocalHorizontalParentPageId,
1077 parentid = NavigationLocalHorizontalParentPageId,
1078 template = NavigationLocalHorizontalTemplate,
1079 startlevel = Espresso.Item.NavigationLocalLevelStart,
1080 endlevel = Espresso.Item.NavigationLocalLevelEnd,
1081 expandmode = Espresso.Item.NavigationLocalPageTreeExpand == "True" ? "all" : "path"
1082 } )
1083 </ul>
1084 </nav>
1085 </div>
10861087 </div>
1088 </div>
1089 </div>
1090 </div>
1091 </section>
1092 }
109310941095 @{
1096 int NavigationLocalVerticalParentPageId = 0;
1097 if ( !string.IsNullOrEmpty( Espresso.Item.NavigationLocalParentPage ) )
1098 {
1099 int.TryParse( Espresso.Item.NavigationLocalParentPage, out NavigationLocalVerticalParentPageId );
1100 }
1101 if ( NavigationLocalVerticalParentPageId == 0 )
1102 {
1103 NavigationLocalVerticalParentPageId = PageView.Current().Page.ID;
1104 if ( !Dynamicweb.Services.Pages.GetPagesByParentID( NavigationLocalVerticalParentPageId ).Any() )
1105 {
1106 NavigationLocalVerticalParentPageId = PageView.Current().Page.ParentPageId;
1107 }
1108 }
11091110 string NavigationLocalVerticalClassList = "e-nav-local e-nav-local-vertical js-e-nav-local-vertical";
1111 string NavigationLocalVerticalContainerClassList = "e-nav-local-container";
1112 string NavigationLocalVerticalTemplate = "local-" + Espresso.Item.NavigationLocalLayout + ".xslt";
1113 if ( string.IsNullOrEmpty( Espresso.Item.NavigationLocalTemplate ) == false && Path.GetExtension( Espresso.Item.NavigationLocalTemplate ) == ".xslt" )
1114 {
1115 NavigationLocalVerticalTemplate = Path.GetFileName( Espresso.Item.NavigationLocalTemplate );
1116 }
11171118 if ( Espresso.Item.NavigationLocalShow == "True" && Espresso.Item.NavigationLocalLayout == "vertical" )
1119 {
1120 NavigationLocalVerticalClassList += " " + Espresso.Item.NavigationLocalCustomClasses;
11211122 if ( Espresso.Item.NavigationLocalMarginTop != "0" && Espresso.Item.NavigationLocalMarginTop != "" )
1123 {
1124 NavigationLocalVerticalClassList += " mt-" + Espresso.Item.NavigationLocalMarginTop;
1125 }
1126 if ( Espresso.Item.NavigationLocalMarginBottom != "0" && Espresso.Item.NavigationLocalMarginBottom != "" )
1127 {
1128 NavigationLocalVerticalClassList += " mb-" + Espresso.Item.NavigationLocalMarginBottom;
1129 }
11301131 if ( Espresso.Item.NavigationLocalSticky == "True" )
1132 {
1133 NavigationLocalVerticalClassList += " is-sticky";
1134 }
11351136 if ( Espresso.Item.NavigationLocalAbsolute == "True" )
1137 {
1138 NavigationLocalVerticalClassList += " is-absolute";
1139 }
1140 else
1141 {
1142 Espresso.ContentSection.ClassList.Clear();
1143 Espresso.ContentSection.ClassList.AddClasses( "wtf col-12 col-lg-9 ml-auto" );
1144 }
1145 }
1146 }
11471148 @if ( Espresso.Item.NavigationLocalShow == "True" && Espresso.Item.NavigationLocalLayout == "vertical" )
1149 {
1150 <section class="e-section @NavigationLocalVerticalClassList">
1151 <div class="container-fluid">
1152 <div class="row">
1153 <div class="col-12">
1154 <div class="row">
11551156 <div class="col-3">
1157 <nav id="dwnav-local-@NavigationLocalVerticalParentPageId" class="@NavigationLocalVerticalContainerClassList">
1158 <ul class="flex-column nav">
1159 @if ( Espresso.Item.NavigationLocalHeading != "" )
1160 {
1161 <li class="e-nav-local-heading">
1162 <h2>@Espresso.Item.NavigationLocalHeading</h2>
1163 </li>
1164 }
1165 @RenderNavigation( new
1166 {
1167 id = "dwnav-local-" + NavigationLocalVerticalParentPageId,
1168 parentid = NavigationLocalVerticalParentPageId,
1169 template = NavigationLocalVerticalTemplate,
1170 startlevel = Espresso.Item.NavigationLocalLevelStart,
1171 endlevel = Espresso.Item.NavigationLocalLevelEnd,
1172 expandmode = Espresso.Item.NavigationLocalPageTreeExpand == "True" ? "all" : "path",
1173 } )
1174 </ul>
1175 </nav>
1176 </div>
11771178 </div>
1179 </div>
1180 </div>
1181 </div>
1182 </section>
1183 }
118411851186 @sectionStart()
1187 @GetValue("DwContent(dwcontentmain)")
1188 @sectionEnd()
1189 </article>
1190 </main>
1191 @using Dynamicweb.Frontend
1192 @{
1193 string FooterContentClassList = "e-footer-content e-section";
11941195 bool isOutlet = shopType == "Outlet";
1196 }
1197 @if ( Espresso.Item.FooterHide != "True" )
1198 {
1199 <footer class="e-footer">
1200 <article class="e-footer-wrapper">
1201 <section class="@FooterContentClassList">
1202 <div class="container-fluid">
1203 <div class="row">
1204 @if ( !string.IsNullOrEmpty( Espresso.Area.Item.FooterPageId ) )
1205 {
1206 @RenderPageContent( int.Parse( Espresso.Area.Item.FooterPageId ) )
1207 }
1208 </div>
1209 </div>
1210 </section>
1211 @if (!isOutlet)
1212 {
1213 <section class="e-footer-copyright e-section">
1214 <div class="container-fluid">
1215 <div class="align-items-baseline row">
1216 <div class="col-12 col-lg-5">
1217 @if (string.IsNullOrEmpty(Espresso.Area.Item.Adresse) == false)
1218 {
1219 @Espresso.Area.Item.Adresse
1220 }
1221 </div>
12221223 <div class="col-12 col-lg-4">
1224 @if (string.IsNullOrEmpty(GetString("DwNavigation(dwnavutilitiessecondaryfooter)")) == false)
1225 {
1226 <div class="col-12 p-0">
1227 <aside class="e-nav-utilities-secondary">
1228 <ul class="nav nav-inline">
1229 @GetValue("DwNavigation(dwnavutilitiessecondaryfooter)")
1230 </ul>
1231 </aside>
1232 </div>
1233 }
1234 </div>
123512361237 <div class="col-12 col-lg-3 text-lg-right">
1238 <p class="e-copyright nav-link">
1239 @*@Translate( "Footer - Copyright - Text", "Copyright ©" ) *@
1240 @*@DateTime.Now.Year.ToString() *@
1241 @Translate("Footer - All Rights Reserved - Text", "All rights reserved.")
1242 @Espresso.Area.Item.CompanyName.
1243 </p>
1244 </div>
1245 </div>
1246 </div>
1247 </section>
1248 }
1249 </article>
1250 </footer>
1251 }
1252 @if( string.IsNullOrEmpty( GetString("DwContent(dwcontentcta)") ) == false ) {
1253 <aside id="dwcontentcta" class="js-e-cta e-cta is-hidden fixed-top">
1254 <section class="e-section">
1255 <div class="container-fluid">
1256 <div class="row no-gutters">
1257 <div class="col-12">
1258 <div class="row no-gutters justify-content-center align-items-center">
1259 @GetValue("DwContent(dwcontentcta)")
1260 @* <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> *@
1261 </div>
1262 </div>
1263 </div>
1264 </div>
1265 </section>
1266 </aside>
1267 }
12681269 @using Dynamicweb.Frontend
12701271 @{
1272 string cartUrl = "/cart";
12731274 if ( PageView.Current().Area.Name.Contains( "webshop" ) == false )
1275 {
1276 cartUrl = string.Format("{0}{1}", PageView.Current().Area.Name, cartUrl);
1277 }
1278 else
1279 {
1280 cartUrl = string.Format("{0}/shop{1}", PageView.Current().Area.Name.ToLower(), cartUrl);
1281 }
12821283 var ShopType = PageView.Current().Area.Item["ShopType"];
1284 }
1285 <div class="e-cart-msg modal fade small" id="js-e-cart-msg" data-backdrop="false">
1286 <div class="modal-dialog e-cart-msg-modal-dialog">
1287 <div class="modal-content">
1288 <div class="modal-header">
1289 <h4 class="js-e-cart-msg-heading modal-title">
1290 <i class="material-icons material-icons-large text-success">check_circle</i>
1291 <span>@Translate( "eCom Cart - Product Added - Heading", "Added to your cart" )</span>
1292 </h4>
1293 <button class="close" data-dismiss="modal" type="button">
1294 <i class="material-icons">close</i>
1295 </button>
1296 </div>
1297 <div class="modal-body">
1298 <div class="js-e-cart-msg-content">
1299 <script id="js-e-handlebars-tmpl-cart-msg-lastadded" type="text/x-handlebars-template">
1300 <div class="row">
1301 {{#each cart.lastAdded}}
1302 <div class="col-12 py-1">
1303 <div class="row">
1304 <div class="col-4">
1305 <a class="" href="{{url}}">
1306 <img alt="" class="img-fluid" src="{{imageDefault}}">
1307 </a>
1308 </div>
1309 <div class="col-8">
1310 <h3 class="mb-0">
1311 <a href="{{url}}" class="text-decoration-none">{{name}}</a>
1312 </h3>
1313 <p class="mb-0">
1314 <a href="{{url}}" class="text-auto text-decoration-none">
1315 {{{price}}}
1316 @if (ShopType?.ToString() != "B2C")
1317 {
1318 <span>
1319 <br>
1320 {{{stock.text}}}<br>
1321 {{{stock.delivery}}}<br>
1322 </span>
1323 }
13241325 </a>
1326 </p>
1327 </div>
1328 </div>
1329 </div>
1330 {{/each}}
1331 </div>
1332 </script>
1333 </div>
1334 </div>
1335 <div class="bg-info e-cart-msg-footer modal-footer border-top-0">
1336 <a class="btn btn-secondary mr-1" href="/" data-dismiss="modal">@Translate( "eCom Cart - Continue Shopping - Button", "Continue shopping" )</a>
1337 <a class="arrow-right btn btn-primary" href="@cartUrl">@Translate( "eCom Cart - Checkout - Button", "Checkout" )</a>
1338 </div>
1339 </div>
1340 </div>
1341 </div>
13421343 </div>
13441345 @using Co3.Espresso.Base.Extensions
1346 @using Co3.Espresso.Website.Services
1347 @using Dynamicweb.Frontend
13481349 <div class="modal fade e-search js-e-search js-e-search-modal modal-fullscreen" data-backdrop="false" data-keyboard="true" data-focus="true">
1350 <div class="modal-dialog">
1351 <div class="modal-content">
135213531354 <div class="modal-header">
1355 <a class="btn btn-sm btn-secondary js-e-back-link arrow-left" href="/" data-dismiss="modal">
1356 @Translate("Search - Back button", "Back")
1357 </a>
1358 <div class="e-logo">
1359 <a href="/" class="e-logo-link my-0">
1360 <img src="@logoPrimary" class="e-logo-img e-logo-img-primary" alt="@Espresso.Area.Item.CompanyName">
1361 <img src="@logoSecondary" class="e-logo-img e-logo-img-secondary" alt="@Espresso.Area.Item.CompanyName">
1362 </a>
1363 </div>
1364 </div>
13651366 <div class="modal-body">
13671368 <div class="container-fluid">
13691370 <div class="e-search-form-container">
1371 <div class="row justify-content-center">
1372 <div class="col-12 col-md-10 col-lg-8 col-xl-6 mt-3">
1373 <form action="" class="e-search-form js-e-search-form">
1374 <div class="js-e-search-input-group e-search-input-group is-empty">
1375 <label class="e-search-label" for="e-search-input"><i class="material-icons">search</i></label>
1376 @{ string Translate_Search_InputText = Translate("Search - Input Placeholder - Text", "Search"); }
1377 <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">
1378 <span class="js-e-search-clear e-search-clear"><i class="material-icons">close</i></span>
1379 <button class="e-search-submit btn btn-primary" type="submit"><i class="material-icons">search</i></button>
1380 </div>
1381 </form>
1382 </div>
1383 </div>
1384 </div>
13851386 <div class="js-e-search-result-container e-search-result-container">
13871388 <div class="row justify-content-center">
1389 <div class="col-12 col-md-10 col-lg-8 col-xl-6">
1390 <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>
1391 </div>
1392 </div>
13931394 <div class="row justify-content-center">
1395 <div class="col-12 col-xl-10">
1396 <div class="js-e-search-result-products e-search-result-products is-empty mb-4">
1397 @{string productlistItemClassList = ProductlistService.Instance.GetGridItemWidth(null).ToResponsiveClasses();}
1398 <script id="js-e-handlebars-tmpl-search-result-item-product" type="text/x-handlebars-template">
1399 <div class="e-products">
1400 <div class="row justify-content-center">
1401 {{#each products}}
1402 <div class="@productlistItemClassList">
1403 <div class="card border-1 mb-6">
1404 <a href="{{url}}">
1405 @if (Espresso.Item.ModelProductlist == "True")
1406 {
1407 <img src="{{productlistDetailImage}}" alt="{{name}}" class="col-12 p-0">
1408 }
1409 else
1410 {
1411 <img src="{{imageDefault}}" alt="{{name}}" class="col-12 p-0">
1412 }
1413 {{#if news}}
1414 <div class="isabella-product-item-news">
1415 @Translate("Ecom Product - News Badge - Text", "Nyhed")
1416 </div>
1417 {{/if}}
1418 </a>
1419 <div class="card-body p-1 p-lg-3">
1420 <h4 class="e-products-item-name mb-0">
1421 <a href="{{url}}">
1422 {{{name}}}
1423 </a>
1424 </h4>
1425 {{#if shortDescription}}
1426 {{{shortDescription}}}
1427 {{/if}}
1428 @* @if (PageView.Current().Area.Name.Contains("webshop") != false)
1429 {
1430 <p class="e-products-item-text mt-2 mb-0 @Co3.Isabella.Dw.Services.ProductService.Instance.GetNoBuyB2CandB2B()" style="display: flex">
1431 <small class="e-products-item-price small">
1432 <a href="{{url}}" class="text-dark" style="text-decoration: none">
1433 {{#if pimActive}}{{{price}}}{{else}}@Translate("eCom Product - Add To Cart Form Table - Accessory Discontinued - Text", "Udgået"){{/if}}
1434 </a>
1435 </small>
1436 <a href="{{url}}" style="left: 0" class="isabella-arrow arrow-primary-small ml-auto"></a>
1437 </p>
1438 }
1439 *@
1440 </div>
1441 </div>
1442 </div>
1443 {{/each}}
1444 </div>
1445 <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>
1446 </div>
1447 </script>
1448 </div>
1449 </div>
1450 </div>
14511452 <div class="row justify-content-center">
1453 <div class="col-12 col-md-10 col-lg-8 col-xl-6">
1454 <div class="js-e-search-result-pages e-search-result-pages is-empty mb-3">
1455 <script id="js-e-handlebars-tmpl-search-result-item-page" type="text/x-handlebars-template">
1456 <div class="row">
1457 {{#each pages}}
1458 <div class="col-12">
1459 <p class="mb-0"><a href="{{{url}}}" class="text-bold">{{{title}}}</a></p>
1460 <p class="mb-0 small text-truncate">
1461 <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>
1462 <p class="small">{{{text}}}...</p>
1463 </div>
1464 {{/each}}
1465 </div>
1466 </script>
1467 </div>
1468 </div>
1469 </div>
14701471 <div class="js-e-search-loading-overlay e-loading-overlay e-search-loading-overlay">
1472 <div class="e-loading-spinner"></div>
1473 </div>
14741475 </div>
14761477 </div>
1478 </div>
1479 </div>
1480 </div>
1481 </div>
14821483 @if( Espresso.Area.Item.BackToTopLink == "True" ){
1484 <a href="#top" class="e-back-to-top js-e-back-to-top"><i class="material-icons">keyboard_arrow_up</i></a>
1485 }
148614871488 @* @using System.Web;
1489 @inherits Co3.Espresso.Website.TemplateBases.Pages.PageBase
14901491 @{
1492 HttpCookie optInLevel = HttpContext.Current.Request.Cookies[ "Dynamicweb.CookieOptInLevel" ];
1493 bool showCookieWarning = optInLevel == null;
1494 if ( optInLevel != null )
1495 {
1496 showCookieWarning = optInLevel.Value != "2";
1497 }
1498 }
14991500 @if ( showCookieWarning )
1501 {
1502 <div class="e-cookie js-e-cookie py-1" hidden="">
1503 <aside class="e-cookie-wrapper">
1504 <section class="e-section">
1505 <div class="container-fluid">
1506 <div class="align-items-center row">
1507 <div class="col-12 col-lg-10 col-md-9 my-1">
1508 <p class="line-height-sm mb-0 small text-center text-md-left">
1509 <span class="d-md-inline d-none">
1510 @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" )
1511 </span>
1512 <span class="d-md-none">
1513 @Translate( "Cookie Warning - Message Short - Text", "This website uses cookies to improve your experience. Learn more about our" )
1514 </span>
1515
1516 <a href="@Espresso.Area.Item.CookieMessage">@Translate( "Cookie Warning - Policy - Link", "cookie policy" )</a>
1517 </p>
1518 </div>
1519 <div class="col-12 col-lg-2 col-md-3 my-1">
1520 <p class="mb-0 text-center text-md-right">
1521 <button class="btn e-cookie-accept-btn js-e-cookie-accept-btn" type="button">
1522 @Translate( "Cookie Warning - Accept - Button", "OKAY" )
1523 </button>
1524 </p>
1525 </div>
1526 </div>
1527 </div>
1528 </section>
1529 </aside>
1530 </div>
1531 }
15321533 @if ( 1 == 2 )
1534 {
1535 @GetValue( "DwCookieWarning" )
1536 }
15371538 *@
15391540 <script data-cookieconsent="ignore" async="" src="/Files/Templates/Designs/isabella/_assets/_dist/js/default.js?v=3.1.1"></script>
1541 <script>
15421543 window.dataLayer.push({
1544 'event':'ipEvent',
1545 'ipAddress' : '@Dynamicweb.Context.Current.Request.UserHostAddress'
1546 });
1547 </script>
1548 </body>
15491550 @GetValue( "CopyRightNotice" )
1551 </html>
1552