Error executing template "Designs/junckers/_parsed/espresso.parsed.cshtml"
System.Data.SqlClient.SqlException (0x80131904): Login failed for user 'junckerssql'. Reason: Server is in single user mode. Only one administrator can connect at this time.
at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
at System.Data.SqlClient.SqlConnection.Open()
at Dynamicweb.Data.DatabaseConnectionProvider.CreateConnection(Boolean open)
at Dynamicweb.Data.Database.CreateConnection()
at Dynamicweb.Data.Database.CreateDataReader(CommandBuilder commandBuilder, IDbConnection connection, IDbTransaction transaction, Int32 commandTimeout)
at Dynamicweb.Ecommerce.Products.ProductRepository.GetProductById(String productId, String productVariantId, String productLanguageId)
at Dynamicweb.Ecommerce.Products.ProductService.FetchMissingProductsInternal(IProductRepository repo, IEnumerable`1 keys)
at Dynamicweb.Caching.ServiceCache`2.GetCache(IEnumerable`1 keys)
at Dynamicweb.Caching.ServiceCache`2.GetCache(TKey key)
at Dynamicweb.Ecommerce.Products.ProductService.GetProductById(String productId, String productVariantId, String productLanguageId, User user, Boolean showUntranslated)
at Dynamicweb.Ecommerce.Products.ProductService.GetProductById(String productId, String productVariantId, String productLanguageId, Boolean useAssortments)
at Dynamicweb.Ecommerce.Products.ProductService.GetProductById(String productId, String productVariantId, String productLanguageId)
at CompiledRazorTemplates.Dynamic.RazorEngine_be413269ef0f48df9f4612e0b57d5251.Execute() in D:\dynamicweb.net\Solutions\junckers.espresso4.dk\Files\Templates\Designs\junckers\_parsed\espresso.parsed.cshtml:line 265
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()
ClientConnectionId:9cc9619d-504b-461f-b54f-ee2365c6b7cd
Error Number:18461,State:1,Class:14
1 @inherits Co3.Espresso.Website.TemplateBases.Pages.PageBase
2 @using System.Web
3 @using System.IO
4 @using Co3.Espresso.Website.Services
5 @using Dynamicweb
6 @using Dynamicweb.Content
7 @using Dynamicweb.Content.Items
8 @using Dynamicweb.Frontend
9 @using Page = Dynamicweb.Content.Page
10 @{
11 string globalAreaLang = GetGlobalValue( "Global:Area.Lang" );
12 string globalPageID = GetGlobalValue( "Global:Page.ID" );
13 string globalAreaId = GetGlobalValue( "Global:Area.ID" );
14 string baseUrl = GetGlobalValue( "Global:Request.Scheme" ) + "://" + GetGlobalValue( "Global:Request.Host" );
15 string openGraphUrl = baseUrl + GetGlobalValue( "Global:Pageview.Url" );
16 string openGraphImage = baseUrl + Espresso.OpenGraphImage;
17 string productIdParam = "" + Dynamicweb.Context.Current.Request["productid"];
18 string variantIdParam = "" + Dynamicweb.Context.Current.Request["variantid"];
19 bool isProductPage = string.IsNullOrEmpty(productIdParam) == false;
20 string pdfProductId = HttpUtility.HtmlAttributeEncode(productIdParam);
21 string pdfPageId = HttpUtility.HtmlAttributeEncode( globalPageID );
22 string pageCanonical = PageView.Current().Page.MetaCanonical;
23 string globalValueUrl = GetGlobalValue("Global:Pageview.Url");
24 string globalPrimarydomainNoSubdomain = GetGlobalValue("Global:Area.Primarydomain").Replace( "www.", "" );
25 string canonicalPageView = String.Format("{0}://{1}{2}", GetGlobalValue("Global:Request.Scheme"), GetGlobalValue("Global:Request.Host"), globalValueUrl);
26 bool isRequestingPDF = Dynamicweb.Context.Current.Request[ "pdfgeneratorworking" ] == "true" || Dynamicweb.Context.Current.Request[ "newpdf" ] == "true" || Dynamicweb.Context.Current.Request[ "newpdf" ] == "test";
27 bool useNewGtmScript = globalAreaId == "17" || globalAreaId == "54" || globalAreaId == "52" || globalAreaId == "69" || globalAreaId == "16" || globalAreaId == "24" || globalAreaId == "23" || globalAreaId == "22" || globalAreaId == "18" || globalAreaId == "68" || globalAreaId == "65" || globalAreaId == "1" || globalAreaId == "53" ? true : false;
28 bool useOldGtmScript = globalAreaId != "17" && globalAreaId != "54" && globalAreaId != "52" && globalAreaId != "69" && globalAreaId != "16" && globalAreaId != "24" && globalAreaId != "23" && globalAreaId != "22" && globalAreaId != "18" && globalAreaId != "68" && globalAreaId != "65" && globalAreaId != "1" && globalAreaId != "53" ? true : false;
29
30 if ( isRequestingPDF )
31 {
32 Espresso.Area.OptimizedLoading = false;
33 Espresso.StylesheetAttributeRel = Espresso.Area.OptimizedLoading ? "preload" : "stylesheet";
34 Espresso.StylesheetAttributeMedia = Espresso.Area.OptimizedLoading ? "only x" : "all";
35 }
36
37 if (Dynamicweb.Context.Current.Request.Params.AllKeys.Contains("download"))
38 {
39 Dynamicweb.Content.Page currentPage = PageView.Current().Page;
40 string documentationPdf = currentPage.Item["DocumentationPdf"]?.ToString() ?? string.Empty;
41
42 if (isProductPage && string.IsNullOrEmpty(documentationPdf))
43 {
44 string tecDoc1Value = GetString("Ecom:Product.CategoryField.FloorTechnicalDocuments.TecDoc1.Value.Clean");
45
46 if (string.IsNullOrEmpty(tecDoc1Value))
47 {
48 Dynamicweb.Ecommerce.Products.Product dwProduct = Dynamicweb.Ecommerce.Services.Products.GetProductById(productIdParam, variantIdParam, false);
49 tecDoc1Value = dwProduct.GetCategoryValue("FloorTechnicalDocuments", "TecDoc1")?.ToString() ?? string.Empty;
50 }
51
52 if (!string.IsNullOrEmpty(tecDoc1Value))
53 {
54 string[] valueParts = tecDoc1Value.ToLowerInvariant().Split(new[] { "id=" }, StringSplitOptions.None);
55
56 if (int.TryParse(valueParts.LastOrDefault(), out int pageId))
57 {
58 Page docPage = Dynamicweb.Content.Services.Pages.GetPage(pageId);
59 if (docPage != null)
60 {
61 documentationPdf = docPage.Item["DocumentationPdf"]?.ToString() ?? string.Empty;
62 }
63 }
64 }
65 }
66
67 if (!string.IsNullOrEmpty(documentationPdf) && documentationPdf.ToLowerInvariant().Contains(".pdf"))
68 {
69 Dynamicweb.Context.Current.Response.Redirect(documentationPdf);
70 }
71 }
72
73
74 string isUsingCookiebot = string.Empty;
75
76 if ( GetBoolean( "Item.Area.IsUsingCookiebot.Value" ) == false )
77 {
78 isUsingCookiebot = "false";
79 }
80 else
81 {
82 isUsingCookiebot = "true";
83 }
84 }
85 <!DOCTYPE html>
86 <html lang="@globalAreaLang">
87 <head>
88 @* @GetValue( "CopyRightNotice" ) *@
89 <meta charset="utf-8">
90 <meta content="width=device-width, initial-scale=1, shrink-to-fit=no, minimal-ui" name="viewport">
91 <meta content="ie=edge" http-equiv="x-ua-compatible">
92
93 @if ( isProductPage == false )
94 {
95 <title>@GetValue("Title")</title>
96 @GetValue("MetaTags")
97 @GetValue("CopyRightNotice")
98
99 if ( string.IsNullOrEmpty(pageCanonical) == true )
100 {
101 <link rel="canonical" href="@canonicalPageView">
102 }
103 }
104 else
105 {
106 @RenderSnippet( "productMetaTags" )
107 }
108
109 @if ( Espresso.Area.OptimizedLoading )
110 {
111 @Espresso.CriticalCSS
112 }
113 <link crossorigin="" href="https://fonts.gstatic.com/" rel="preconnect">
114 <link href="https://fonts.googleapis.com/css?family=Ubuntu:300,400,500%7CMaterial+Icons" media="@Espresso.StylesheetAttributeMedia" rel="@Espresso.StylesheetAttributeRel" as="style">
115 <link href="/Files/Templates/Designs/junckers/_assets/_dist/css/default.css?v=1.1.33" media="@Espresso.StylesheetAttributeMedia" rel="@Espresso.StylesheetAttributeRel" as="style">
116 @if ( isRequestingPDF )
117 {
118 <link href="/Files/Templates/Designs/junckers/_assets/_dist/css/junckers-pdf.css?v=2.1.0" media="all" rel="stylesheet">
119 }
120
121 @*if ( PageView.Current().Page.ID != 29515 )
122 {
123 <script type='text/javascript' src='https://platform-api.sharethis.com/js/sharethis.js#property=601be95843bf770011180384&product=sop' async='async'></script>
124 }*@
125
126 @if ( Espresso.Area.OptimizedLoading )
127 {
128 @Espresso.CriticalJS
129 }
130 @* *@
131 <link rel="shortcut icon" href="@Espresso.Area.Item.Favicon">
132 @* @GetValue( "MetaTags" ) *@
133 @if ( Espresso.IsStagingUrl == true )
134 {
135 <meta content="noindex,nofollow" name="robots">
136 }
137 <meta property="og:url" content="@openGraphUrl">
138 <meta property="og:title" content="@Espresso.OpenGraphTitle">
139 <meta property="og:description" content="@Espresso.OpenGraphDescription">
140 <meta property="og:image" content="@openGraphImage">
141 <meta content="website" property="og:type">
142 @if ( string.IsNullOrEmpty( Espresso.Area.Item.GoogleSiteVerification ) == false )
143 {
144 <meta name="google-site-verification" content="@Espresso.Area.Item.GoogleSiteVerification">
145 }
146 @{
147 if ( 1 == 2 )
148 {
149 @GetValue( "Stylesheets" )
150 }
151 }
152 @if ( string.IsNullOrEmpty( Espresso.Area.GoogleTagManagerID ) == false && Espresso.Area.GoogleTagManagerID != "GTM-XXXX" && useOldGtmScript )
153 {
154 <!-- Google Tag Manager -->
155 <script data-cookieconsent="ignore">
156 ( function ( w, d, s, l, i ) {
157 w[ l ] = w[ l ] || [];
158 w[ l ].push( {
159 'gtm.start': new Date().getTime(),
160 event: 'gtm.js'
161 } );
162 var f = d.getElementsByTagName( s )[ 0 ],
163 j = d.createElement( s ),
164 dl = l != 'dataLayer' ? '&l=' + l : '';
165 j.async = true;
166 j.src = 'https://www.googletagmanager.com/gtm.js?id=' + i + dl;
167 f.parentNode.insertBefore( j, f );
168 } )( window, document, 'script', 'dataLayer', '@Espresso.Area.GoogleTagManagerID' );
169 </script>
170 <!-- End Google Tag Manager -->
171 }
172
173 @if ( useNewGtmScript )
174 {
175 <!-- Google Tag Manager -->
176 <script data-cookieconsent="ignore">
177 ( function ( w, d, s, l, i ) {
178 w[ l ] = w[ l ] || [];
179 w[ l ].push( {
180 'gtm.start': new Date().getTime(),
181 event: 'gtm.js'
182 } );
183 var f = d.getElementsByTagName( s )[ 0 ],
184 j = d.createElement( s );
185 j.async = true;
186 j.src = 'https://ztdqselj.@globalPrimarydomainNoSubdomain/16ztdqselj.js?' + i;
187 f.parentNode.insertBefore( j, f );
188 } )( window, document, 'script', 'dataLayer', 'bfp9a=AwhYNCUpWTQmWzEjPD5SDFdeS0JXABpHABkLEBoBBglECA4%3D' );
189 </script>
190 <!-- End Google Tag Manager -->
191 }
192
193 <!-- Hreflang -->
194 @{
195 @* Get areas from service *@
196 Dynamicweb.Content.AreaService areaService = new Dynamicweb.Content.AreaService();
197 Dynamicweb.Ecommerce.Products.ProductService productService = new Dynamicweb.Ecommerce.Products.ProductService();
198 IList<Area> areas = areaService.GetAreas();
199
200 bool pageHasParams = HttpContext.Current.Request.QueryString.HasKeys();
201 string[] expectedParams = new[] { "ID", "productid" };
202 IEnumerable<string> additionalParams = HttpContext.Current.Request.QueryString.AllKeys.Where( k => !expectedParams.Contains( k ) );
203 bool pageHasAllowedParams = true;
204
205 if ( pageHasParams == true )
206 {
207 if ( additionalParams.Any() )
208 {
209 pageHasAllowedParams = false;
210 }
211 }
212
213 bool pageHasXDefault = false;
214 string fallbackXDefaultEnglishPageUrl = string.Empty;
215 string fallbackXDefaultPageUrl = string.Empty;
216
217 @* Get current page's relation-text from page-item *@
218 string currentPageRelation = PageView.Current().Page.Item["PageRelation"] != null ? PageView.Current().Page.Item["PageRelation"].ToString() : string.Empty;
219
220 @* Frontpage must have 'frontpage' as relation-text *@
221 string CONST_frontpageRelation = "frontpage";
222
223 if ( pageHasAllowedParams == true )
224 {
225 @* Iterate areas *@
226 foreach ( Area area in areas )
227 {
228 if ( area.Active == true )
229 {
230 @* ExcludeFromHrefLang *@
231 string excludeFromHrefLang = area.Item["ExcludeFromHrefLang"] != null
232 ? area.Item["ExcludeFromHrefLang"].ToString()
233 : string.Empty;
234 if ( excludeFromHrefLang == "True" )
235 {
236 continue;
237 }
238 @* Get current area's culture *@
239 string culture = area.Culture;
240 @* Check for IsDefault Hreflang on area *@
241 string isDefaultHrefLang = area.Item["IsDefaultHrefLang"] != null ? area.Item["IsDefaultHrefLang"].ToString() : string.Empty;
242 @* Check for override-culture text on area *@
243 string hreflangCultureOverride = area.Item["HreflangLanguageOverride"] != null ? area.Item["HreflangLanguageOverride"].ToString() : string.Empty;
244
245 @* Get scheme and domain *@
246 string scheme = GetGlobalValue( "Global:Request.Scheme" );
247
248 string domain = area.DomainLock;
249 @* If we have a primary domain call pageservice and get pages *@
250 if ( string.IsNullOrEmpty( currentPageRelation ) == false && string.IsNullOrEmpty( domain ) == false )
251 {
252 Dynamicweb.Content.PageService pageService = new Dynamicweb.Content.PageService();
253 IEnumerable<Dynamicweb.Content.Page> pages = pageService.GetPagesByAreaID( area.ID );
254
255 @* Iterate pages in area - check if is active + has item + has item-pagerelation + item-pagerelation equals current pagerelation *@
256 foreach ( Dynamicweb.Content.Page page in pages.Where( p => p.Published && !p.Hidden && p.Item != null && p.Item["PageRelation"] != null && p.Item["PageRelation"].ToString().Equals( currentPageRelation ) ) )
257 {
258 string productId = HttpContext.Current.Request["productid"];
259
260 string url = string.Empty;
261
262 if ( string.IsNullOrEmpty( productId ) == false )
263 {
264 @* Build url to area product page *@
265 Dynamicweb.Ecommerce.Products.Product product = productService.GetProductById( productId, "", area.EcomLanguageId );
266 if ( product != null && product.Active == true )
267 {
268 string prodUrl = string.Format( "Default.aspx?ID={0}&ProductId={1}", page.ID, product.Id );
269 url = string.Format( "{0}://{1}{2}", scheme, domain, SearchEngineFriendlyURLs.GetFriendlyUrl( prodUrl, area.EcomLanguageId ) );
270 }
271 }
272 else
273 {
274 @* Build url to area page *@
275 url = string.Format( "{0}://{1}{2}", scheme, domain, SearchEngineFriendlyURLs.GetFriendlyUrl( page.GetPageHrefValue() ) );
276 if ( string.IsNullOrEmpty( fallbackXDefaultPageUrl ) == true )
277 {
278 fallbackXDefaultPageUrl = url;
279 }
280
281 if ( string.IsNullOrEmpty( fallbackXDefaultEnglishPageUrl ) == true && culture.ToLower().Contains( "en" ) == true )
282 {
283 fallbackXDefaultEnglishPageUrl = url;
284 }
285 }
286
287 @* If our current page relation match frontpage - set link to domain only *@
288 if ( currentPageRelation == CONST_frontpageRelation )
289 {
290 url = string.Format( "{0}://{1}", scheme, domain );
291 }
292
293 @* If our area item has checked in Default hreflang, we render x-default link *@
294 if ( isDefaultHrefLang == "True" )
295 {
296 <link rel="alternate" hreflang="x-default" href="@url">
297 pageHasXDefault = true;
298 }
299
300 @* If we have a value in the area-item to overrule the culture, override the value here *@
301 if ( string.IsNullOrEmpty( hreflangCultureOverride ) == false )
302 {
303 culture = hreflangCultureOverride;
304 }
305
306 @* Render hreflang-link *@
307 if ( string.IsNullOrEmpty( url ) == false )
308 {
309 <link rel="alternate" hreflang="@culture.ToLower()" href="@url">
310 }
311 }
312 }
313 }
314 }
315
316 if ( pageHasXDefault == false )
317 {
318 if ( string.IsNullOrEmpty( fallbackXDefaultEnglishPageUrl ) )
319 {
320 <link rel="alternate" hreflang="x-default" href="@fallbackXDefaultPageUrl">
321 }
322 else
323 {
324 <link rel="alternate" hreflang="x-default" href="@fallbackXDefaultEnglishPageUrl">
325 }
326 }
327 }
328 }
329 <!-- End Hreflang -->
330
331 @if ( string.IsNullOrEmpty( GetString( "Item.Area.MailchimpPopupScript.Value" ) ) == false )
332 {
333 @GetString( "Item.Area.MailchimpPopupScript.Value" )
334 }
335
336 @if ( string.IsNullOrEmpty( GetString( "Item.MailchimpPopupScript.Value" ) ) == false )
337 {
338 @GetString( "Item.MailchimpPopupScript.Value" )
339 }
340
341 @GetValue("Stylesheets")
342 @GetValue("Javascripts")
343 </head>
344
345 @{
346 Item globalPageItem = null;
347
348 if ( string.IsNullOrWhiteSpace( Espresso.DynamicwebPage.ShortCut ) == false )
349 {
350 globalPageItem = Co3.Junckers.Frontend.Services.EnglishLanguagesPageItemService.Instance.GetPageItem( Espresso.DynamicwebPage.ShortCut );
351 }
352
353 string pdfLink = string.Format( "{0}&newpdf=true&gid={1}", GetGlobalValue( "Global:Pageview.Url.Raw" ).Replace( "&newpdf=true", string.Empty ).Replace( "&newpdf=test", string.Empty ), Guid.NewGuid().ToString( "N" ) );
354
355 string junckersHasDocumentationPdfLink = string.Empty;
356
357 if ( globalAreaLang == "en" && globalPageItem != null )
358 {
359 junckersHasDocumentationPdfLink = globalPageItem["DocumentationPdf"] != null ? globalPageItem["DocumentationPdf"].ToString() : string.Empty;
360 }
361 else
362 {
363 junckersHasDocumentationPdfLink = string.IsNullOrEmpty( GetString( "Item.DocumentationPdf.Value" ) ) == false ? GetString( "Item.DocumentationPdf.Value" ) : string.Empty;
364 }
365 }
366
367 <body class="@Espresso.Item.CustomClasses @Espresso.Area.OptimizedLoading" data-pdf="@junckersHasDocumentationPdfLink" data-cookiebot="@isUsingCookiebot">
368
369 @SnippetStart( "PasswordProtectedPage" )
370 @{
371 string pwProtectedPageContent = "";
372 }
373 @foreach ( LoopItem pwProtectedPage in GetLoop( "Item.Area.PasswordProtectedPage" ) )
374 {
375 string pwProtectedPagePageID = pwProtectedPage.GetString( "Item.Area.PasswordProtectedPage.PasswordProtectedPage_PageID" );
376
377 if ( globalPageID == pwProtectedPagePageID )
378 {
379 pwProtectedPageContent = pwProtectedPage.GetString( "Item.Area.PasswordProtectedPage.PasswordProtectedPage_Content" );
380 @pwProtectedPageContent
381 }
382 }
383 @if ( pwProtectedPageContent == "" )
384 {
385 <h1>Login</h1>
386 <p class="lead">@Translate( "Junckers_PasswordPage_Text", "Input password" )</p>
387 }
388 @SnippetEnd( "PasswordProtectedPage" )
389
390 @if ( string.IsNullOrEmpty( Espresso.Area.GoogleTagManagerID ) == false && Espresso.Area.GoogleTagManagerID != "GTM-XXXX" && useOldGtmScript )
391 {
392 <!-- Google Tag Manager (noscript) -->
393 <noscript>
394 <iframe src="https://www.googletagmanager.com/ns.html?id=@Espresso.Area.GoogleTagManagerID" height="0" width="0" style="display: none; visibility: hidden"></iframe>
395 </noscript>
396 <!-- End Google Tag Manager (noscript) -->
397 }
398 @if ( useNewGtmScript )
399 {
400 <!-- Google Tag Manager (noscript) -->
401 <noscript>
402 <iframe src="https://ztdqselj.@globalPrimarydomainNoSubdomain/ns.html?id=GTM-NL7TPMZ" height="0" width="0" style="display:none;visibility:hidden"></iframe>
403 </noscript>
404 <!-- End Google Tag Manager (noscript) -->
405 }
406 @using Co3.Espresso.Website.Models.FrontEnd
407 @{
408 Espresso.Canvas.ClassList.AddClasses( "js-e-canvas is-loading" );
409 if ( Espresso.Item.CanvasFullscreen == "True" )
410 {
411 Espresso.Canvas.ClassList.AddClasses( "is-fullscreen" );
412 }
413 if ( Espresso.Item.DisablePDFHeader != null && Espresso.Item.DisablePDFHeader == "True" )
414 {
415 Espresso.ContentArea.ClassList.AddClasses( "pdf-header-disabled" );
416 }
417 }
418
419
420
421 @using System.Globalization
422 @using Co3.Espresso.Base.Extensions
423 @using Co3.Espresso.DownloadManager.Models
424 @using Co3.Espresso.Website.Models.FrontEnd
425 @using Co3.Espresso.Website.Services
426 @using Dynamicweb.Content
427 @using Dynamicweb.Frontend
428 @using Dynamicweb.Rendering
429 @using EcomContext = Dynamicweb.Ecommerce.Common.Context
430
431 @functions {
432
433 public string getCountryCodeFromArea( Area area )
434 {
435 RegionInfo regionInfo = new RegionInfo( area.CultureInfo.LCID );
436 return regionInfo.TwoLetterISORegionName;
437 }
438
439 public dynamic GetPriceInfo( string beforePrice = "", string basicPrice = "" )
440 {
441 double vat = EcomContext.Country.Vat;
442 double dblBeforePrice = 0;
443 double.TryParse( beforePrice, out dblBeforePrice );
444 double dblBasicPrice = 0;
445 double.TryParse( basicPrice, out dblBasicPrice );
446 double dblBeforePriceWithVat = 0;
447 double dblDiffPrice = 0;
448 int pct = 0;
449
450 if ( dblBeforePrice > 0 )
451 {
452 dblBeforePriceWithVat = dblBeforePrice * ( ( vat / 100d ) + 1 );
453 if ( dblBeforePriceWithVat > dblBasicPrice )
454 {
455 dblDiffPrice = dblBeforePriceWithVat - dblBasicPrice;
456 pct = (int)Math.Ceiling((( 100d / dblBeforePriceWithVat ) * dblDiffPrice));
457 }
458 }
459
460 dynamic returnValue = new
461 {
462 beforePriceWithVat = dblBeforePriceWithVat,
463 beforePriceWithVatFormatted = ProductService.Instance.GetPriceFormatted(dblBeforePriceWithVat),
464 basicPrice = dblBasicPrice,
465 basicPriceFormatted = ProductService.Instance.GetPriceFormatted(dblBasicPrice),
466 diffPrice = dblDiffPrice,
467 diffPriceFormatted = ProductService.Instance.GetPriceFormatted(dblDiffPrice),
468 pct = pct,
469 vat = vat
470 };
471 return returnValue;
472 }
473
474 }
475
476
477 @helper ProductDescription(string sectionClasses = "e-section", bool sectionCollapse = false, string contentClasses = null, string heading = null, string content = null)
478 {
479 if ( string.IsNullOrEmpty( content ) == false )
480 {
481 ClassList headingClassList = new ClassList();
482 headingClassList.AddClasses( "col-12" );
483 ClassList contentClassList = new ClassList();
484 contentClassList.AddClasses( "col-12" );
485
486 @sectionStart( sectionClasses: sectionClasses, sectionCollapse: sectionCollapse, contentClasses: contentClasses )
487
488 if ( string.IsNullOrEmpty( heading ) == false )
489 {
490 <div class="@headingClassList">
491 <h2>@heading</h2>
492 </div>
493 }
494 <div class="@contentClassList">
495 @content
496 </div>
497
498 @sectionEnd()
499 }
500 }
501
502
503 @helper ProductVideo(string sectionClasses = "e-section", string contentClasses = null, string heading = null, string videoURL = null)
504 {
505 if ( string.IsNullOrEmpty( videoURL ) == false )
506 {
507 ClassList headingClassList = new ClassList();
508 headingClassList.AddClasses( "col-12" );
509 ClassList contentClassList = new ClassList();
510 contentClassList.AddClasses( "col-12" );
511
512
513 @sectionStart( sectionClasses: sectionClasses, contentClasses: contentClasses )
514
515 if ( string.IsNullOrEmpty( heading ) == false )
516 {
517 <div class="@headingClassList">
518 <h2>@heading</h2>
519 </div>
520 }
521
522 <div class="@contentClassList">
523 <div class="embed-responsive embed-responsive-16by9 mb-2">
524 <iframe class="embed-responsive-item" src="@videoURL" width="1080" height="608" frameborder="0" webkitallowfullscreen="" mozallowfullscreen="" allowfullscreen=""></iframe>
525 </div>
526 </div>
527 @sectionEnd()
528 }
529 }
530
531 @helper ProductRelatedProducts(string sectionClasses = "e-section p-section p-section-bg-white pt-3 border-bottom", string contentClasses = null, string heading = null,
532 IEnumerable<RazorTemplateBase<RazorTemplateModel<Template>>.LoopItem> productLoop = null)
533 {
534 if ( productLoop != null && productLoop.Any() == true )
535 {
536 ClassList headingClassList = new ClassList();
537 headingClassList.AddClasses( "col-10 mx-auto" );
538 ClassList contentClassList = new ClassList();
539 contentClassList.AddClasses( "col-10 mx-auto" );
540
541 @sectionStart( sectionClasses: sectionClasses, contentClasses: contentClasses )
542
543 if ( string.IsNullOrEmpty( heading ) == false )
544 {
545 <div class="@headingClassList">
546 <h2>@heading</h2>
547 </div>
548 }
549
550
551 <div class="@contentClassList">
552 <div class="e-products mb-2">
553 <div class="row">
554 @{
555 string productlistItemClassList = ProductlistService.Instance.GetGridItemWidth( null ).ToResponsiveClasses();
556 }
557 @foreach ( RazorTemplateBase<RazorTemplateModel<Template>>.LoopItem product in productLoop )
558 {
559 @ProductlistItem( product, productlistItemClassList )
560 }
561 </div>
562 </div>
563 </div>
564
565 @sectionEnd()
566 }
567 }
568
569 @helper ProductlistItem(RazorTemplateBase<RazorTemplateModel<Template>>.LoopItem product, string productlistItemClassList = null)
570 {
571 if ( product != null )
572 {
573 dynamic productData = new
574 {
575 id = product.GetString( "Ecom:Product.ID" ),
576 url = ProductService.Instance.GetProductLink( product.GetString( "Ecom:Product.PrimaryOrFirstGroupID" ), product.GetString( "Ecom:Product.ID" ) ),
577 number = product.GetString( "Ecom:Product.Number" ),
578 name = product.GetString( "Ecom:Product.Name" ),
579 imageLarge = ImageService.Instance.GetImageURL( product.GetString( "Ecom:Product.ImageLarge.Clean" ), 450, 350, 5 ),
580 price = ProductService.Instance.GetPriceFormatted( product.GetDouble( "Ecom:Product.Price.Price" ) ),
581 descriptionShortExtra01 = product.GetString( "Ecom:Product:Field.DescriptionShortExtra01" ),
582 descriptionShort = product.GetString( "Ecom:Product.ShortDescription" ),
583 stock = new
584 {
585 id = product.GetString( "Ecom:Product:Stock.ID" ),
586 quantity = product.GetString( "Ecom:Product.Stock" ),
587 text = product.GetString( "Ecom:Product:Stock.Text" ),
588 delivery = product.GetString( "Ecom:Product:Stock.DeliveryText" )
589 }
590 };
591
592 <div class="@productlistItemClassList">
593 <div class="e-products-item js-e-products-item">
594 <div class="e-products-item-container">
595 <div class="junckers-relatedproducts-item-image-container" style="background: url(@productData.imageLarge)">
596 @if ( string.IsNullOrEmpty( productData.descriptionShort ) == false )
597 {<div class="junckers-relatedproducts-item-text-container py-1">
598 <p class="e-products-item-text mb-0 px-2 small">
599 <strong>Package Size</strong>
600 </p>
601 <p class="e-products-item-text mb-0 text-muted px-2 small">
602 @productData.descriptionShort
603 </p>
604 </div>
605 }
606 </div>
607 <div class="e-products-item-text-container text-center">
608 <h3 class="e-products-item-name mb-0">
609 @productData.name
610 </h3>
611 @* <p class="e-products-item-text mb-0"> *@
612 @* <small class="e-products-item-price small text-muted"> *@
613 @* <a href="@productData.url"> *@
614 @* @productData.price *@
615 @* </a> *@
616 @* </small> *@
617 @* </p> *@
618 </div>
619 </div>
620 </div>
621 </div>
622 }
623 }
624
625
626 @helper sectionStart(string sectionClasses = "e-section", string contentClasses = null, bool sectionCollapse = false, string collapseToggleTextExpand = "Se mere", string collapseToggleTextCollapse = "Se mindre")
627 {
628 ClassList sectionClassList = new ClassList();
629 sectionClassList.AddClasses( sectionClasses );
630 ClassList contentClassList;
631 string collapseId = Guid.NewGuid().ToString( "N" );
632 ClassList collapseToggleClassList = new ClassList();
633 if ( contentClasses == null )
634 {
635 contentClassList = Co3.Espresso.Website.Services.PageService.Instance.GetResponsiveClassesFromPageItem( PageView.Current().Page.Item );
636 }
637 else
638 {
639 contentClassList = new ClassList();
640 contentClassList.AddClasses( contentClasses );
641 }
642 if ( sectionCollapse == true )
643 {
644 sectionClassList.AddClasses( "p-section-collapse js-p-section-collapse" );
645 collapseToggleClassList.AddClasses( contentClasses );
646 collapseToggleClassList.AddClasses( "p-section-collapse-toggle collapsed order-last text-center" );
647 contentClassList.AddClasses( "p-section-collapse-content collapse is-md" );
648 }
649 @:<section class="@sectionClassList">
650 @:<div class="container-fluid">
651 @:<div class="row">
652
653 if ( sectionCollapse == true )
654 // TODO: SplitPattern into seperate heler function
655 {
656 <div class="@collapseToggleClassList" data-toggle="collapse" data-target="#@collapseId">
657 <button class="btn btn-primary p-section-collapse-toggle-btn" type="button">
658 <i class="material-icons p-section-collapse-toggle-icon">keyboard_arrow_down</i>
659 </button>
660 <small class="p-section-collapse-toggle-text h4" data-expand-text="@collapseToggleTextExpand" data-collapse-text="@collapseToggleTextCollapse"></small>
661 </div>
662 }
663
664 @:<div class="@contentClassList" id="@collapseId">
665 @:<div class="row">
666 }
667
668 @helper sectionEnd()
669 {
670 @:</div>
671 @:</div>
672 @:</div>
673 @:</div>
674 @:</section>
675 }
676
677
678
679
680 <div class="e-loading-overlay e-page-loading-overlay is-loading js-e-page-loading-overlay">
681 <div class="e-loading-spinner"></div>
682 </div>
683
684
685
686 <div class="@Espresso.Canvas.ClassList">
687 @{
688 ClassList headerClassList = new ClassList();
689 headerClassList.AddClasses( "e-header js-e-header is-sticky" );
690 if ( Espresso.Item.HeaderTransparent == "True" )
691 {
692 headerClassList.AddClasses( "is-transparent" );
693 }
694
695 ClassList logoClassList = new ClassList();
696 logoClassList.AddClasses( "e-logo" );
697
698 string backButtonLink = Espresso.Item.BackButtonLink;
699 ClassList backButtonClassList = new ClassList();
700 ClassList backButtonIconClassList = new ClassList();
701 if ( Espresso.Item.BackButton == "True" )
702 {
703 backButtonClassList.AddClasses( "btn btn-sm btn-secondary my-1 align-self-center" );
704 if ( backButtonLink == "" || backButtonLink == "/" )
705 {
706 backButtonLink = "/";
707 backButtonClassList.AddClasses( "js-e-back-link" );
708 }
709 backButtonIconClassList.AddClasses( "material-icons" );
710 if ( Espresso.Item.BackButtonPosition == "right" )
711 {
712 backButtonClassList.AddClasses( "order-last" );
713 logoClassList.AddClasses( "order-first" );
714 }
715 else
716 {
717 backButtonClassList.AddClasses( "order-first" );
718 logoClassList.AddClasses( "mr-0 ml-auto order-last" );
719 }
720 if ( Espresso.Item.BackButtonIcon == "arrow_back" )
721 {
722 backButtonClassList.AddClasses( "arrow-left" );
723 backButtonIconClassList.AddClasses( "d-none" );
724 }
725 else if ( Espresso.Item.BackButtonIcon == "arrow_forward" )
726 {
727 backButtonClassList.AddClasses( "arrow-right" );
728 backButtonIconClassList.AddClasses( "d-none" );
729 }
730 }
731
732 string logoPrimary = Espresso.Area.Item.LogoPrimary;
733 string logoSecondary = Espresso.Area.Item.LogoSecondary;
734 if ( string.IsNullOrEmpty( logoSecondary ) == true )
735 {
736 logoSecondary = logoPrimary;
737 }
738 string tagline = Espresso.Area.Item.Tagline;
739 Dictionary< string, string > navigationHtml = new Dictionary< string, string >
740 {
741 {
742 "global", RenderNavigation( new
743 {
744 id = "dwnav-global",
745 template = "global.xslt",
746 startlevel = 1,
747 endlevel = 8,
748 expandmode = "all"
749 } )
750 },
751 {
752 "utilities-primary", RenderNavigation( new
753 {
754 id = "dwnav-utilities-primary",
755 template = "utilities.xslt",
756 startlevel = 4,
757 endlevel = 5,
758 expandmode = "all",
759 parenttag = "utilities-primary"
760 } )
761 },
762 {
763 "utilities-secondary", RenderNavigation( new
764 {
765 id = "dwnav-utilities-secondary",
766 template = "utilities.xslt",
767 startlevel = 4,
768 endlevel = 4,
769 expandmode = "all",
770 parenttag = "utilities-secondary"
771 } )
772 },
773 {
774 "hamburger-header", RenderNavigation( new
775 {
776 id = "dwnav-hamburger-header",
777 template = "utilities.xslt",
778 startlevel = 4,
779 endlevel = 4,
780 expandmode = "all",
781 parenttag = "hamburger-header"
782 } )
783 },
784 {
785 "hamburger-aside", RenderNavigation( new
786 {
787 id = "dwnav-hamburger-aside",
788 template = "utilities.xslt",
789 startlevel = 4,
790 endlevel = 4,
791 expandmode = "all",
792 parenttag = "hamburger-aside"
793 } )
794 }
795 };
796 }
797 @if ( Espresso.Item.HeaderHide != "True" )
798 {
799 <header class="@headerClassList" data-autohide="true">
800
801 <div class="e-header-hamburger">
802 @sectionStart( "e-header-section e-section", "col-12" )
803 <div class="col-12 e-header-section-content">
804 <div class="@logoClassList">
805 <a class="e-logo-link" href="/">
806 <img src="@logoPrimary" class="e-logo-img e-logo-img-primary">
807 <img src="@logoSecondary" class="e-logo-img e-logo-img-secondary">
808 @if ( string.IsNullOrEmpty( tagline ) == false )
809 {
810 <p class="e-logo-tagline">@tagline</p>
811 }
812 </a>
813 </div>
814 @if ( Espresso.Item.NavigationHide != "True" )
815 {
816 <section class="e-nav-hamburger-header">
817 <ul class="nav">
818 @navigationHtml[ "hamburger-header" ]
819 @* TODO: Move to xslt *@
820 <li class="e-nav-item-hamburger-open nav-item">
821 <a class="nav-link" data-target=".modal.e-nav" data-toggle="modal" href="#">
822 <i class="e-nav-pageicon material-icons">menu</i>
823 <span class="e-nav-pagename">@Translate( "Header - Hamburger menu open - Button", "Menu" )</span>
824 </a>
825 </li>
826 </ul>
827 </section>
828 }
829 @if ( Espresso.Item.BackButton == "True" )
830 {
831 <a class="@backButtonClassList" href="@backButtonLink">
832 @if ( Espresso.Item.BackButtonIcon != "" )
833 {
834 <i class="@backButtonIconClassList">@Espresso.Item.BackButtonIcon</i>
835 }
836 @Espresso.Item.BackButtonText
837 </a>
838 }
839 </div>
840 @sectionEnd()
841 </div>
842 <div class="e-nav js-e-nav modal p-0" data-backdrop="false">
843 <div class="e-nav-container navbar">
844
845 @sectionStart( "e-header-section e-section", "col-12" )
846 <div class="col-12 e-header-section-content">
847 <div class="@logoClassList">
848 <a class="e-logo-link" href="/">
849 <img src="@logoPrimary" class="e-logo-img e-logo-img-primary" alt="@Espresso.Area.Item.CompanyName">
850 <img src="@logoSecondary" class="e-logo-img e-logo-img-secondary">
851 @if ( string.IsNullOrEmpty( tagline ) == false )
852 {
853 <p class="e-logo-tagline">@tagline</p>
854 }
855 </a>
856 </div>
857
858 @if ( Espresso.Item.NavigationHide != "True" )
859 {
860 <nav class="e-nav-global js-e-nav-global">
861 <ul class="nav">
862 @navigationHtml[ "global" ]
863 </ul>
864 </nav>
865
866 <div class="e-nav-item-hamburger-close">
867 <a class="nav-link" data-target=".modal.e-nav" data-toggle="modal" href="#">
868 <i class="e-nav-pageicon material-icons">close</i>
869 <span class="e-nav-pagename">@Translate( "Header - Hamburger menu close - Button", "Close" )</span>
870 </a>
871 </div>
872
873 if ( string.IsNullOrEmpty( navigationHtml[ "utilities-primary" ] ) == false )
874 {
875 @:</div>
876 @sectionEnd()
877 @sectionStart( "bg-tertiary e-header-section e-section", "col-12" )
878 @:<div class="col-12 e-header-section-content">
879
880 <nav class="e-nav-utilities-primary js-e-nav-utilities-primary">
881 <ul class="nav">
882 @navigationHtml[ "utilities-primary" ]
883 </ul>
884 </nav>
885 }
886 if ( string.IsNullOrEmpty( navigationHtml[ "utilities-secondary" ] ) == false )
887 {
888 <nav class="e-nav-utilities-secondary">
889 <ul class="nav">
890 @navigationHtml[ "utilities-secondary" ]
891 </ul>
892 </nav>
893 }
894 if ( string.IsNullOrEmpty( navigationHtml[ "hamburger-aside" ] ) == false )
895 {
896 <nav class="e-nav-hamburger-aside">
897 <ul class="nav">
898 @navigationHtml[ "hamburger-aside" ]
899 </ul>
900 </nav>
901 }
902 }
903 @if ( Espresso.Item.BackButton == "True" )
904 {
905 <a class="@backButtonClassList" href="@backButtonLink">
906 @if ( Espresso.Item.BackButtonIcon != "" )
907 {
908 <i class="@backButtonIconClassList">@Espresso.Item.BackButtonIcon</i>
909 }
910 @Espresso.Item.BackButtonText
911 </a>
912 }
913 </div>
914 @sectionEnd()
915
916 </div>
917 </div>
918
919 </header>
920 }
921
922
923
924 @using Dynamicweb.Security.UserManagement
925 @{
926 User currentUser = User.get_Current( PagePermissionLevels.Frontend );
927 if ( currentUser != null )
928 {
929 User currentSecondaryUser = currentUser.CurrentSecondaryUser;
930 if ( currentSecondaryUser != null )
931 {
932 @sectionStart( "e-section bg-warning", "col-12" )
933 <div class="align-self-center col-12 col-lg-9 col-md-8 my-1">
934 <p class="line-height-sm mb-0 text-center text-md-left">
935 <i class="material-icons material-icons-2x">supervisor_account</i> You are currently impersonating this user: <strong>@currentUser.Name</strong>
936 </p>
937 </div>
938 <div class="align-self-center col-12 col-lg-3 col-md-4 my-1">
939 <form class="mb-0 small text-center text-md-right" method="post" action="@Espresso.Area.Item.ExtranetImpersonationPage">
940 <button class="btn btn-primary" name="DwExtranetRemoveSecondaryUser" type="submit">Stop impersonation</button>
941 </form>
942 </div>
943 @sectionEnd()
944 }
945 }
946 }
947
948
949 <main class="e-content">
950 @using Dynamicweb.Content;
951 @using Dynamicweb.Extensibility;
952 @{
953 string eBreadcrumbClasslist = "e-breadcrumb js-e-breadcrumb d-none d-lg-block";
954 if ( Espresso.Item.Breadcrumb != "auto" && Espresso.Item.Breadcrumb != "none" && String.IsNullOrEmpty( Espresso.Item.Breadcrumb ) == false )
955 {
956 eBreadcrumbClasslist += string.Format( " e-breadcrumb-{0}", Espresso.Item.Breadcrumb );
957 }
958 string navigationHtmlBreadcrumb = RenderNavigation( new
959 {
960 id = "dwnav-breadcrumb",
961 template = "breadcrumb.xslt",
962 startlevel = 1,
963 endlevel = 10,
964 expandmode = "pathonly"
965 } );
966 }
967
968 @if ( string.IsNullOrEmpty( navigationHtmlBreadcrumb ) == false && Espresso.Item.Breadcrumb != "none" && string.IsNullOrEmpty( Espresso.Item.Breadcrumb ) == false )
969 {
970 <section class="e-section @eBreadcrumbClasslist">
971 <div class="container-fluid">
972 <div class="row">
973 <div class="col-12">
974 <div class="row">
975
976 <div class="col-12">
977 <nav class="e-breadcrumb-container">
978 <ol class="breadcrumb nav text-muted">
979 <li class="breadcrumb-item m-0 p-0">
980 <a class="arrow-left breadcrumb-back-link js-e-back-link px-0" href="/">@Translate( "Breadcrumb - Back link", "Back" )</a>
981 <span class="breadcrumb-prefix-text">
982 @Translate( "Breadcrumb - Prefix - Text", "You are here:" )
983 </span>
984 <a href="/">
985 @ServiceLocator.Current.GetPageService().GetFirstPageForArea( GetInteger( "DwAreaID" ) ).MenuText
986 </a>
987 </li>
988 @navigationHtmlBreadcrumb
989 </ol>
990 </nav>
991 </div>
992
993 </div>
994 </div>
995 </div>
996 </div>
997 </section>
998 }
999
1000
1001 <article id="dwcontentmain" class="e-content-main @Espresso.ContentArea.ClassList">
1002 @{
1003 string NavigationLocalHorizontalClassList = "e-nav-local e-nav-local-horizontal js-e-nav-local-horizontal";
1004 string NavigationLocalHorizontalContainerClassList = "e-nav-local-container";
1005 if( Espresso.Item.NavigationLocalShow == "True" && Espresso.Item.NavigationLocalLayout == "horizontal" ) {
1006 NavigationLocalHorizontalClassList += " " + Espresso.Item.NavigationLocalCustomClasses;
1007 if( Espresso.Item.NavigationLocalSticky == "True" ) {
1008 NavigationLocalHorizontalClassList += " is-sticky";
1009 }
1010 if( Espresso.Item.NavigationLocalAbsolute == "True" ) {
1011 NavigationLocalHorizontalClassList += " is-absolute";
1012 }
1013 else{
1014 if( Espresso.Item.NavigationLocalMarginTop != "0" && Espresso.Item.NavigationLocalMarginTop != "" ) {
1015 NavigationLocalHorizontalClassList += " mt-" + Espresso.Item.NavigationLocalMarginTop;
1016 }
1017 if( Espresso.Item.NavigationLocalMarginBottom != "0" && Espresso.Item.NavigationLocalMarginBottom != "" ) {
1018 NavigationLocalHorizontalClassList += " mb-" + Espresso.Item.NavigationLocalMarginBottom;
1019 }
1020 }
1021 }
1022 }
1023 @if( Espresso.Item.NavigationLocalShow == "True" && Espresso.Item.NavigationLocalLayout == "horizontal" ) {
1024 <section class="e-section @NavigationLocalHorizontalClassList">
1025 <div class="container-fluid">
1026 <div class="row">
1027 <div class="col-12">
1028 <div class="row">
1029
1030 <div class="col-12">
1031 <nav id="dwnav-local-@Espresso.DynamicwebPage.ID" class="@NavigationLocalHorizontalContainerClassList">
1032 <ul class="nav justify-content-start">
1033 @if( Espresso.Item.NavigationLocalHeading != "" ){
1034 <li class="e-nav-local-heading"><h2>@Espresso.Item.NavigationLocalHeading</h2></li>
1035 }
1036 @RenderNavigation( new {
1037 id = "dwnav-local-" + Espresso.DynamicwebPage.ID,
1038 parentid = string.IsNullOrEmpty( Espresso.Item.NavigationLocalParentPage ) == false ? Espresso.Item.NavigationLocalParentPage : Espresso.DynamicwebPage.ID,
1039 template = string.IsNullOrEmpty( Espresso.Item.NavigationLocalTemplate ) == false ? Espresso.Item.NavigationLocalTemplate : "local-" + Espresso.Item.NavigationLocalLayout + ".xslt",
1040 startlevel = Espresso.Item.NavigationLocalLevelStart,
1041 endlevel = Espresso.Item.NavigationLocalLevelEnd,
1042 expandmode = Espresso.Item.NavigationLocalPageTreeExpand == "True" ? "all" : "path",
1043 } )
1044 </ul>
1045 </nav>
1046 </div>
1047
1048 </div>
1049 </div>
1050 </div>
1051 </div>
1052 </section>
1053 }
1054
1055
1056 @{
1057 string NavigationLocalVerticalClassList = "e-nav-local e-nav-local-vertical js-e-nav-local-vertical";
1058 string NavigationLocalVerticalContainerClassList = "e-nav-local-container";
1059 string NavigationLocalVerticalTemplate = "local-" + Espresso.Item.NavigationLocalLayout + ".xslt";
1060 if ( string.IsNullOrEmpty( Espresso.Item.NavigationLocalTemplate ) == false && Path.GetExtension( Espresso.Item.NavigationLocalTemplate ) == ".xslt" )
1061 {
1062 NavigationLocalVerticalTemplate = Path.GetFileName( Espresso.Item.NavigationLocalTemplate );
1063 }
1064
1065 if ( Espresso.Item.NavigationLocalShow == "True" && Espresso.Item.NavigationLocalLayout == "vertical" )
1066 {
1067 NavigationLocalVerticalClassList += " " + Espresso.Item.NavigationLocalCustomClasses;
1068 //NavigationLocalVerticalClassList += " col-3";
1069
1070 if ( Espresso.Item.NavigationLocalMarginTop != "0" && Espresso.Item.NavigationLocalMarginTop != "" )
1071 {
1072 NavigationLocalVerticalClassList += " mt-" + Espresso.Item.NavigationLocalMarginTop;
1073 }
1074 if ( Espresso.Item.NavigationLocalMarginBottom != "0" && Espresso.Item.NavigationLocalMarginBottom != "" )
1075 {
1076 NavigationLocalVerticalClassList += " mb-" + Espresso.Item.NavigationLocalMarginBottom;
1077 }
1078
1079 if ( Espresso.Item.NavigationLocalSticky == "True" )
1080 {
1081 NavigationLocalVerticalClassList += " is-sticky";
1082 }
1083
1084 if ( Espresso.Item.NavigationLocalAbsolute == "True" )
1085 {
1086 NavigationLocalVerticalClassList += " is-absolute";
1087 }
1088 else
1089 {
1090 Espresso.ContentSection.ClassList.Clear();
1091 Espresso.ContentSection.ClassList.AddClasses( "wtf col-12 col-lg-9 ml-auto" );
1092 }
1093 }
1094 }
1095
1096 @if ( Espresso.Item.NavigationLocalShow == "True" && Espresso.Item.NavigationLocalLayout == "vertical" )
1097 {
1098 <section class="e-section @NavigationLocalVerticalClassList">
1099 <div class="container-fluid">
1100 <div class="row">
1101 <div class="col-12">
1102 <div class="row">
1103
1104 <div class="col-3">
1105 <nav id="dwnav-local-@Espresso.DynamicwebPage.ID" class="@NavigationLocalVerticalContainerClassList">
1106 <ul class="flex-column nav">
1107 @if ( Espresso.Item.NavigationLocalHeading != "" )
1108 {
1109 <li class="e-nav-local-heading">
1110 <h2>@Espresso.Item.NavigationLocalHeading</h2>
1111 </li>
1112 }
1113 @RenderNavigation( new
1114 {
1115 id = "dwnav-local-" + Espresso.DynamicwebPage.ID,
1116 parentid = string.IsNullOrEmpty( Espresso.Item.NavigationLocalParentPage ) == false ? Espresso.Item.NavigationLocalParentPage : Espresso.DynamicwebPage.ID,
1117 template = NavigationLocalVerticalTemplate,
1118 startlevel = Espresso.Item.NavigationLocalLevelStart,
1119 endlevel = Espresso.Item.NavigationLocalLevelEnd,
1120 expandmode = Espresso.Item.NavigationLocalPageTreeExpand == "True" ? "all" : "path",
1121 } )
1122 </ul>
1123 </nav>
1124 </div>
1125
1126 </div>
1127 </div>
1128 </div>
1129 </div>
1130 </section>
1131 }
1132
1133
1134 @sectionStart()
1135 @GetValue("DwContent(dwcontentmain)")
1136 @sectionEnd()
1137 </article>
1138 </main>
1139 @using System.Globalization
1140 @using Dynamicweb.Frontend
1141 @{
1142 string FooterContentClassList = "e-footer-content e-section";
1143 if ( Espresso.Item.ContentAnimate == "True" )
1144 {
1145 @* FooterContentClassList += " js-e-scroll-reveal"; *@
1146 }
1147 }
1148 @if ( Espresso.Item.FooterHide != "True" )
1149 {
1150 <footer class="e-footer">
1151 <article class="e-footer-wrapper">
1152 <section class="@FooterContentClassList">
1153 <div class="container-fluid">
1154 <div class="row">
1155 @if ( string.IsNullOrEmpty( Espresso.Area.Item.FooterParagraphs ) == false )
1156 {
1157 foreach ( string paragraphID in Espresso.Area.Item.FooterParagraphs.Split( new char[] { ',' }, StringSplitOptions.None ) )
1158 {
1159 @RenderParagraphContent( int.Parse( paragraphID ) )
1160 ;
1161 }
1162 }
1163 @if ( string.IsNullOrEmpty( GetString( "DwNavigation(dwnavutilitiessecondaryfooter)" ) ) == false )
1164 {
1165 <div class="col-12">
1166 <aside class="e-nav-utilities-secondary">
1167 <ul class="nav nav-inline">
1168 @GetValue("DwNavigation(dwnavutilitiessecondaryfooter)")
1169 </ul>
1170 </aside>
1171 </div>
1172 }
1173 </div>
1174 </div>
1175 </section>
1176 <section class="e-footer-copyright e-section">
1177 <div class="container-fluid">
1178 <div class="row align-items-center">
1179 <div class="col-12 col-sm-7">
1180 <p class="e-copyright">
1181 @Translate( "Footer - Copyright - Text", "Copyright ©" )
1182 @GetGlobalValue( "Global:Server.Date.Year" )
1183 @Espresso.Area.Item.CompanyName.
1184 @Translate( "Footer - All Rights Reserved - Text", "All rights reserved." )
1185 </p>
1186 </div>
1187 <div class="col-12 col-sm-5 text-left text-sm-right">
1188 <p class="pdf-only">@Translate( "Footer - PDF created - Text", "PDf created:" ) @DateTime.Now.ToString( PageView.Current().Area.CultureInfo )</p>
1189 </div>
1190 </div>
1191 </div>
1192 </section>
1193 </article>
1194 </footer>
1195 }
1196
1197 @if( string.IsNullOrEmpty( GetString("DwContent(dwcontentcta)") ) == false ) {
1198 <aside id="dwcontentcta" class="js-e-cta e-cta is-hidden fixed-top">
1199 <section class="e-section">
1200 <div class="container-fluid">
1201 <div class="row no-gutters">
1202 <div class="col-12">
1203 <div class="row no-gutters justify-content-center align-items-center">
1204 @GetValue("DwContent(dwcontentcta)")
1205 @* <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> *@
1206 </div>
1207 </div>
1208 </div>
1209 </div>
1210 </section>
1211 </aside>
1212 }
1213
1214 <div class="e-cart-msg modal fade small" id="js-e-cart-msg" data-backdrop="false">
1215 <div class="modal-dialog e-cart-msg-modal-dialog">
1216 <div class="modal-content">
1217 <div class="modal-header">
1218 <h4 class="m-0 js-e-cart-msg-heading modal-title">
1219 <i class="material-icons material-icons-large text-black">check_circle</i>
1220 <span>@Translate( "eCom Cart - Product Added - Heading", "Added to your cart" )</span>
1221 </h4>
1222 <button class="close" data-dismiss="modal" type="button">
1223 <i class="material-icons">close</i>
1224 </button>
1225 </div>
1226 <div class="modal-body d-none">
1227 <div class="js-e-cart-msg-content">
1228 <script id="js-e-handlebars-tmpl-cart-msg-lastadded" type="text/x-handlebars-template">
1229 <div class="row">
1230 {{#each cart.lastAdded}}
1231 <div class="col-12 py-1">
1232 <div class="row">
1233 <div class="col-4">
1234 <a class="" href="{{url}}">
1235 <img alt="" class="img-fluid" src="{{imageLarge}}">
1236 </a>
1237 </div>
1238 <div class="col-8">
1239 <h3 class="mb-0">
1240 <a href="{{url}}" class="text-decoration-none">{{name}}</a>
1241 </h3>
1242 <p class="mb-0">
1243 <a href="{{url}}" class="text-auto text-decoration-none">
1244 {{{price}}}<br>
1245 {{{stock.text}}}<br>
1246 {{{stock.delivery}}}<br>
1247 </a>
1248 </p>
1249 </div>
1250 </div>
1251 </div>
1252 {{/each}}
1253 </div>
1254 </script>
1255 </div>
1256 </div>
1257 <div class="bg-light e-cart-msg-footer modal-footer border-top-0">
1258 <a class="btn btn-secondary mr-1" href="/shop/cart" data-dismiss="modal">@Translate( "eCom Checkout - Continue Shopping - Button","Continue Shopping" )</a>
1259 <a class="arrow-right btn btn-success" href="/shop/cart">@Translate( "eCom Checkout - Go to cart - Button","Go to cart" )</a>
1260 </div>
1261 </div>
1262 </div>
1263 </div>
1264
1265 </div>
1266
1267 <div class="modal fade e-search js-e-search js-e-search-modal modal-fullscreen" data-backdrop="false" data-keyboard="true" data-focus="true">
1268 <div class="modal-dialog">
1269 <div class="modal-content">
1270
1271 <div class="modal-header">
1272 <a class="btn btn-sm btn-secondary js-e-back-link arrow-left" href="/" data-dismiss="modal">
1273 @Translate("Search - Back button", "Back")
1274 </a>
1275 <div class="e-logo">
1276 <a href="/" class="e-logo-link my-0">
1277 <img src="@logoPrimary" class="e-logo-img e-logo-img-primary">
1278 <img src="@logoSecondary" class="e-logo-img e-logo-img-secondary">
1279 </a>
1280 </div>
1281 </div>
1282
1283 <div class="modal-body">
1284
1285 <div class="container-fluid">
1286
1287 <div class="e-search-form-container">
1288 <div class="row justify-content-center">
1289 <div class="col-12 col-md-10 col-lg-8 col-xl-6 mt-3">
1290 <form action="" class="e-search-form js-e-search-form">
1291 <div class="js-e-search-input-group e-search-input-group is-empty">
1292 <label class="e-search-label" for="e-search-input"><i class="material-icons">search</i></label>
1293 @{ string Translate_Search_InputText = Translate("Search - Input Placeholder - Text", "Search"); }
1294 <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">
1295 <span class="js-e-search-clear e-search-clear"><i class="material-icons">close</i></span>
1296 <button class="e-search-submit btn btn-primary" type="submit"><i class="material-icons">search</i></button>
1297 </div>
1298 </form>
1299 </div>
1300 </div>
1301 </div>
1302
1303 <div class="js-e-search-result-container e-search-result-container">
1304
1305 <div class="row justify-content-center">
1306 <div class="col-12 col-md-10 col-lg-8 col-xl-6">
1307 <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>
1308 </div>
1309 </div>
1310
1311 <div class="row justify-content-center">
1312 <div class="col-12 col-xl-10">
1313 <div class="js-e-search-result-products e-search-result-products is-empty mb-4">
1314 <script id="js-e-handlebars-tmpl-search-result-item-product" type="text/x-handlebars-template">
1315 <div class="e-products">
1316 <div class="row">
1317 {{#loop products}}
1318 <div class="col-6 col-sm-6 col-md-4 col-lg-4">
1319 <div class="e-products-item">
1320 <div class="e-products-item-container">
1321 <div class="e-products-item-image-container">
1322 <a class="e-products-item-image-wrapper" href="{{url}}">
1323 <img src="{{imageMedium}}" alt="" class="e-products-item-image j-img-productcategory-{{category}}">
1324 </a>
1325 </div>
1326 <div class="e-products-item-text-container text-center small">
1327 <h3 class="e-products-item-name mb-0"><a href="{{url}}">{{name}}</a></h3>
1328 {{#if floorCategoryName}}
1329 <p>{{{floorCategoryName}}}</p>
1330 {{/if}}
1331 {{#if descriptionShortExtra01}}
1332 <p class="e-products-item-text mb-0 small">
1333 <a href="{{url}}">
1334 {{descriptionShortExtra01}}
1335 </a>
1336 </p>
1337 {{/if}}
1338 @* <p class="e-products-item-text mb-0 small"> *@
1339 @* <span class="e-products-item-price"> *@
1340 @* <a href="{{url}}"> *@
1341 @* {{{price}}} *@
1342 @* </a> *@
1343 @* </span> *@
1344 @* </p> *@
1345 </div>
1346 </div>
1347 </div>
1348 </div>
1349 {{/loop}}
1350 </div>
1351 <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>
1352 </div>
1353 </script>
1354 </div>
1355 </div>
1356 </div>
1357
1358 <div class="row justify-content-center">
1359 <div class="col-12 col-md-10 col-lg-8 col-xl-6">
1360 <div class="js-e-search-result-pages e-search-result-pages is-empty mb-3">
1361 <script id="js-e-handlebars-tmpl-search-result-item-page" type="text/x-handlebars-template">
1362 <div class="row">
1363 {{#loop pages}}
1364 <div class="col-12">
1365 <p class="mb-0"><a href="{{{url}}}" class="text-bold">{{{title}}}</a></p>
1366 <p class="mb-0 small text-truncate">
1367 <a href="{{{url}}}" class="text-auto text-muted text-decoration-none"><span class="d-none d-sm-inline">@GetGlobalValue( "Global:Request.Host" )</span>{{{url}}}</a></p>
1368 <p class="small">{{{text}}}...</p>
1369 </div>
1370 {{/loop}}
1371 </div>
1372 </script>
1373 </div>
1374 </div>
1375 </div>
1376
1377 <div class="js-e-search-loading-overlay e-loading-overlay e-search-loading-overlay">
1378 <div class="e-loading-spinner"></div>
1379 </div>
1380
1381 </div>
1382
1383 </div>
1384 </div>
1385 </div>
1386 </div>
1387 </div>
1388
1389 @if( Espresso.Area.Item.BackToTopLink == "True" ){
1390 <a href="#top" class="e-back-to-top js-e-back-to-top"><i class="material-icons">keyboard_arrow_up</i></a>
1391 }
1392
1393
1394
1395
1396 <div class="d-none flex-column">
1397 <div class="bg-primary">
1398 <br>
1399 </div>
1400 <div class="bg-secondary">
1401 <br>
1402 </div>
1403 <div class="bg-tertiary">
1404 <br>
1405 </div>
1406 </div>
1407 <script data-cookieconsent="ignore" async="" src="/Files/Templates/Designs/junckers/_assets/_dist/js/default.js?v=1.17.6"></script>
1408
1409 <a class="js-junckers-documentation-link junckers-documentation-pdf-link js-junckers-pdf-link pdf-hidden" href="#" target="_blank" data-product-id="@pdfProductId" data-page-id="@pdfPageId">
1410 <i class="material-icons">picture_as_pdf</i>
1411 </a>
1412 </body>
1413 @GetValue( "CopyRightNotice" )
1414 </html>
1415