Error executing template "Designs/ColoursAndCoating_generated/_parsed/WebshopPage.parsed.cshtml"
System.Data.SqlClient.SqlException (0x80131904): Connection Timeout Expired. The timeout period elapsed while attempting to consume the pre-login handshake acknowledgement. This could be because the pre-login handshake failed or the server was unable to respond back in time. The duration spent while attempting to connect to this server was - [Pre-Login] initialization=0; handshake=21748; ---> System.ComponentModel.Win32Exception (0x80004005): The wait operation timed out
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 Bluedesk.Tools.DynamicWeb.DataAccess.DynamicwebData.Query(String sqlQuery, SqlParameter[] parameters)
at Bluedesk.DynamicWeb.ItemTypes.BaseSolution.Frontend.BaseSettingServices.GetDataTable(Int32 PageId, Int32 AreaId) in C:\vso\ColoursCoatings\BluedeskBaseSolution\ClientBase\ItemTypes\Bluedesk.DynamicWeb.ItemTypes.BaseSolution\Frontend\BaseSettings.cs:line 515
at Bluedesk.DynamicWeb.ItemTypes.BaseSolution.Frontend.BaseSettingServices.RenderBaseSettings(PageView PageViewObj) in C:\vso\ColoursCoatings\BluedeskBaseSolution\ClientBase\ItemTypes\Bluedesk.DynamicWeb.ItemTypes.BaseSolution\Frontend\BaseSettings.cs:line 535
at CompiledRazorTemplates.Dynamic.RazorEngine_98ca028fcbed431988a06964c5cc5226.Execute() in D:\dynamicweb.net\Solutions\Bluedesk\Colours and Coating\colours.dw9.dynamicweb-cms.com\files\Templates\Designs\ColoursAndCoating_generated\_parsed\WebshopPage.parsed.cshtml:line 87
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:57471378-b265-4522-a554-7b3442996b41
Error Number:-2,State:0,Class:11
1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel>
2
3 @using System;
4 @using System.Web;
5 @using System.Linq;
6 @using System.Data;
7 @using System.Data.SqlClient;
8 @using System.Globalization;
9 @using System.Reflection;
10
11 @using Dynamicweb;
12 @using Dynamicweb.Content;
13 @using Dynamicweb.Content.Items;
14 @using Dynamicweb.Environment;
15 @using Dynamicweb.Frontend;
16 @using Dynamicweb.Frontend.Navigation;
17
18 @using Bluedesk.DynamicWeb.ItemTypes;
19 @using Bluedesk.DynamicWeb.ItemTypes.Settings;
20 @using Bluedesk.DynamicWeb.ItemTypes.Configuration;
21 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution;
22
23 @using Bluedesk.Tools.Generic;
24 @using Bluedesk.Tools.DynamicWeb.DataAccess;
25
26 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution.Frontend;
27
28 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel>
29
30 @using System;
31 @using System.Web;
32 @using System.Linq;
33 @using System.Globalization;
34
35 @using Dynamicweb;
36 @using Dynamicweb.Content.Items;
37 @using Dynamicweb.Environment;
38 @using Dynamicweb.Frontend;
39 @using Dynamicweb.Frontend.Navigation;
40
41 @using Bluedesk.Tools.Generic;
42
43 @using Bluedesk.DynamicWeb.ItemTypes;
44 @using Bluedesk.DynamicWeb.ItemTypes.Settings;
45 @using Bluedesk.DynamicWeb.ItemTypes.Settings.Configuration;
46
47 @using Bluedesk.DynamicWeb.ItemTypes.Configuration;
48
49 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution;
50 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution.Frontend;
51
52 @{
53
54 var master_configuration = Dynamicweb.Services.Pages.GetPageByNavigationTag(Pageview.AreaID, "MasterConfiguration");
55 MasterConfig mc = master_configuration.Item.ToCodeFirstItem<MasterConfig>();
56
57 bool HideStandardFooter = mc.FooterConfiguration.HideStandardFooter.ToString() == "True" ? true : false;
58
59 string MasterConfigCssClass = !string.IsNullOrWhiteSpace(mc.CssClass) ? mc.CssClass : "";
60
61 // GeneralConfig GeneralConfiguration = mc.GeneralConfiguration;
62 EcomConfig EcommerceConfiguration = mc.EcomConfiguration;
63
64 bool WithVATBool = Pageview.Area.EcomPricesWithVat == "True";
65 bool pricesWithoutVatForUsers = EcommerceConfiguration.ShowPricesWithoutVatForUsers;
66 bool pricesWithoutVatForValidVat = EcommerceConfiguration.ShowPricesWithoutVatWhenValidVatNumber;
67 if(pricesWithoutVatForUsers && !pricesWithoutVatForValidVat && Pageview.User != null) {
68 WithVATBool = false;
69 }
70 if(pricesWithoutVatForValidVat && Pageview.User != null && !string.IsNullOrWhiteSpace(Pageview.User.VatRegNumber)) {
71 WithVATBool = false;
72 }
73 string ecomShowPricesWithVat = WithVATBool.ToString().ToLower();
74 string ecomPricesFormatted = (EcommerceConfiguration.FormattedPrices).ToString().ToLower();
75
76 bool IsNotContentManager = false;
77 bool isVisualEditor = Pageview.IsVisualEditorMode;
78
79 if (isVisualEditor)
80 {
81 System.Web.HttpContext.Current.Session["PreviousPage"] = Pageview.Page.ID;
82 IsNotContentManager = (Dynamicweb.Security.UserManagement.User.GetCurrentBackendUser()?.Groups?.All(g => g.Name != "Content managers") ?? true);
83 }
84
85 BaseSettingsObj BaseSettings = new BaseSettingsObj();
86
87 BaseSettings = BaseSettingServices.RenderBaseSettings(Pageview);
88 HttpContext.Current.Session["BaseSettings"] = BaseSettings;
89
90 //if (HttpContext.Current.Session["BaseSettings"] == null)
91 //{
92
93 //}
94 //else
95 //{
96 // BaseSettings = (BaseSettingsObj)HttpContext.Current.Session["BaseSettings"];
97 // if (BaseSettings.AreaID != Pageview.AreaID)
98 // {
99 // BaseSettings = BaseSettingServices.RenderBaseSettings(Pageview);
100 // HttpContext.Current.Session["BaseSettings"] = BaseSettings;
101 // }
102 //}
103
104 BaseSettingsBrandConfiguration BaseSettingsBrandConfiguration = BaseSettings.BrandConfiguration;
105 BaseSettingsButtons BaseSettingsButtons = BaseSettingsBrandConfiguration.Buttons;
106
107 var font_configuration = Dynamicweb.Services.Pages.GetPageByNavigationTag(Pageview.AreaID, "FontConfiguration");
108
109 var httpdomain = Dynamicweb.Environment.Helpers.LinkHelper.GetHttpDomain();
110 var lang = Pageview.Area.CultureInfo.TwoLetterISOLanguageName;
111 var langName = Pageview.Area.Culture;
112
113 var csrftoken = application._webapi.Helper.CSRFHelper.TokenHeaderValue();
114 var designRoot = BaseSettings.DesignRoot;
115
116 var phonenumber = BaseSettings.CorporateSettings.Phonenumber;
117 var formattedPhonenumber = phonenumber.Replace(" ", String.Empty);
118 var emailadress = BaseSettings.CorporateSettings.Emailadress;
119 var buttonIconClass = Pageview.Area.Item["Global_button_icon"] != null ? Pageview.Area.Item["Global_button_icon"].ToString().Replace("+", " ") : "fal fa-arrow-right";
120 var callmebackformlink = BaseSettings.BrandConfiguration.CallMeBackForm;
121 var mobileThemeColor = BaseSettings.BrandConfiguration.MobileThemeColor;
122
123 bool isOffline = false;
124
125 DateTime workingHoursStart = BaseSettings.CorporateSettings.OpeningTime;
126 DateTime workingHoursEnd = BaseSettings.CorporateSettings.ClosingTime;
127 DateTime today = DateTime.Now;
128 var cHour = DateTime.Now.TimeOfDay;
129 int cDay = (int)DateTime.Now.DayOfWeek;
130 string availableToHour24hFormat = workingHoursEnd.TimeOfDay.ToString().Substring(0, 5);
131 var timeFromInput = DateTime.ParseExact(availableToHour24hFormat, "H:m", null, DateTimeStyles.None);
132 string availableToHour12hFormat = timeFromInput.ToString("hh:mm tt", CultureInfo.InvariantCulture);
133 var availableToHour = lang == "en" ? availableToHour12hFormat : availableToHour24hFormat;
134 bool isOvertime = cHour >= workingHoursEnd.TimeOfDay || cHour <= workingHoursStart.TimeOfDay;
135 bool isNoValidDate = today < workingHoursStart || today > workingHoursEnd;
136 if (isNoValidDate || isOvertime)
137 {
138 isOffline = true;
139 }
140
141 Boolean showBreadcrumbs = Pageview.Page.PropertyItem != null && Pageview.Page.PropertyItem["ShowBreadcrumbs"] != null ? Convert.ToBoolean(Pageview.Page.PropertyItem["ShowBreadcrumbs"]) : false;
142
143 var appcss = Cache.VersionedFile(designRoot + "/dist/app.css");
144
145 var favicon32 = Cache.VersionedFile(designRoot + "/assets/img/favicon-32.png", true);
146 var favicon16 = Cache.VersionedFile(designRoot + "/assets/img/favicon-16.png", true);
147 var favicon = Cache.VersionedFile(designRoot + "/assets/img/favicon.ico", true);
148
149 favicon = !string.IsNullOrWhiteSpace(BaseSettings.BrandConfiguration.Favicons.Favicon) ? BaseSettings.BrandConfiguration.Favicons.Favicon : favicon;
150 favicon16 = !string.IsNullOrWhiteSpace(BaseSettings.BrandConfiguration.Favicons.Favicon16) ? BaseSettings.BrandConfiguration.Favicons.Favicon16 : favicon16;
151 favicon32 = !string.IsNullOrWhiteSpace(BaseSettings.BrandConfiguration.Favicons.Favicon32) ? BaseSettings.BrandConfiguration.Favicons.Favicon32 : favicon32;
152
153 var appbundlejs = Cache.VersionedFile(designRoot + "/dist/app.bundle.js");
154 var appAsyncbundlejs = Cache.VersionedFile(designRoot + "/dist/appAsync.bundle.js");
155 var vuebundlejs = Cache.VersionedFile(designRoot + "/dist/vue.bundle.js");
156
157 //*** Start Scanapp configuration ***\\
158 bool hideHeader = false;
159 bool hideFooter = false;
160 bool hideBottombar = false;
161
162 if (HttpContext.Current.Session["ScanApp"] != null)
163 {
164 hideHeader = mc.ScanAppConfig.ShowHeader;
165 hideFooter = mc.ScanAppConfig.ShowFooter;
166 hideBottombar = mc.ScanAppConfig.ShowBottombar;
167 }
168 // END Scanapp configration **\\
169
170 }
171
172
173 @{
174 string fooProductDetailConfigurationID = mc.EcomConfiguration.ProductDetailConfigurationID;
175 string fooProductOverviewConfigurationID = mc.EcomConfiguration.ProductOverviewConfigurationID;
176
177 int ProductDetailLayoutID = Dynamicweb.Services.Pages.GetPageForItem("ProductDetailConfigurationPage", fooProductDetailConfigurationID)?.ID ?? 0;
178 int ProductOverviewLayoutID = Dynamicweb.Services.Pages.GetPageForItem("ProductOverviewConfigurationPage", fooProductOverviewConfigurationID)?.ID ?? 0;
179
180 System.Web.HttpContext.Current.Items["MasterPageSetup"] = "Ecommerce";
181
182 string queryParamGroupId = Dynamicweb.Context.Current.Request.QueryString.Get("GroupID");
183 string queryParamProductId = Dynamicweb.Context.Current.Request.QueryString.Get("ProductID");
184
185 bool isOverviewPage = string.IsNullOrWhiteSpace(queryParamProductId);
186 bool isDetailPage = !string.IsNullOrWhiteSpace(queryParamGroupId) && !string.IsNullOrWhiteSpace(queryParamProductId);
187 string jsIsOverviewPage = isOverviewPage.ToString().ToLower();
188 }
189
190 <!DOCTYPE html>
191 <html lang="@lang" prefix="og: http://ogp.me/ns#">
192 <head>
193 <meta charset="utf-8">
194 <meta http-equiv="X-UA-Compatible" content="IE=edge">
195 <meta name="viewport" content="width=device-width, initial-scale=1">
196 <meta name="theme-color" content="@mobileThemeColor">
197 @Model.MetaTags
198 <title>@Model.Title</title>
199
200 @RenderSnippet("canonical")
201 @RenderSnippet("ogTags")
202
203 @{
204 string urlProtocol = Dynamicweb.Context.Current.Request.Url.Scheme;
205 List<Dynamicweb.Content.Page> pageTranslations = new List<Dynamicweb.Content.Page>();
206 bool isMasterPage = Pageview.Area.IsMaster;
207 if (isMasterPage)
208 {
209 pageTranslations.Add(Pageview.Page);
210 if (Pageview.Page.Languages != null)
211 {
212 foreach (var language in Pageview.Page.Languages)
213 {
214 if (language.Active)
215 {
216 pageTranslations.Add(language);
217 }
218 }
219 }
220 }
221 else
222 {
223 pageTranslations.Add(Pageview.Page.MasterPage);
224 if (Pageview.Page.MasterPage != null)
225 {
226 if (Pageview.Page.MasterPage.Languages != null)
227 {
228 foreach (var language in Pageview.Page.MasterPage.Languages)
229 {
230 if (language.Active)
231 {
232 pageTranslations.Add(language);
233 }
234 }
235 }
236 }
237 }
238 foreach (var page in pageTranslations)
239 {
240 if (page != null)
241 {
242 string url = $"Default.aspx?ID={page.ID}";
243 string groupid = Dynamicweb.Context.Current.Request.QueryString.Get("GroupID");
244 string productid = Dynamicweb.Context.Current.Request.QueryString.Get("ProductID");
245 string variantid = Dynamicweb.Context.Current.Request.QueryString.Get("VariantID");
246 if (!string.IsNullOrWhiteSpace(groupid))
247 {
248 var groupObj = Dynamicweb.Ecommerce.Services.ProductGroups.GetGroup(groupid, page.Area.EcomLanguageId);
249 if (groupObj == null)
250 {
251 continue;
252 }
253 url = $"{url}&GroupID={groupid}";
254 }
255 if (!string.IsNullOrWhiteSpace(productid))
256 {
257 var productObj = Dynamicweb.Ecommerce.Services.Products.GetProductById(productid, variantid, page.Area.EcomLanguageId);;
258 if (productObj == null)
259 {
260 continue;
261 }
262 url = $"{url}&ProductID={productid}";
263 if (!string.IsNullOrWhiteSpace(variantid))
264 {
265 url = $"{url}&VariantID={variantid}";
266 }
267 }
268
269 string currentdomain = Context.Current.Request.Url.DnsSafeHost;
270 if (!string.IsNullOrEmpty(page.Area.DomainLock)) {
271 currentdomain = page.Area.DomainLock;
272 }
273 string friendlyUrl = Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(url);
274 string href = $"{urlProtocol}://{currentdomain}{friendlyUrl}";
275 string hreflang = page.Area.CultureInfo.Name.ToLower();
276 <link rel="alternate" href="@href" hreflang="@hreflang" />
277 }
278 }
279 }
280
281
282 <link rel="preconnect" href="https://fonts.googleapis.com">
283 <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
284 <link href="@appcss" rel="stylesheet" type="text/css" />
285
286 @{
287 if (!string.IsNullOrWhiteSpace(favicon32))
288 {
289 <link rel="icon" type="image/png" sizes="32x32" href="@favicon32">
290 }
291 if (!string.IsNullOrWhiteSpace(favicon16))
292 {
293 <link rel="icon" type="image/png" sizes="16x16" href="@favicon16">
294 }
295 if (!string.IsNullOrWhiteSpace(favicon))
296 {
297 <link rel="shortcut icon" href="@favicon">
298 }
299 }
300
301 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>>
302 @using System;
303 @using System.Web;
304 @using System.Linq;
305 @using System.Globalization;
306
307 @using Dynamicweb;
308 @using Dynamicweb.Content.Items;
309 @using Dynamicweb.Environment;
310 @using Dynamicweb.Frontend;
311 @using Dynamicweb.Frontend.Navigation;
312
313 @using Bluedesk.Tools.Generic;
314
315 @using Bluedesk.DynamicWeb.ItemTypes;
316 @using Bluedesk.DynamicWeb.ItemTypes.Settings;
317 @using Bluedesk.DynamicWeb.ItemTypes.Settings.Configuration;
318
319 @using Bluedesk.DynamicWeb.ItemTypes.Configuration;
320 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution;
321 @using Bluedesk.DynamicWeb.ItemTypes.Extensions;
322
323 @helper RenderCSSKeyAndValue(string Key, string Value)
324 {
325 if (!string.IsNullOrWhiteSpace(Value))
326 {
327 <text>@Key : @Value !important;</text>
328 }
329 }
330
331 @helper SetFontCSSVariables(FontConfigurationItemTab FontConfiguration)
332 {
333
334 string Top = FontConfiguration.top != 0 ? FontConfiguration.top.ToString() + "px" : "";
335 string Left = FontConfiguration.left != 0 ? FontConfiguration.left.ToString() + "px" : "";
336 string Right = FontConfiguration.right != 0 ? FontConfiguration.right.ToString() + "px" : "";
337 string Bottom = FontConfiguration.bottom != 0 ? FontConfiguration.bottom.ToString() + "px" : "";
338
339 string Position = FontConfiguration.PositionAbsolute ? "absolute" : "relative";
340
341 string Color = FontConfiguration.Color?.GetColorCode(Pageview.AreaID) ?? "";
342 string BackgroundColor = FontConfiguration.Backgroundcolor?.GetColorCode(Pageview.AreaID) ?? "";
343
344 string BorderColor = FontConfiguration.BorderColor?.GetColorCode(Pageview.AreaID) ?? "";
345 string BorderSize = FontConfiguration.BorderSize != 0 ? FontConfiguration.BorderSize.ToString() + "px" : "";
346
347 <text>
348
349 --Position: @Position;
350
351 @RenderCSSKeyAndValue("--Padding", FontConfiguration.Padding)
352
353 @RenderCSSKeyAndValue("--Top", Top)
354 @RenderCSSKeyAndValue("--Left", Left)
355 @RenderCSSKeyAndValue("--Right", Right)
356 @RenderCSSKeyAndValue("--Bottom", Bottom)
357
358 @RenderCSSKeyAndValue("--Color", Color)
359 @RenderCSSKeyAndValue("--FontSize", FontConfiguration.FontSize)
360 @RenderCSSKeyAndValue("--FontStyle", FontConfiguration.FontStyle)
361
362 @RenderCSSKeyAndValue("--FontWeight", FontConfiguration.FontWeight)
363 @RenderCSSKeyAndValue("--FontFamily", FontConfiguration.FontConfiguration.FontFamily)
364 @RenderCSSKeyAndValue("--LineHeight", FontConfiguration.LineHeight)
365
366 @RenderCSSKeyAndValue("--BackgroundColor", BackgroundColor)
367 @RenderCSSKeyAndValue("--BorderColor", BorderColor)
368 @RenderCSSKeyAndValue("--BorderSize", BorderSize)
369
370 </text>
371
372 }
373
374
375 <script>
376 window.globals = {
377 pageId: '@Pageview.ID',
378 Token: '@csrftoken',
379 DW_AREA_CULTURE: '@langName',
380 DW_AREA_CULTURE_SHORT: '@lang',
381 globalIconClass: '@buttonIconClass',
382 DW_USERID: '@Dynamicweb.Security.UserManagement.User.GetCurrentExtranetUserId()',
383 isEcomOverview: @jsIsOverviewPage,
384 DW_SHOW_PRICES_WITH_VAT: @ecomShowPricesWithVat,
385 DW_PRICES_FORMATTED: @ecomPricesFormatted
386 };
387 </script>
388
389 @BaseSettings.System.HeadScript
390
391 @{
392 var _cookieOptinLevel = Dynamicweb.Environment.CookieManager.GetCookieOptInLevel();
393 var _enabledCookieCategories = Dynamicweb.Environment.CookieManager.GetCookieOptInCategories();
394 if (_cookieOptinLevel.ToString() == "All" || _enabledCookieCategories.Contains("Marketing_Cookies"))
395 {
396 @BaseSettings.System.HeadScriptAfterConsent;
397 }
398 }
399
400 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution.Frontend;
401 @{
402
403 var reviewName = BaseSettings.Review.Review_Name != null ? BaseSettings.Review.Review_Name : "";
404 var reviewBestRating = BaseSettings.Review.Review_Best_Rating != null ? BaseSettings.Review.Review_Best_Rating : "";
405 var reviewWorstRating = BaseSettings.Review.Review_Worst_Rating != null ? BaseSettings.Review.Review_Worst_Rating : "";
406 var reviewRatingValue = BaseSettings.Review.Review_Rating_Value != null ? BaseSettings.Review.Review_Rating_Value : "";
407 var reviewCount = BaseSettings.Review.Review_Count != null ? BaseSettings.Review.Review_Count : "";
408 var reviewUrl = BaseSettings.Review.Review_URL != null ? BaseSettings.Review.Review_URL : "";
409
410 var searchPageID = Bluedesk.Tools.DynamicWeb.Generic.PageHelper.GetPageIDByNavigationTag("searchresults", Pageview.AreaID);
411 var domain = Dynamicweb.Environment.Helpers.LinkHelper.GetHttpDomain();
412 }
413
414 <script type="application/ld+json">
415 [{
416 "@@context": "https://schema.org",
417 "@@type": "Organization",
418 "name" : "@BaseSettings.CorporateSettings.CompanyName",
419 "url": "@domain",
420 "sameAs" : "@BaseSettings.SocialMedia.Facebook",
421 "logo": "@domain@BaseSettings.BrandConfiguration.Logos.Logo",
422 "contactPoint" : [{
423 "@@type" : "ContactPoint",
424 "telephone" : "@BaseSettings.CorporateSettings.Phonenumber",
425 "contactType" : "customer service" ,
426 "@@context": "https://schema.org",
427 "@@id": "@domain",
428 "name": "@BaseSettings.CorporateSettings.CompanyName"
429 }],
430 "address": {
431 "@@type": "PostalAddress",
432 "streetAddress": "@BaseSettings.CorporateSettings.Address",
433 "addressLocality": "@BaseSettings.CorporateSettings.City",
434 "postalCode": "@BaseSettings.CorporateSettings.Zipcode",
435 "addressRegion": "@BaseSettings.CorporateSettings.Region",
436 "addressCountry": "@BaseSettings.CorporateSettings.Country"
437 }
438 },
439 {
440 "@@context": "https://schema.org",
441 "@@type": "WebSite",
442 "name" : "@BaseSettings.CorporateSettings.CompanyName",
443 "alternateName" : "@BaseSettings.CorporateSettings.AltCompanyName",
444 "url": "@domain",
445 "potentialAction": {
446 "@@type": "SearchAction",
447 "target": "@domain/Default.aspx?ID=@searchPageID&q={search_term_string}",
448 "query-input": "required name=search_term_string"
449 }
450 }]
451 </script>
452
453 <script type="application/ld+json">
454 {
455 "@@context": "https://schema.org",
456 "@@type": "Product",
457 "name": "@reviewName",
458 "url":"@reviewUrl",
459 "aggregateRating": {
460 "@@type": "AggregateRating",
461 "bestRating": "@reviewBestRating",
462 "worstRating": "@reviewWorstRating",
463 "ratingValue": "@reviewRatingValue",
464 "reviewCount": "@reviewCount"
465 }
466 }
467 </script>
468
469
470 @RenderSnippet("DataLayer")
471 @RenderSnippet("GoogleMapsScript")
472
473 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution.Frontend;
474
475 @{
476
477 // TODO: Add there options to master config for product overview
478 bool hidePricesForGuests = false;
479 bool hideShoppingCartForGuests = false;
480
481 bool enableShoppingCart = hideShoppingCartForGuests && Pageview.User == null ? false : BaseSettings.Features.ConfigModuleShoppingCart;
482 bool enableLogin = BaseSettings.Features.ConfigModuleLogin;
483 bool enableQuickOrder = BaseSettings.Features.ConfigModuleQuickOrder;
484 bool enableAdvancedSearch = BaseSettings.Features.ConfigModuleAdvancedSearch;
485 bool enableCallMeBack = BaseSettings.Features.ConfigModuleCallMeBack;
486 bool enableDyslexicFont = BaseSettings.Features.ConfigModuleDyslexicFont;
487 bool enableProductCompare = BaseSettings.Features.ConfigModuleProductCompare;
488 }
489
490
491 <style>
492 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel>
493 @using Dynamicweb;
494
495 @using System.Data;
496 @using System.Data.SqlClient;
497 @using Bluedesk.Tools.DynamicWeb.DataAccess;
498
499 @using Bluedesk.DynamicWeb.ItemTypes;
500 @using Bluedesk.DynamicWeb.ItemTypes.Settings;
501 @using Bluedesk.DynamicWeb.ItemTypes.Configuration;
502 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution;
503
504 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution.Frontend;
505
506 @Title("Configuration page template")
507
508 @{
509
510 string RoundedCornersValue = BaseSettings.BrandConfiguration.RoundedCorners;
511 string ButtonHeight = BaseSettings.BrandConfiguration.ButtonHeight;
512
513 string fontawesomeFontFamily = "Font Awesome 5 Pro";
514 int fontawesomeFontWeight = 300;
515
516 switch (BaseSettings.BrandConfiguration.FontawesomeStyle)
517 {
518
519 case "fal":
520 fontawesomeFontWeight = 300;
521 break;
522 case "far":
523 fontawesomeFontWeight = 400;
524 break;
525 case "fas":
526 fontawesomeFontWeight = 900;
527 break;
528 case "fad":
529 fontawesomeFontWeight = 900;
530 fontawesomeFontFamily = "Font Awesome 5 Duotone";
531 break;
532 }
533
534 }
535
536 @BaseSettingServices.RenderButtonCSS("btn__primary", BaseSettingsButtons.PrimaryButtonConfiguration)
537 @BaseSettingServices.RenderButtonCSS("btn__secondary", BaseSettingsButtons.SecondaryButtonConfiguration)
538 @BaseSettingServices.RenderButtonCSS("btn__contrast", BaseSettingsButtons.ContrastButtonConfiguration)
539
540 :root,
541 body {
542
543 --BaseColorPrimary : @BaseSettingsBrandConfiguration.BaseColorPrimary;
544 --BaseColorSecondary : @BaseSettingsBrandConfiguration.BaseColorSecondary;
545 --BaseColorContrast : @BaseSettingsBrandConfiguration.BaseColorContrast;
546
547 --BaseFontPrimary : @BaseSettingsBrandConfiguration.PrimaryFontFamily;
548 --BaseFontSecondary : @BaseSettingsBrandConfiguration.PrimaryFontFamily;
549
550 @BaseSettings.BrandConfiguration.BodyInlineStyles
551 --StandardUnitSize : 3.2rem;
552 }
553
554 .footer {
555 --FooterContainerDisplay: none !important;
556 display: var(--FooterContainerDisplay)
557 }
558
559 h1, h2, h3, h4, h5, h6 { @BaseSettings.BrandConfiguration.HeaderInlineStyles }
560
561 h1.cta-paragraph__header { @BaseSettings.BrandConfiguration.H1InlineStyles }
562 h2.cta-paragraph__header { @BaseSettings.BrandConfiguration.H2InlineStyles }
563 h3.cta-paragraph__header { @BaseSettings.BrandConfiguration.H3InlineStyles }
564 h4.cta-paragraph__header { @BaseSettings.BrandConfiguration.H4InlineStyles }
565
566 .po-block__addtocart .btn,
567 .productdetails__add-to-cart,
568 .searchbox__input {
569 border-radius: @RoundedCornersValue;
570 }
571
572 main.blur {
573 filter: grayscale(50%) blur(15px);
574 -webkit-filter: grayscale(50%) blur(15px);
575 }
576
577 .AdvancedGridButton {
578 --BorderRadius: @RoundedCornersValue;
579 }
580
581 .btn {
582 height: var(--StandardUnitSize);
583 }
584
585 .btn__icon {
586
587 --fontawesomeFontFamily : "@fontawesomeFontFamily";
588 --fontawesomeFontWeight : @fontawesomeFontWeight;
589
590 font-family: var(--fontawesomeFontFamily);
591 font-weight: var(--fontawesomeFontWeight);
592
593 -moz-osx-font-smoothing: grayscale;
594 -webkit-font-smoothing: antialiased;
595 display: inline-block;
596 font-style: normal;
597 font-variant: normal;
598 text-rendering: auto;
599 line-height: 1;
600
601 }
602
603 .cta-paragraph {
604 background-color: var(--mainBackgroundColor);
605 }
606
607 .cta-paragraph__container {
608 background-color: var(--contentBackgroundColor);
609 border: var(--contentBorder);
610 }
611
612 .cta-paragraph__subheader,
613 .cta-paragraph__header,
614 .cta-paragraph__text p,
615 .cta-paragraph__text li {
616 color: var(--Color);
617 background-color: var(--BackgroundColor);
618 border-color: var(--BorderColor);
619 position: var(--Position);
620 top: var(--Top);
621 left: var(--Left);
622 right: var(--Right);
623 bottom: var(--Bottom);
624 padding: var(--Padding);
625 border: var(--BorderSize);
626 font-size: var(--FontSize);
627 text-transform: var(--FontStyle);
628 line-height: var(--LineHeight);
629 font-weight: var(--FontWeight);
630 font-family: var(--FontFamily);
631 border-radius: var(--BorderRadius);
632 }
633
634 .cta-paragraph__content-container {
635 align-items: var(--ContentElementAlignmentAlignItems);
636 text-align: var(--ContentElementAlignmentTextAlign);
637 }
638
639 .cta-paragraph__btn-navigation,
640 .cta-paragraph__content-container {
641 align-items : var(--ContainerFitContentAlignmentAlignItems);
642 justify-content: var(--ContainerFitContentAlignmentJustifyContent);
643 }
644
645 .jumbotron__subheader,
646 .jumbotron__header,
647 .jumbotron__shoutbox-intro p,
648 .jumbotron__shoutbox-intro li,
649 .header--desktop.headerNew {
650 position: relative;
651 }
652
653 .header--desktop.headerNew.stickyheader {
654 position: fixed;
655 }
656
657 @@media screen and (min-width: 992px){
658 .image-left {
659 justify-content: flex-end;
660 flex-direction: row;
661 }
662
663 .image-right {
664 justify-content: flex-start;
665 flex-direction: row-reverse;
666 }
667 }
668
669 .AdvancedGrid__row {
670 background-color: var(--BackgroundColor);
671 }
672
673 .cta-paragraph__btn-navigation {
674 padding: 1.2rem 0rem !important;
675 }
676
677 .AdvancedGrid,
678 .AdvancedGrid__container {
679 width: 100%;
680 background-image: var(--BackgroundImage);
681 min-height: var(--Height);
682 }
683
684 @{
685
686 int PageViewId = Pageview.Page.ID;
687 int AreaId = Pageview.AreaID;
688
689 // HttpContext.Current.Session["PageIdForStyles"] = Pageview.Page.ID;
690 // HttpContext.Current.Session["AreaIdForStyles"] = Pageview.AreaID;
691
692 DataTable AdvancedGridStylesDataTable = null;
693
694 AdvancedGridStylesDataTable = DynamicwebData.Query($@"
695
696 SELECT
697 InlineStyles AS Styles
698
699 FROM
700 [dbo].[ItemType_AdvancedGridConfiguration] AS AGC
701 LEFT JOIN [dbo].[GridRow] AS GR ON GR.GridRowItemId = AGC.Id
702
703 WHERE
704 GR.GridRowPageId = @PageId;
705
706 ", new SqlParameter("PageId", PageViewId));
707
708 DataTable BackgroundConfigDataTable = null;
709
710 BackgroundConfigDataTable = DynamicwebData.Query($@"
711
712 SELECT
713 distinct(BG.Stylesheet) AS Styles
714
715 FROM [dbo].GridRow AS GR
716 INNER JOIN dbo.Paragraph AS PG ON PG.ParagraphGridRowId = GR.GridRowId
717 LEFT JOIN dbo.ItemType_CTAParagraph AS CTA ON CTA.Id = PG.ParagraphItemId
718 LEFT JOIN dbo.ItemType_MultiColumnParagraph AS MCP ON MCP.Id = PG.ParagraphItemId
719 LEFT JOIN dbo.ItemType_Carousel AS CS ON CS.Id = PG.ParagraphItemId
720 LEFT JOIN dbo.ItemType_BackgroundConfiguration AS BG ON CTA.BackgroundConfigurationID = BG.Id
721 OR MCP.BackgroundConfigurationID = BG.Id
722 OR CS.BackgroundConfigurationID = BG.Id
723
724 WHERE GR.GridRowPageID=@PageId
725 AND bg.Stylesheet Is NOT NULL", new SqlParameter("PageId", PageViewId));
726
727 DataTable ButtonConfigDataTable = null;
728
729 ButtonConfigDataTable = DynamicwebData.Query($@"
730
731 SELECT
732 distinct(BCONF.Stylesheet) AS Styles
733
734 FROM [dbo].GridRow AS GR
735 LEFT JOIN [dbo].Paragraph AS P ON P.ParagraphGridRowId = GR.GridRowId
736 LEFT JOIN [dbo].ItemType_CTAParagraph AS CTAP ON CTAP.Id = P.ParagraphItemId
737
738 LEFT JOIN [dbo].ItemType_MultiColumnParagraph AS MCP ON MCP.Id = P.ParagraphItemId
739 LEFT JOIN [dbo].[ItemList] AS ColumnIL ON ColumnIL.ItemListId = MCP.ParagraphListID
740 LEFT JOIN [dbo].[ItemListRelation] AS ColumnILR ON ColumnIL.ItemListId = ColumnILR.ItemListRelationItemListId
741 LEFT JOIN [dbo].[ItemType_ParagraphColumn] AS PC ON PC.Id = ColumnILR.ItemListRelationItemId
742
743 LEFT JOIN [dbo].ItemType_Carousel AS CS ON CS.Id = P.ParagraphItemId
744 LEFT JOIN [dbo].[ItemList] AS CIIL ON CIIL.ItemListId = CS.CarouselListID
745 LEFT JOIN [dbo].[ItemListRelation] AS CIILR ON CIIL.ItemListId = CIILR.ItemListRelationItemListId
746 LEFT JOIN [dbo].ItemType_CarouselItem AS CI ON CI.Id = CIILR.ItemListRelationItemId
747
748 LEFT JOIN [dbo].[ItemType_JumbotronContainer] AS JC ON JC.Id = P.ParagraphItemId
749 LEFT JOIN [dbo].[ItemList] AS JCIL ON JCIL.ItemListId = JC.JumbotronListID
750 LEFT JOIN [dbo].[ItemListRelation] AS JCILR ON JCIL.ItemListId = JCILR.ItemListRelationItemListId
751 LEFT JOIN [dbo].ItemType_JumbotronListItem AS JCLI ON JCLI.Id = JCILR.ItemListRelationItemId
752
753 LEFT JOIN [dbo].[ItemType_CTAButton] AS CTAB ON
754 CTAP.ButtonID = CTAB.Id
755 OR CTAP.ExtraButtonID = CTAB.Id
756 OR MCP.ButtonID = CTAB.Id
757 OR PC.ButtonID = CTAB.Id
758 OR PC.ExtraButtonID = CTAB.Id
759 OR CS.ButtonID = CTAB.Id
760 OR CI.ButtonID = CTAB.Id
761 OR CI.ExtraButtonID = CTAB.Id
762 OR JCLI.ButtonID = CTAB.Id
763 LEFT JOIN [dbo].[ItemType_ButtonConfiguration] AS BCONF ON CTAB.ButtonConfigurationID = BCONF.Id
764
765 WHERE
766 GR.GridRowPageID = @PageId
767 AND GR.GridRowActive = 1
768 AND CTAB.ButtonConfigurationID Is NOT NULL", new SqlParameter("PageId", PageViewId));
769
770 DataTable MasterConfigDataTable = null;
771
772 MasterConfigDataTable = DynamicwebData.Query($@"
773
774 SELECT
775 MC.CustomCSS
776
777 FROM
778 [dbo].[Page] AS P
779 INNER JOIN [dbo].[ItemType_MasterConfig] AS MC ON P.PageItemId = MC.Id
780
781 WHERE
782 p.PageItemType = 'MasterConfig'
783 AND PageAreaId = @AreaId;", new SqlParameter("AreaId", AreaId));
784
785 if (AdvancedGridStylesDataTable != null && AdvancedGridStylesDataTable.Rows.Count > 0)
786 {
787 for (int i = 0; i < AdvancedGridStylesDataTable.Rows.Count; i++)
788 {
789 @AdvancedGridStylesDataTable.Rows[i]["Styles"].ToString();
790 }
791 }
792
793 if (BackgroundConfigDataTable != null && BackgroundConfigDataTable.Rows.Count > 0)
794 {
795 for (int i = 0; i < BackgroundConfigDataTable.Rows.Count; i++)
796 {
797 @BackgroundConfigDataTable.Rows[i]["Styles"].ToString();
798 }
799 }
800
801 if (ButtonConfigDataTable != null && ButtonConfigDataTable.Rows.Count > 0)
802 {
803 for (int i = 0; i < ButtonConfigDataTable.Rows.Count; i++)
804 {
805 @ButtonConfigDataTable.Rows[i]["Styles"].ToString();
806 }
807 }
808
809 @MasterConfigDataTable.Rows[0]["CustomCSS"].ToString();
810 }
811
812 </style>
813
814 </head>
815 <body class="@MasterConfigCssClass">
816
817 @BaseSettings.System.BodyScript
818 @{
819 if (_cookieOptinLevel.ToString() == "All" || _enabledCookieCategories.Contains("Marketing_Cookies"))
820 {
821 @BaseSettings.System.BodyScriptAfterConsent;
822 }
823 }
824
825 @BaseSettings.System.TailScript
826
827 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel>
828
829 @using System.Linq;
830 @using System.Data;
831
832 @using Dynamicweb;
833 @using Dynamicweb.Content;
834 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution.Frontend;
835
836 @{
837
838 DataTable DataTableObj = AdvancedGridServices.GetHeaderGridDataTable(Pageview.AreaID, Pageview.Page.ID);
839
840 WrapperObj Header = AdvancedGridServices.RenderWrapper(DataTableObj, "header", "header", Pageview.AreaID, Pageview.Page.ID);
841 WrapperObj Footer = AdvancedGridServices.RenderWrapper(DataTableObj, "footer", "footer", Pageview.AreaID, Pageview.Page.ID);
842
843 // var homepage = Dynamicweb.Services.Pages.GetRootPagesForArea(Pageview.AreaID).FirstOrDefault(p => p.ItemType == "HomePage" && p.Active) ?? Dynamicweb.Services.Pages.GetFirstPageForArea(Pageview.AreaID);
844
845 MasterLayoutPageObj MasterLayoutPageObj = MasterLayoutControllers.RenderMasterLayoutPageObj(Pageview);
846
847 bool userLoggedIn = false;
848 if (enableLogin) { userLoggedIn = Pageview.User == null ? false : true; }
849
850 string HeaderContainerSize = mc.HeaderConfiguration.ContainerSize != 0 ? mc.HeaderConfiguration.ContainerSize + "px" : "auto";
851
852 }
853
854 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel>
855 @using Dynamicweb;
856 @using Dynamicweb.Content.Items;
857
858 <script>
859
860 function setImagesSizes(Classname) {
861 var Images = document.querySelectorAll(Classname);
862 for (var index = 0; index < Images.length; index++) {
863 if (!Images[index].hasAttribute("height")) {
864 Images[index].setAttribute("height", Images[index].offsetHeight);
865 }
866 if (!Images[index].hasAttribute("width")) {
867 Images[index].setAttribute("width", Images[index].offsetWidth);
868 }
869 }
870 }
871
872 window.addEventListener('load', function () {
873 setImagesSizes("img");
874 setImagesSizes(".mc-header__logo-image");
875 });
876
877 </script>
878
879
880 @if (!hideHeader)
881 {
882 <header>@MasterLayoutPageObj.Header</header>
883
884 <!-- DO NOT REMOVE -->
885 <div id="quick-order"></div>
886 <div id="backdrop-megamenu"></div>
887 <mega-menu id="mega-menu"></mega-menu>
888 <!-- DO NOT REMOVE -->
889 }
890
891 @if (isVisualEditor && IsNotContentManager)
892 {
893 @AdvancedGridServices.RenderVisualEditorNavigation(DataTableObj, "header")
894 }
895
896 <style>@MasterLayoutPageObj.CSS</style>
897
898 <style>
899
900
901 .visual-editor__navigation {
902 position: absolute;
903 top: 10px;
904 left: 10px;
905 display: flex;
906 flex-direction: row;
907 z-index: 100000000;
908 }
909
910 .visual-editor__button {
911 height: 50px;
912 min-width: 150px;
913 right: auto;
914 left: auto;
915 background-color: white;
916 box-shadow: -10px 10px 10px rgb(28 28 84 / 25%);
917 display: flex;
918 justify-content: center;
919 align-items: center;
920 padding: 25px;
921 margin-right: 25px;
922 }
923
924 .visual-editor__button-icon {
925 margin-right: 25px;
926 }
927
928 .header {
929 --HeaderContainerDisplay: none;
930 }
931
932 .header__container {
933 padding: 0;
934 }
935
936 .header__container, .header__stickyheader-container {
937 max-width: none;
938 }
939
940 .header .AdvancedGrid__container {
941 max-width: @HeaderContainerSize;
942 margin: 0 auto;
943 }
944
945 .header .AdvancedGrid__column {
946 background-color: var(--BackgroundColor);
947 flex-grow: var(--FlexGrow);
948 }
949
950 .AdvancedGrid__row {
951 align-items: center;
952 }
953 </style>
954
955 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>>
956 @using Dynamicweb;
957 @using Bluedesk.DynamicWeb.ItemTypes;
958
959 @{
960 var pid = ModuleOnlyParagraph.GetParagraphIDByTag<ModuleOnlyParagraph>("SideBarForm", Pageview.AreaID);
961
962 if (pid > 0)
963 {
964 <section id="vue-side-bar-form" data-paragraphid="@pid" data-telephone="@phonenumber" data-formatphonenumber="@formattedPhonenumber" data-isoffline="@isOffline"></section>
965 }
966 }
967
968
969 @if (@enableProductCompare)
970 {
971 <div id="vue-compare-list"></div>
972 }
973
974 @Model.Grid("grid", "Before breadcrumb", "", "AdvancedGrid")
975
976 @if (showBreadcrumbs && !isOverviewPage)
977 {
978 var navigationSettings = new NavigationSettings();
979 navigationSettings.ExpandMode = ExpandMode.PathOnly;
980 navigationSettings.StartLevel = 1;
981 navigationSettings.StopLevel = 99;
982 navigationSettings.Parameters.Add("PageTitle", Model.Title);
983 navigationSettings.IncludeFoldersAndHidden = true;
984
985 @Navigation.RenderNavigation("Navigation/Breadcrumbs.cshtml", navigationSettings)
986
987 }
988
989 @Model.Grid("grid2", "After breadcrumb", "", "AdvancedGrid")
990
991 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel>
992 @using Dynamicweb;
993 @using Bluedesk.DynamicWeb.ItemTypes;
994 @using Bluedesk.DynamicWeb.ItemTypes.Extensions;
995 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution.Frontend;
996
997 @{
998
999 string footerLogo = BaseSettings.BrandConfiguration.Logos.FooterLogo;
1000 string footerDescription = BaseSettings.CorporateSettings.FooterDescription;
1001
1002 var fb = BaseSettings.SocialMedia.Facebook;
1003 var twitter = BaseSettings.SocialMedia.Twitter;
1004 var linkedin = BaseSettings.SocialMedia.LinkedIn;
1005 var instagram = BaseSettings.SocialMedia.Instagram;
1006 var youtube = BaseSettings.SocialMedia.Youtube;
1007 var pinterest = BaseSettings.SocialMedia.Pinterest ?? "";
1008
1009 var companyName = BaseSettings.CorporateSettings.CompanyName;
1010 var Emailadress = BaseSettings.CorporateSettings.Emailadress;
1011 var Phonenumber = BaseSettings.CorporateSettings.Phonenumber;
1012 var Address = BaseSettings.CorporateSettings.Address;
1013 var Zipcode = BaseSettings.CorporateSettings.Zipcode;
1014 var City = BaseSettings.CorporateSettings.City;
1015 var Country = BaseSettings.CorporateSettings.Country;
1016
1017 var selectedPaymentLogos = BaseSettings.BrandConfiguration.Logos.FooterPaymentLogos;
1018
1019 bool footer__newsletter_signup_display = !string.IsNullOrWhiteSpace(mc.FooterConfiguration.NewsLetterSignUpDisplay.ToString()) && mc.FooterConfiguration.NewsLetterSignUpDisplay.ToString() == "True" ? true : false;
1020 bool footer__USP_display = !string.IsNullOrWhiteSpace(mc.FooterConfiguration.UspDisplay.ToString()) && mc.FooterConfiguration.UspDisplay.ToString() == "True" ? true : false;
1021
1022 string footer__background_color = mc.FooterConfiguration.BackgroundColor?.GetColorCode(Pageview.AreaID) ?? "#000000";
1023 string footer__color = mc.FooterConfiguration.Color?.GetColorCode(Pageview.AreaID) ?? "#FFFFFF";
1024
1025 string footer__top_image = !string.IsNullOrWhiteSpace(mc.FooterConfiguration.TopImage.ToString()) ? mc.FooterConfiguration.TopImage.ToString() : "";
1026
1027
1028
1029 }
1030
1031 <div id="scroll-to-top" class="scroll-to-top" aria-label="@Translate("Naar boven", "To Top")">
1032 <span class="scroll-to-top__text">
1033 @Translate("Naar boven", "To Top")
1034 </span>
1035 <i class="fal fa-arrow-to-top scroll-to-top__icon"></i>
1036 </div>
1037
1038 @if (Pageview.Page.ParentPageId > 0)
1039 {
1040 var siblings = Dynamicweb.Services.Pages.GetPagesByParentID(Pageview.Page.ParentPageId).Where(p => p.Active).ToList();
1041 var parentpageItemType = Pageview.Page.Parent.ItemType;
1042 bool isParentPageOverviewpage = parentpageItemType == "OverviewPage";
1043
1044 if (siblings.Count() > 1 && isParentPageOverviewpage)
1045 {
1046 var prevPage = siblings.OrderByDescending(p => p.Sort).FirstOrDefault(p => p.Sort < Pageview.Page.Sort);
1047 var nextPage = siblings.OrderBy(p => p.Sort).FirstOrDefault(p => p.Sort > Pageview.Page.Sort);
1048 var overview = "/Default.aspx?ID=" + Pageview.Page.ParentPageId;
1049
1050 <section class="page-navigation">
1051 @if (prevPage != null)
1052 {
1053 var back = "/Default.aspx?ID=" + prevPage.ID;
1054 <a href="@back" class="page-navigation__item">
1055 <i class="fal fa-arrow-alt-to-left page-navigation__item--icon"></i>
1056 <label class="page-navigation__item-label">@Translate("pagenavigation.previous", "Previous")</label>
1057 </a>
1058 }
1059
1060 <a href="@overview" class="page-navigation__item">
1061 <label class="page-navigation__item-label">@Translate("pagenavigation.Overview", "To overview")</label>
1062 <i class="fas fa-th page-navigation__item--icon"></i>
1063 </a>
1064
1065 @if (nextPage != null)
1066 {
1067 var forward = "/Default.aspx?ID=" + nextPage.ID;
1068 <a href="@forward" class="page-navigation__item">
1069 <label class="page-navigation__item-label">@Translate("pagenavigation.next", "Next")</label>
1070 <i class="fal fa-arrow-alt-to-right page-navigation__item--icon"></i>
1071 </a>
1072 }
1073 </section>
1074 }
1075 }
1076
1077 @*
1078
1079 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel>
1080 @using Dynamicweb;
1081 @using Bluedesk.Tools.DynamicWeb.ExtensionMethods;
1082 @using Bluedesk.DynamicWeb.ItemTypes;
1083
1084 @{
1085
1086 if (Pageview.Page.ParentPageId > 0)
1087 {
1088
1089 // Paging
1090
1091 var siblings = Dynamicweb.Services.Pages.GetPagesByParentID(Pageview.Page.ParentPageId).Where(p => p.Active).ToList();
1092 var currentID = Pageview.Page.ID;
1093 var parentpageItemType = Pageview.Page.Parent.ItemType;
1094 bool isParentPageOverviewpage = parentpageItemType == "OverviewPage";
1095
1096
1097 var siblingsCount = siblings.Count;
1098
1099 int previousIdx = 0;
1100 int nextIdx = siblingsCount - 1;
1101 int idx = 0;
1102
1103 for (int i = 0; i < siblingsCount; i++)
1104 {
1105 if (siblings[i].ID == currentID && siblings[i].PropertyItem != null)
1106 {
1107 idx = i;
1108 }
1109 }
1110
1111 previousIdx = idx == previousIdx ? previousIdx : idx - 1;
1112 nextIdx = idx == nextIdx ? nextIdx : idx + 1;
1113
1114 var previousID = siblings[previousIdx].ID;
1115 var nextID = siblings[nextIdx].ID;
1116 var overview = "/Default.aspx?ID=" + Pageview.Page.ParentPageId;
1117
1118 if (siblingsCount > 1)
1119 {
1120
1121 <section class="page-navigation">
1122
1123 @if (!(previousID == currentID || previousID == 0))
1124 {
1125 var back = "/Default.aspx?ID=" + previousID;
1126 <a href="@back" class="page-navigation__item">
1127 <i class="fal fa-arrow-alt-to-left page-navigation__item--icon"></i>
1128 <label class="page-navigation__item-label">@Translate("pagenavigation.previous", "Previous")</label>
1129 </a>
1130 }
1131
1132 <a href="@overview" class="page-navigation__item">
1133 <label class="page-navigation__item-label">@Translate("pagenavigation.Overview", "To overview")</label>
1134 <i class="fas fa-th page-navigation__item--icon"></i>
1135 </a>
1136
1137 @if (!(nextID == currentID || nextID == 0))
1138 {
1139 var forward = "/Default.aspx?ID=" + nextID;
1140 <a href="@forward" class="page-navigation__item">
1141 <label class="page-navigation__item-label">@Translate("pagenavigation.next", "Next")</label>
1142 <i class="fal fa-arrow-alt-to-right page-navigation__item--icon"></i>
1143 </a>
1144 }
1145
1146 </section>
1147
1148 }
1149
1150 }
1151 else
1152 {
1153 // No action
1154 }
1155
1156 }
1157
1158 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>>
1159 @using Dynamicweb;
1160
1161 @if (Pageview.Page.ParentPageId > 0)
1162 {
1163 var siblings = Dynamicweb.Services.Pages.GetPagesByParentID(Pageview.Page.ParentPageId).Where(p => p.Active).ToList();
1164 var parentpageItemType = Pageview.Page.Parent.ItemType;
1165 bool isParentPageOverviewpage = parentpageItemType == "OverviewPage";
1166
1167 if (siblings.Count() > 1 && isParentPageOverviewpage)
1168 {
1169 var prevPage = siblings.OrderByDescending(p => p.Sort).FirstOrDefault(p => p.Sort < Pageview.Page.Sort);
1170 var nextPage = siblings.OrderBy(p => p.Sort).FirstOrDefault(p => p.Sort > Pageview.Page.Sort);
1171 var overview = "/Default.aspx?ID=" + Pageview.Page.ParentPageId;
1172
1173 <section class="page-navigation">
1174 @if (prevPage != null)
1175 {
1176 var back = "/Default.aspx?ID=" + prevPage.ID;
1177 <a href="@back" class="page-navigation__item">
1178 <i class="fal fa-arrow-alt-to-left page-navigation__item--icon"></i>
1179 <label class="page-navigation__item-label">@Translate("pagenavigation.previous", "Previous")</label>
1180 </a>
1181 }
1182
1183 <a href="@overview" class="page-navigation__item">
1184 <label class="page-navigation__item-label">@Translate("pagenavigation.Overview", "To overview")</label>
1185 <i class="fas fa-th page-navigation__item--icon"></i>
1186 </a>
1187
1188 @if (nextPage != null)
1189 {
1190 var forward = "/Default.aspx?ID=" + nextPage.ID;
1191 <a href="@forward" class="page-navigation__item">
1192 <label class="page-navigation__item-label">@Translate("pagenavigation.next", "Next")</label>
1193 <i class="fal fa-arrow-alt-to-right page-navigation__item--icon"></i>
1194 </a>
1195 }
1196 </section>
1197 }
1198 }
1199
1200 *@
1201
1202
1203
1204 @if (!hideFooter)
1205 {
1206 <footer>@MasterLayoutPageObj.Footer</footer>
1207 }
1208
1209 @if (isVisualEditor && IsNotContentManager)
1210 {
1211 <nav class="footer-layout">
1212 @AdvancedGridServices.RenderVisualEditorNavigation(DataTableObj, "footer")
1213 </nav>
1214
1215 <style>
1216 .footer-layout {
1217 position: absolute;
1218 bottom: 25px;
1219 }
1220 </style>
1221 }
1222
1223 @if (!string.IsNullOrWhiteSpace(footer__top_image) && HideStandardFooter == false)
1224 {
1225 <figure class="footer__top-image">
1226 <img src="@footer__top_image" alt="" />
1227 </figure>
1228 }
1229
1230 @if (HideStandardFooter == false || !hideFooter)
1231 {
1232
1233 <footer class="footer" style="--footer-bg-color: @footer__background_color; --footer-color: @footer__color;">
1234
1235 @if (footer__USP_display)
1236 {
1237 if (!string.IsNullOrWhiteSpace(BaseSettings.USP.USP_1) || !string.IsNullOrWhiteSpace(BaseSettings.USP.USP_2) || !string.IsNullOrWhiteSpace(BaseSettings.USP.USP_3) || !string.IsNullOrWhiteSpace(BaseSettings.USP.USP_4) || !string.IsNullOrWhiteSpace(BaseSettings.USP.USP_5))
1238 {
1239 <div class="footer-usp__wrapper">
1240 <div class="container">
1241 <ul class="footer-usp__list flex-wrap">
1242 @RenderFooterUSP(BaseSettings.USP.USP_1, BaseSettings.USP.USP_1_icon)
1243 @RenderFooterUSP(BaseSettings.USP.USP_2, BaseSettings.USP.USP_2_icon)
1244 @RenderFooterUSP(BaseSettings.USP.USP_3, BaseSettings.USP.USP_3_icon)
1245 @RenderFooterUSP(BaseSettings.USP.USP_4, BaseSettings.USP.USP_4_icon)
1246 @RenderFooterUSP(BaseSettings.USP.USP_5, BaseSettings.USP.USP_5_icon)
1247
1248 </ul>
1249 </div>
1250 </div>
1251 }
1252 }
1253
1254 @if (footer__newsletter_signup_display)
1255 {
1256 <div>
1257 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel>
1258 @using Dynamicweb;
1259
1260 @{
1261 var newsletterFormID = ModuleOnlyParagraph.GetParagraphIDByTag<ModuleOnlyParagraph>("Footer.Newsletter", Pageview.AreaID);
1262
1263 if (newsletterFormID > 0)
1264 {
1265 <section class="footer__newsletter-container">
1266 <div class="container footer__newsletter">
1267 <label class="footer__newsletter-label">
1268 @Translate("Footer.SignUpNewsletter", "Sign up for the digital newsletter")
1269 </label>
1270 @RenderParagraphContent(newsletterFormID)
1271 </div>
1272 </section>
1273 }
1274 }
1275
1276 </div>
1277 }
1278
1279 @if (!string.IsNullOrWhiteSpace(mc.FooterConfiguration.BackgroundGradient))
1280 {
1281 <style>
1282 .footer {
1283 @mc.FooterConfiguration.BackgroundGradient;
1284 }
1285 </style>
1286 }
1287
1288 <section class="container footer__content">
1289
1290 <div class="footer__link">
1291 @{
1292 var footerColumnOneNavigationSettings = new NavigationSettings();
1293 footerColumnOneNavigationSettings.ExpandMode = ExpandMode.All;
1294 footerColumnOneNavigationSettings.StartLevel = 1;
1295 footerColumnOneNavigationSettings.StopLevel = 4;
1296 footerColumnOneNavigationSettings.RootNavigationTag = "footer-column-1";
1297 var footerColumnOneNavigation = Navigation.RenderNavigation("Navigation/BottomNavigation.cshtml", footerColumnOneNavigationSettings);
1298
1299 if (!string.IsNullOrEmpty(footerColumnOneNavigation))
1300 {
1301 <p class="footer__link-header">@Translate("Footer.Column1.Header", "What you need to know")</p>
1302 @footerColumnOneNavigation
1303 }
1304 }
1305 </div>
1306 <div class="footer__link">
1307 @{
1308 var footerColumnTwoNavigationSettings = new NavigationSettings();
1309 footerColumnTwoNavigationSettings.ExpandMode = ExpandMode.All;
1310 footerColumnTwoNavigationSettings.StartLevel = 1;
1311 footerColumnTwoNavigationSettings.StopLevel = 4;
1312 footerColumnTwoNavigationSettings.RootNavigationTag = "footer-column-2";
1313 var footerColumnTwoNavigation = Navigation.RenderNavigation("Navigation/BottomNavigation.cshtml", footerColumnTwoNavigationSettings);
1314
1315 if (!string.IsNullOrEmpty(footerColumnTwoNavigation))
1316 {
1317 <p class="footer__link-header">@Translate("Footer.Column2.Header", "Category two")</p>
1318 @footerColumnTwoNavigation
1319 }
1320 }
1321 </div>
1322 <div class="footer__link">
1323 @{
1324 var footerColumnThreeNavigationSettings = new NavigationSettings();
1325 footerColumnThreeNavigationSettings.ExpandMode = ExpandMode.All;
1326 footerColumnThreeNavigationSettings.StartLevel = 1;
1327 footerColumnThreeNavigationSettings.StopLevel = 4;
1328 footerColumnThreeNavigationSettings.RootNavigationTag = "footer-column-3";
1329 var footerColumnThreeNavigation = Navigation.RenderNavigation("Navigation/BottomNavigation.cshtml", footerColumnThreeNavigationSettings);
1330
1331 if (!string.IsNullOrEmpty(footerColumnThreeNavigation))
1332 {
1333 <p class="footer__link-header">@Translate("Footer.Column3.Header", "Category three")</p>
1334 @footerColumnThreeNavigation
1335 }
1336 }
1337 </div>
1338
1339 @if (!string.IsNullOrWhiteSpace(footerLogo) || !string.IsNullOrWhiteSpace(footerDescription))
1340 {
1341 <div class="footer__description-container">
1342 @if (!string.IsNullOrWhiteSpace(footerLogo))
1343 {
1344 <img class="footer__logo" loading="lazy" src="/Admin/Public/GetImage.ashx?Image=@footerLogo&Crop=5&Format=webp&Quality=99&Compression=80&Width=400" alt="Footer logo" width="400" height="200" />
1345 }
1346
1347 @if (!string.IsNullOrWhiteSpace(footerDescription))
1348 {
1349 <div class="footer__description">
1350 @footerDescription
1351 </div>
1352 }
1353 </div>
1354 }
1355
1356 </section>
1357
1358 <section class="footer__copyright">
1359
1360 <div class="container bottombar__container">
1361 @{
1362 var copyRightMenuNavigationSettings = new NavigationSettings();
1363 copyRightMenuNavigationSettings.ExpandMode = ExpandMode.All;
1364 copyRightMenuNavigationSettings.StartLevel = 1;
1365 copyRightMenuNavigationSettings.StopLevel = 4;
1366 copyRightMenuNavigationSettings.RootNavigationTag = "bottombar";
1367 var copyRightMenuNavigation = Navigation.RenderNavigation("Navigation/CleanNavigation.cshtml", copyRightMenuNavigationSettings);
1368
1369 if (!string.IsNullOrEmpty(copyRightMenuNavigation))
1370 {
1371 @copyRightMenuNavigation;
1372 }
1373 }
1374
1375 @if (!string.IsNullOrWhiteSpace(twitter) || !string.IsNullOrWhiteSpace(fb) || !string.IsNullOrWhiteSpace(linkedin) || !string.IsNullOrWhiteSpace(youtube) || !string.IsNullOrWhiteSpace(instagram) || !string.IsNullOrWhiteSpace(pinterest))
1376 {
1377 <section class="footer__social-container">
1378
1379 <span class="footer__icon-labels">@Translate("Footer.FollowUs", "Volg ons op:")</span>
1380
1381 <div class="footer__social-icon-container">
1382 @if (!string.IsNullOrWhiteSpace(twitter))
1383 {
1384 <a href="@twitter" target="_blank" title="twitter" class="footer__social" rel="noreferrer"><i class="fab fa-twitter"></i></a>
1385 }
1386 @if (!string.IsNullOrWhiteSpace(fb))
1387 {
1388 <a href="@fb" target="_blank" title="facebook" class="footer__social" rel="noreferrer"><i class="fab fa-facebook-square"></i></a>
1389 }
1390 @if (!string.IsNullOrWhiteSpace(linkedin))
1391 {
1392 <a href="@linkedin" target="_blank" title="LinkedIn" class="footer__social" rel="noreferrer"><i class="fab fa-linkedin"></i></a>
1393 }
1394 @if (!string.IsNullOrWhiteSpace(youtube))
1395 {
1396 <a href="@youtube" target="_blank" title="YouTube" class="footer__social" rel="noreferrer"><i class="fab fa-youtube"></i></a>
1397 }
1398 @if (!string.IsNullOrWhiteSpace(instagram))
1399 {
1400 <a href="@instagram" target="_blank" title="Instagram" class="footer__social" rel="noreferrer"><i class="fab fa-instagram"></i></a>
1401 }
1402 @if (!string.IsNullOrWhiteSpace(pinterest))
1403 {
1404 <a href="@pinterest" target="_blank" title="Pinterest" class="footer__social" rel="noreferrer"><i class="fab fa-pinterest"></i></a>
1405 }
1406 </div>
1407
1408 </section>
1409 }
1410 </div>
1411
1412 </section>
1413
1414 <section class="footer-paymentoptions" data-paymentmethods="@selectedPaymentLogos"></section>
1415 </footer>
1416
1417 }
1418
1419 @helper RenderFooterUSP(string USP_content, string USP_icon)
1420 {
1421 if (!string.IsNullOrWhiteSpace(USP_content))
1422 {
1423 var usp_icon_class = (!string.IsNullOrWhiteSpace(USP_icon)) ? USP_icon : "fal fa-check";
1424
1425 <li class="footer-usp__item">
1426 <i class="@usp_icon_class footer-usp__icon"></i>
1427 <span>@USP_content</span>
1428 </li>
1429 }
1430 }
1431
1432 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel>
1433 @using Dynamicweb;
1434 @using Dynamicweb.Content.Items;
1435 @using Bluedesk.DynamicWeb.ItemTypes;
1436
1437 @{
1438 var colorService = new ColorSwatchService();
1439 bool displayPrices = mc.EcomConfiguration.HidePricesForGuests ? Pageview.User != null : true;
1440 string ShowZeroPrices = (!mc.EcomConfiguration.HideZeroPrices).ToString().ToLower();
1441
1442 var homepage = Dynamicweb.Services.Pages.GetRootPagesForArea(Pageview.AreaID).FirstOrDefault(p => p.ItemType == "HomePage" && p.Active) ?? Dynamicweb.Services.Pages.GetFirstPageForArea(Pageview.AreaID);
1443
1444 var bottomBarItemsList = new List<object>();
1445 foreach (var _item in mc.FooterConfiguration.BottombarItemList)
1446 {
1447 string title = _item.Title;
1448 string link = _item.TargetLink;
1449
1450 if (_item.Type == "login" && Pageview.User != null)
1451 {
1452 title = @Translate("Bottombar.Logout", "Logout");
1453 link = $"/Admin/Public/ExtranetLogoff.aspx?ID={homepage.ID}";
1454 }
1455
1456 var newItem = new
1457 {
1458 title = title,
1459 icon = _item.Icon,
1460 link = link,
1461 subtitle = _item.Title,
1462 type = _item.Type,
1463 visible = true
1464 };
1465 bottomBarItemsList.Add(newItem);
1466 }
1467 var allBottomBarItems = bottomBarItemsList.ToArray();
1468 string bottomBarItemsJson = Newtonsoft.Json.JsonConvert.SerializeObject(allBottomBarItems).Replace("\"", "\'");
1469
1470 string BottombarBackgroundColor = mc.FooterConfiguration.BottombarBackgroundColor;
1471 if (!string.IsNullOrWhiteSpace(BottombarBackgroundColor))
1472 {
1473 BottombarBackgroundColor = !BottombarBackgroundColor.Contains("#") ? colorService.GetHexColor(Pageview.AreaID, BottombarBackgroundColor) : BottombarBackgroundColor;
1474 }
1475
1476 string BottombarTextColor = mc.FooterConfiguration.BottombarTextColor;
1477 if (!string.IsNullOrWhiteSpace(BottombarTextColor))
1478 {
1479 BottombarTextColor = !BottombarTextColor.Contains("#") ? colorService.GetHexColor(Pageview.AreaID, BottombarTextColor) : BottombarTextColor;
1480 }
1481
1482 string BottombarIconColor = mc.FooterConfiguration.BottombarIconColor;
1483 if (!string.IsNullOrWhiteSpace(BottombarIconColor))
1484 {
1485 BottombarIconColor = !BottombarIconColor.Contains("#") ? colorService.GetHexColor(Pageview.AreaID, BottombarIconColor) : BottombarIconColor;
1486 }
1487 }
1488
1489 <style>
1490 .bottombar {
1491 background-color: @BottombarBackgroundColor;
1492 }
1493 .bottombar__button span {
1494 color: @BottombarTextColor;
1495 }
1496 .bottombar__button [class^=fa],
1497 .bottombar__button [class^=svg-] {
1498 color: @BottombarIconColor;
1499 }
1500 </style>
1501
1502 <section id="vue-modal"
1503 data-show-prices="@displayPrices.ToString().ToLower()"
1504 data-show-zero-prices="@ShowZeroPrices">
1505 </section>
1506
1507 @if (!hideBottombar)
1508 {
1509 <section id="vue-bottom-bar"
1510 data-items="@bottomBarItemsJson"
1511 data-phonenumber="@formattedPhonenumber"
1512 data-isoffline="@isOffline"
1513 data-emailadress="@emailadress"
1514 data-currentpageid="@homepage.ID"
1515 data-enable-login="@enableLogin"
1516 data-enable-shoppingcart="@enableShoppingCart"
1517 data-enable-advancedsearch="@enableAdvancedSearch">
1518 </section>
1519 }
1520
1521 @{
1522 int SearchPageID = Bluedesk.Tools.DynamicWeb.Generic.PageHelper.GetPageIDByNavigationTag("searchresults", Pageview.AreaID);
1523 var SearchPlaceholder = Translate("Searchbox.PlaceholderValue", "Search...");
1524 var SearchPlaceholderHover = Translate("Search.PlaceholderValue2", "Zoekt u misschien een ...?");
1525 var SearchPrefill = Dynamicweb.Context.Current.Request["q"];
1526 var SearchboxClass = !string.IsNullOrWhiteSpace(SearchPrefill) ? "open" : "";
1527 var SearchtoggleClass = !string.IsNullOrWhiteSpace(SearchPrefill) ? "close" : "";
1528 }
1529
1530 <section class="bottombar__searchbox__wrapper">
1531 <form class="searchbox__form" method="get" action="/Default.aspx" style="display: flex; flex-grow: 1;">
1532 <input type="text" name="q" value="@SearchPrefill" class="searchbox__input" placeholder="@SearchPlaceholder" aria-label="Search through site content" data-placeholder="@SearchPlaceholder" data-hoverplaceholder="@SearchPlaceholderHover" style="display: flex; flex-grow: 1;" />
1533 <div class="searchbox__button">
1534 <button type="submit" class="searchbox__form__submit icon icon--medium icon__search input__icon" aria-label="Search">
1535 <i class="fal fa-search"></i>
1536 </button>
1537 </div>
1538 <input type="hidden" name="ID" value="@SearchPageID" />
1539 </form>
1540
1541 </section>
1542
1543 @using Dynamicweb.Rendering
1544 @using Dynamicweb.Security.UserManagement
1545
1546 @{
1547 UserImpersonation impersonationMode = User.ImpersonationMode;
1548 User currentUser = Pageview.User;
1549 User secondaryUser = Pageview.User?.CurrentSecondaryUser ?? null;
1550 bool isImpersonating = Pageview.User?.CurrentSecondaryUser != null;
1551 int impersonationPageId = GetPageIdByNavigationTag("CustomerImpersonation");
1552
1553 if(isImpersonating && impersonationMode == UserImpersonation.Full) {
1554 currentUser = Pageview.User.CurrentSecondaryUser;
1555 secondaryUser = Pageview.User;
1556 }
1557 }
1558
1559 @if(currentUser != null && currentUser.GetUsersICanSetAsSecondary().Count > 0)
1560 {
1561 <div class="impersonation">
1562 <div class="impersonation__header">
1563 <p class="impersonation__title">
1564 @Translate("Impersonate.Modal.Title", "Impersonation")
1565 @if (isImpersonating)
1566 {
1567 <span title="On" class="impersonation__indicator"></span>
1568 }
1569 </p>
1570 <i class="fal fa-chevron-up impersonation__header-icon"></i>
1571 </div>
1572 <div class="impersonation__body">
1573 @if (isImpersonating)
1574 {
1575 <p>@string.Format(Translate("Impersonate.CurrentImpersonation", "You ({0}) are currently impersonating {1}"), string.Format("<strong>{0}</strong>", currentUser.UserName), string.Format("<strong>{0}</strong>", secondaryUser.UserName))</p>
1576
1577 <form method="post" name="stopImpersonation">
1578 <input name="DwExtranetRemoveSecondaryUser" id="DwExtranetRemoveSecondaryUser" type="hidden">
1579 <div class="mt-4">
1580 <button class="btn btn__primary" type="submit">
1581 <span class="btn__text">@Translate("Impersonate.StopBtn", "Stop impersonation")</span>
1582 <i class="fas fa-ban btn__icon"></i>
1583 </button>
1584 </div>
1585 </form>
1586 } else {
1587 <p>@Translate("Impersonate.Modal.Content", "Take a look at the list of customers you can impersonate.")</p>
1588 <div class="w-full flex mt-2">
1589 <a href="Default.aspx?ID=@impersonationPageId" class="btn btn__primary">
1590 <span class="btn__text">@Translate("Impersonate.Modal.ViewList", "View List")</span>
1591 <i class="fal fa-chevron-right btn__icon"></i>
1592 </a>
1593 </div>
1594 }
1595 </div>
1596 </div>
1597 }
1598
1599 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel>
1600 @using System;
1601 @using Dynamicweb;
1602 @using Dynamicweb.Ecommerce.CustomerExperienceCenter.Favorites;
1603
1604 @{
1605 var favListService = new FavoriteListService();
1606 IEnumerable<FavoriteList> favoriteLists = Pageview.User != null ? favListService.GetLists(Pageview.User.ID) : null;
1607 int favoritelistsPageId = GetPageIdByNavigationTag("CustomerFavorites");
1608 }
1609
1610 @if(favoriteLists != null && Pageview.User != null)
1611 {
1612 <div class="offcanvas__backdrop" name="favoritelist"></div>
1613 <aside class="offcanvas" data-listcount="@favoriteLists.Count()" name="favoritelist">
1614 <header class="offcanvas__header">
1615 <span class="offcanvas__title">@Translate("OffCanvasMenu.FavoritesTitle", "Add to favorite list")</span>
1616 <button class="offcanvas__close" aria-label="@Translate("OffCanvasMenu.Close", "Close menu")">
1617 <i class="fal fa-times"></i>
1618 </button>
1619 </header>
1620 <div class="offcanvas__body">
1621 <p>@Translate("OffCanvasMenu.FavoritesContent", "Select the list you want to add the product to")</p>
1622 <ul class="favorites__list">
1623 @foreach(FavoriteList list in favoriteLists) {
1624 <li class="favorites__list-item" data-listid="@list.ListId">
1625 <span class="favorites__list-itemname">@list.Name</span>
1626 <i class="fas fa-plus"></i>
1627 </li>
1628 }
1629 </ul>
1630 </div>
1631 <footer class="offcanvas__footer">
1632 <a href="/Default.aspx?ID=@favoritelistsPageId" class="btn btn__primary">
1633 <span class="btn__text">@Translate("OffCanvasMenu.FavoritesManageLists", "Manage lists")</span>
1634 <i class="far fa-chevron-right btn__icon"></i>
1635 </a>
1636 </footer>
1637 </aside>
1638 }
1639
1640
1641
1642 <div id="backdrop"></div>
1643
1644 <script src="@appbundlejs"></script>
1645 <script defer src="@vuebundlejs"></script>
1646 <script defer src="@appAsyncbundlejs"></script>
1647
1648 @if (font_configuration != null)
1649 {
1650 foreach (var item in font_configuration.Item.ToCodeFirstItem<Bluedesk.DynamicWeb.ItemTypes.Pages.ConfigurationPagesParent>().GetChildConfigs<FontConfiguration>())
1651 {
1652 if (item["FontLink"] != null)
1653 {
1654 string FontName = item["FontName"].ToString().Replace(" ", "");
1655 string cssFile = $"files/Templates/Designs/Backyard/GoogleFont/{FontName}/{FontName}.css";
1656 <link href="@cssFile" rel="stylesheet">
1657 }
1658 }
1659 }
1660
1661 <link rel="stylesheet" href="https://pro.fontawesome.com/releases/v5.15.4/css/all.css" integrity="sha384-rqn26AG5Pj86AF4SO72RK5fyefcQ/x32DNQfChxWvbXIyXFePlEktwD18fEz+kQU" crossorigin="anonymous">
1662
1663 @if (isVisualEditor && IsNotContentManager)
1664 {
1665
1666 <style>
1667 body {
1668 background-color: #f1f1f1;
1669 font-family: 'Barlow', sans-serif;
1670 }
1671
1672 .slidePanel {
1673 position: fixed;
1674 top: 0;
1675 bottom: 0;
1676 min-width: 500px;
1677 box-shadow: -10px 10px 10px rgb(153 153 255 / 10%);
1678 background-color: #FFFFFF;
1679 z-index: 1000;
1680 box-sizing: border-box;
1681 transition: all .5s ease-in;
1682 }
1683
1684 .slidePanel.open {
1685 right: 0;
1686 }
1687
1688 .slidePanel {
1689 right: -500px;
1690 transition: all 0.5s ease-in;
1691 }
1692
1693 .slidePanel__container {
1694 display: flex;
1695 position: relative;
1696 height: 100%;
1697 }
1698
1699 .togglePanelButton {
1700 position: fixed;
1701 top: 50px;
1702 left: 50px;
1703 display: flex;
1704 justify-content: center;
1705 align-items: center;
1706 color: white;
1707 background-color: black;
1708 padding: 0px 25px;
1709 height: 50px;
1710 cursor: pointer;
1711 z-index: 1000;
1712 }
1713
1714 .closeButton {
1715 position: absolute;
1716 display: flex;
1717 top: 25px;
1718 right: 25px;
1719 font-size: 2rem;
1720 text-decoration: none;
1721 color: black;
1722 }
1723
1724 .blur {
1725 filter: blur(4px);
1726 pointer-events: none;
1727 }
1728
1729 .sideMenu {
1730 display: flex;
1731 position: absolute;
1732 align-items: center;
1733 min-height: 100px;
1734 z-index: 1200;
1735 top: 0;
1736 bottom: 0;
1737 right: 100%;
1738 flex-direction: column;
1739 justify-content: center;
1740 }
1741
1742 .sideMenu__link:first-child {
1743 margin-top: 10px;
1744 }
1745
1746 .sideMenu__link {
1747 position: relative;
1748 flex-direction: column;
1749 display: flex;
1750 height: 50px;
1751 width: 50px;
1752 background-color: #f1f1f1;
1753 margin-bottom: 10px;
1754 margin-left: 10px;
1755 margin-right: 10px;
1756 justify-content: space-between;
1757 align-items: center;
1758 font-size: 10px;
1759 padding: 10px;
1760 box-sizing: border-box;
1761 text-decoration: none;
1762 color: rgb(22, 101, 123);
1763 font-size: 24px;
1764 }
1765 .sideMenu__link:hover {
1766 background-color: #c9c9c9;
1767 color: white;
1768 transition: all ease-in 0.5s;
1769 }
1770 .sideMenu__link label {
1771 font-size: 12px;
1772 }
1773
1774 .sideMenu__container {
1775 display: flex;
1776 position: relative;
1777 flex-direction: column;
1778 box-shadow: -10px 10px 10px rgb(153 153 255 / 10%);
1779 background-color: white;
1780 }
1781
1782 .toolbar.close {
1783 display: none;
1784 }
1785
1786 #toolbarVE {
1787 position: fixed !important;
1788 z-index: 100;
1789 background-color: #CCC;
1790 border: 2px solid #F1F1F1;
1791 text-align: center;
1792 right: 0px;
1793 top: 300px;
1794 }
1795
1796 #toolbarVEHeader {
1797 padding: 10px;
1798 cursor: move;
1799 z-index: 10;
1800 background-color: #6e6e6e;
1801 color: #fff;
1802 }
1803 </style>
1804
1805 <div class="toolbarVE" id="toolbar" style="top: 150px; left: auto; width: 70px; position: fixed !important; right: 0px !important; ">
1806 <div id="toolbarVEHeader">
1807 <a href="javascript:void(0);" onclick="toggleClass('.toolbar', 'close');" style="color: #FFF;"><i class="icon fa-light fa-circle-xmark"></i></a>
1808 </div>
1809 <section class="sideMenu__container">
1810 <a href="javascript:history.back();" class="sideMenu__link"><i class="icon fa-light fa-reply"></i></a>
1811 <a href="/dashboard-configuration" class="sideMenu__link"><i class="icon fa-light fa-grid-horizontal"></i></a>
1812 <a href="/button-configuration" class="sideMenu__link"><i class="icon fa-light fa-diagram-cells"></i></a>
1813 <a href="/button-configuration" class="sideMenu__link"><i class="icon fa-light fa-link"></i></a>
1814 <a href="/background-configuration" class="sideMenu__link"><i class="icon fa-light fa-paintbrush"></i></a>
1815 <a href="/jumbotron-configuration" class="sideMenu__link"><i class="icon fa-light fa-megaphone"></i></a>
1816 <a href="/theme-configuration-page/theme-01" class="sideMenu__link"><i class="icon fa-light fa-brush"></i></a>
1817 <a href="/font-configuration" class="sideMenu__link"><i class="icon fa-light fa-font"></i></a>
1818 <a href="/device-manager" class="sideMenu__link"><i class="icon fa-light fa-computer"></i></a>
1819 </section>
1820 </div>
1821
1822 <script>
1823 function toggleClass(ClassName, AddedClassName) {
1824 var element = document.querySelector(ClassName);
1825 if (element.classList.contains(AddedClassName)) {
1826 element.classList.remove(AddedClassName);
1827 } else {
1828 element.classList.add(AddedClassName);
1829 }
1830 }
1831 </script>
1832
1833 <script>
1834 //Make the DIV element draggagle:
1835 dragElement(document.getElementById("toolbar"));
1836
1837 function dragElement(elmnt) {
1838 var pos1 = 0, pos2 = 0, pos3 = 0, pos4 = 0;
1839 if (document.getElementById(elmnt.id + "Header")) {
1840 /* if present, the header is where you move the DIV from:*/
1841 document.getElementById(elmnt.id + "Header").onmousedown = dragMouseDown;
1842 } else {
1843 /* otherwise, move the DIV from anywhere inside the DIV:*/
1844 elmnt.onmousedown = dragMouseDown;
1845 }
1846
1847 function dragMouseDown(e) {
1848 e = e || window.event;
1849 e.preventDefault();
1850 // get the mouse cursor position at startup:
1851 pos3 = e.clientX;
1852 pos4 = e.clientY;
1853 document.onmouseup = closeDragElement;
1854 // call a function whenever the cursor moves:
1855 document.onmousemove = elementDrag;
1856 }
1857
1858 function elementDrag(e) {
1859 e = e || window.event;
1860 e.preventDefault();
1861 // calculate the new cursor position:
1862 pos1 = pos3 - e.clientX;
1863 pos2 = pos4 - e.clientY;
1864 pos3 = e.clientX;
1865 pos4 = e.clientY;
1866 // set the element's new position:
1867 elmnt.style.top = (elmnt.offsetTop - pos2) + "px";
1868 elmnt.style.left = (elmnt.offsetLeft - pos1) + "px";
1869 }
1870
1871 function closeDragElement() {
1872 /* stop moving when mouse button is released:*/
1873 document.onmouseup = null;
1874 document.onmousemove = null;
1875 }
1876 }
1877 </script>
1878
1879 @*<section class="slidePanel" id="slidePanel">
1880
1881 <div class="slidePanel__container">
1882
1883 <a href="javasciprt:void(0);" onclick="toggleClass('.slidePanel', 'open'); toggleClass('main', 'blur')" class="closeButton">
1884 <i class="fal fa-circle-xmark"></i>
1885 </a>
1886
1887
1888 <nav class="sideMenu" id="sideMenu">
1889
1890 <section class="sideMenu__container">
1891 <a href="javascript:history.back();" class="sideMenu__link"><i class="fal fa-reply"></i></a>
1892 <a href="/dashboard-configuration" class="sideMenu__link"><i class="fal fa-grid-horizontal"></i></a>
1893 <a href="/button-configuration" class="sideMenu__link"><i class="fal fa-diagram-cells"></i></a>
1894 <a href="/button-configuration" class="sideMenu__link"><i class="fal fa-link"></i></a>
1895 <a href="/background-configuration" class="sideMenu__link"><i class="fal fa-paintbrush"></i></a>
1896 <a href="/jumbotron-configuration" class="sideMenu__link"><i class="fal fa-megaphone"></i></a>
1897 <a href="/theme-configuration-page/theme-01" class="sideMenu__link"><i class="fal fa-brush"></i></a>
1898 <a href="/font-configuration" class="sideMenu__link"><i class="fal fa-font"></i></a>
1899 <a href="/device-manager" class="sideMenu__link"><i class="fal fa-computer"></i></a>
1900 </section>
1901 </nav>
1902
1903 </div>
1904
1905 </section>*@
1906
1907 <script src="https://kit.fontawesome.com/a46eca85e2.js" crossorigin="anonymous"></script>
1908
1909 }
1910
1911
1912 @if (isVisualEditor)
1913 {
1914
1915 int FooProductDetailLayoutID = 0;
1916
1917 <nav class="webshop-visual-editor__navigation">
1918 <section class="webshop-visual-editor__link-container">
1919 <a href="Default.aspx?ID=@ProductOverviewLayoutID" class="webshop-visual-editor__link"><i class="fa-regular fa-cart-shopping"></i> Edit Product Overview</a>
1920 </section>
1921 <section class="webshop-visual-editor__link-container">
1922 <a href="Default.aspx?ID=@ProductDetailLayoutID" class="webshop-visual-editor__link"><i class="fa-regular fa-cart-shopping"></i> Edit Product Detail</a>
1923 <ul>
1924 @foreach (GridRow g in Dynamicweb.Services.Grids.GetGridRowsByPageId(ProductDetailLayoutID))
1925 {
1926
1927 ProductDetailPageBreakpointRow _data = ItemManager.Storage.GetById<ProductDetailPageBreakpointRow>(g.ItemId.ToString());
1928 FooProductDetailLayoutID = Dynamicweb.Services.Pages.GetPageForItem("ProductDetailPage", _data.ProductDetailConfiguration.Id).ID;
1929
1930 <li><a href="Default.aspx?ID=@FooProductDetailLayoutID">@_data.ProductDetailConfiguration.Name</a></li>
1931
1932 }
1933 </ul>
1934 </section>
1935 </nav>
1936
1937 <style>
1938 .webshop-visual-editor__navigation {
1939 position: fixed;
1940 display: flex;
1941 top: 50px;
1942 left: 50px;
1943 z-index: 100000;
1944 flex-direction: row;
1945 }
1946
1947 .webshop-visual-editor__link {
1948 color: black;
1949 }
1950
1951 .webshop-visual-editor__link-container {
1952 position: relative;
1953 display: flex;
1954 box-shadow: -10px 10px 10px rgb(153 153 255 / 10%);
1955 background-color: white;
1956 padding: 5px;
1957 margin-right: 25px;
1958 flex-direction: column;
1959 }
1960 </style>
1961
1962 }
1963
1964 </body>
1965 </html>
1966