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