Error executing template "Designs/ClientBase_generated/_parsed/WebshopPage.parsed.cshtml"
System.Data.SqlClient.SqlException (0x80131904): A transport-level error has occurred when sending the request to the server. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.) ---> System.ComponentModel.Win32Exception (0x80004005): No process is on the other end of the pipe
at System.Data.SqlClient.TdsParser.TdsExecuteRPC(SqlCommand cmd, _SqlRPC[] rpcArray, Int32 timeout, Boolean inSchema, SqlNotificationRequest notificationRequest, TdsParserStateObject stateObj, Boolean isCommandProc, Boolean sync, TaskCompletionSource`1 completion, Int32 startRpc, Int32 startParam)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
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\KoksNewHorizon\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\KoksNewHorizon\BluedeskBaseSolution\ClientBase\ItemTypes\Bluedesk.DynamicWeb.ItemTypes.BaseSolution\Frontend\BaseSettings.cs:line 535
at CompiledRazorTemplates.Dynamic.RazorEngine_42c1e84c4f144bf8a976696af5f90cb9.Execute() in D:\dynamicweb.net\Solutions\Bluedesk\koksgroup.cloud.dynamicweb-cms.com\files\Templates\Designs\ClientBase_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:0d67cbf1-ed47-4d7e-b33d-c24e3aea3220
Error Number:233,State:0,Class:20
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.Published)
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.Published)
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, page.Area.EcomLanguageId);
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 DW_GROUP_ID: '@queryParamGroupId'
387 };
388 </script>
389
390 @BaseSettings.System.HeadScript
391
392 @{
393 var _cookieOptinLevel = Dynamicweb.Environment.CookieManager.GetCookieOptInLevel();
394 var _enabledCookieCategories = Dynamicweb.Environment.CookieManager.GetCookieOptInCategories();
395 if (_cookieOptinLevel.ToString() == "All" || _enabledCookieCategories.Contains("Marketing_Cookies"))
396 {
397 @BaseSettings.System.HeadScriptAfterConsent;
398 }
399 }
400
401 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution.Frontend;
402 @{
403
404 var reviewName = BaseSettings.Review.Review_Name != null ? BaseSettings.Review.Review_Name : "";
405 var reviewBestRating = BaseSettings.Review.Review_Best_Rating != null ? BaseSettings.Review.Review_Best_Rating : "";
406 var reviewWorstRating = BaseSettings.Review.Review_Worst_Rating != null ? BaseSettings.Review.Review_Worst_Rating : "";
407 var reviewRatingValue = BaseSettings.Review.Review_Rating_Value != null ? BaseSettings.Review.Review_Rating_Value : "";
408 var reviewCount = BaseSettings.Review.Review_Count != null ? BaseSettings.Review.Review_Count : "";
409 var reviewUrl = BaseSettings.Review.Review_URL != null ? BaseSettings.Review.Review_URL : "";
410
411 var searchPageID = Bluedesk.Tools.DynamicWeb.Generic.PageHelper.GetPageIDByNavigationTag("searchresults", Pageview.AreaID);
412 var domain = Dynamicweb.Environment.Helpers.LinkHelper.GetHttpDomain();
413 }
414
415 <script type="application/ld+json">
416 [{
417 "@@context": "https://schema.org",
418 "@@type": "Organization",
419 "name" : "@BaseSettings.CorporateSettings.CompanyName",
420 "url": "@domain",
421 "sameAs" : "@BaseSettings.SocialMedia.Facebook",
422 "logo": "@domain@BaseSettings.BrandConfiguration.Logos.Logo",
423 "contactPoint" : [{
424 "@@type" : "ContactPoint",
425 "telephone" : "@BaseSettings.CorporateSettings.Phonenumber",
426 "contactType" : "customer service" ,
427 "@@context": "https://schema.org",
428 "@@id": "@domain",
429 "name": "@BaseSettings.CorporateSettings.CompanyName"
430 }],
431 "address": {
432 "@@type": "PostalAddress",
433 "streetAddress": "@BaseSettings.CorporateSettings.Address",
434 "addressLocality": "@BaseSettings.CorporateSettings.City",
435 "postalCode": "@BaseSettings.CorporateSettings.Zipcode",
436 "addressRegion": "@BaseSettings.CorporateSettings.Region",
437 "addressCountry": "@BaseSettings.CorporateSettings.Country"
438 }
439 },
440 {
441 "@@context": "https://schema.org",
442 "@@type": "WebSite",
443 "name" : "@BaseSettings.CorporateSettings.CompanyName",
444 "alternateName" : "@BaseSettings.CorporateSettings.AltCompanyName",
445 "url": "@domain",
446 "potentialAction": {
447 "@@type": "SearchAction",
448 "target": "@domain/Default.aspx?ID=@searchPageID&q={search_term_string}",
449 "query-input": "required name=search_term_string"
450 }
451 }]
452 </script>
453
454 <script type="application/ld+json">
455 {
456 "@@context": "https://schema.org",
457 "@@type": "Product",
458 "name": "@reviewName",
459 "url":"@reviewUrl",
460 "aggregateRating": {
461 "@@type": "AggregateRating",
462 "bestRating": "@reviewBestRating",
463 "worstRating": "@reviewWorstRating",
464 "ratingValue": "@reviewRatingValue",
465 "reviewCount": "@reviewCount"
466 }
467 }
468 </script>
469
470
471 @RenderSnippet("DataLayer")
472 @RenderSnippet("GoogleMapsScript")
473
474 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution.Frontend;
475
476 @{
477
478 // TODO: Add there options to master config for product overview
479 bool hidePricesForGuests = false;
480 bool hideShoppingCartForGuests = false;
481
482 bool enableShoppingCart = hideShoppingCartForGuests && Pageview.User == null ? false : BaseSettings.Features.ConfigModuleShoppingCart;
483 bool enableLogin = BaseSettings.Features.ConfigModuleLogin;
484 bool enableQuickOrder = BaseSettings.Features.ConfigModuleQuickOrder;
485 bool enableAdvancedSearch = BaseSettings.Features.ConfigModuleAdvancedSearch;
486 bool enableCallMeBack = BaseSettings.Features.ConfigModuleCallMeBack;
487 bool enableDyslexicFont = BaseSettings.Features.ConfigModuleDyslexicFont;
488 bool enableProductCompare = BaseSettings.Features.ConfigModuleProductCompare;
489 }
490
491
492 <style>
493 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel>
494 @using Dynamicweb;
495
496 @using System.Data;
497 @using System.Data.SqlClient;
498 @using Bluedesk.Tools.DynamicWeb.DataAccess;
499
500 @using Bluedesk.DynamicWeb.ItemTypes;
501 @using Bluedesk.DynamicWeb.ItemTypes.Settings;
502 @using Bluedesk.DynamicWeb.ItemTypes.Configuration;
503 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution;
504
505 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution.Frontend;
506
507 @Title("Configuration page template")
508
509 @{
510
511 string RoundedCornersValue = BaseSettings.BrandConfiguration.RoundedCorners;
512 string ButtonHeight = BaseSettings.BrandConfiguration.ButtonHeight;
513
514 string fontawesomeFontFamily = "Font Awesome 5 Pro";
515 int fontawesomeFontWeight = 300;
516
517 switch (BaseSettings.BrandConfiguration.FontawesomeStyle)
518 {
519
520 case "fal":
521 fontawesomeFontWeight = 300;
522 break;
523 case "far":
524 fontawesomeFontWeight = 400;
525 break;
526 case "fas":
527 fontawesomeFontWeight = 900;
528 break;
529 case "fad":
530 fontawesomeFontWeight = 900;
531 fontawesomeFontFamily = "Font Awesome 5 Duotone";
532 break;
533 }
534
535 }
536
537 @BaseSettingServices.RenderButtonCSS("btn__primary", BaseSettingsButtons.PrimaryButtonConfiguration)
538 @BaseSettingServices.RenderButtonCSS("btn__secondary", BaseSettingsButtons.SecondaryButtonConfiguration)
539 @BaseSettingServices.RenderButtonCSS("btn__contrast", BaseSettingsButtons.ContrastButtonConfiguration)
540
541 :root,
542 body {
543
544 --BaseColorPrimary : @BaseSettingsBrandConfiguration.BaseColorPrimary;
545 --BaseColorSecondary : @BaseSettingsBrandConfiguration.BaseColorSecondary;
546 --BaseColorContrast : @BaseSettingsBrandConfiguration.BaseColorContrast;
547
548 --BaseFontPrimary : @BaseSettingsBrandConfiguration.PrimaryFontFamily;
549 --BaseFontSecondary : @BaseSettingsBrandConfiguration.PrimaryFontFamily;
550
551 @BaseSettings.BrandConfiguration.BodyInlineStyles
552 --StandardUnitSize : 3.2rem;
553 }
554
555 .footer {
556 --FooterContainerDisplay: none !important;
557 display: var(--FooterContainerDisplay)
558 }
559
560 h1, h2, h3, h4, h5, h6 { @BaseSettings.BrandConfiguration.HeaderInlineStyles }
561
562 h1.cta-paragraph__header { @BaseSettings.BrandConfiguration.H1InlineStyles }
563 h2.cta-paragraph__header { @BaseSettings.BrandConfiguration.H2InlineStyles }
564 h3.cta-paragraph__header { @BaseSettings.BrandConfiguration.H3InlineStyles }
565 h4.cta-paragraph__header { @BaseSettings.BrandConfiguration.H4InlineStyles }
566
567 .po-block__addtocart .btn,
568 .productdetails__add-to-cart,
569 .searchbox__input {
570 border-radius: @RoundedCornersValue;
571 }
572
573 main.blur {
574 filter: grayscale(50%) blur(15px);
575 -webkit-filter: grayscale(50%) blur(15px);
576 }
577
578 .AdvancedGridButton {
579 --BorderRadius: @RoundedCornersValue;
580 }
581
582 .btn {
583 height: var(--StandardUnitSize);
584 }
585
586 .btn__icon {
587
588 --fontawesomeFontFamily : "@fontawesomeFontFamily";
589 --fontawesomeFontWeight : @fontawesomeFontWeight;
590
591 font-family: var(--fontawesomeFontFamily);
592 font-weight: var(--fontawesomeFontWeight);
593
594 -moz-osx-font-smoothing: grayscale;
595 -webkit-font-smoothing: antialiased;
596 display: inline-block;
597 font-style: normal;
598 font-variant: normal;
599 text-rendering: auto;
600 line-height: 1;
601
602 }
603
604 .cta-paragraph {
605 background-color: var(--mainBackgroundColor);
606 }
607
608 .cta-paragraph__container {
609 background-color: var(--contentBackgroundColor);
610 border: var(--contentBorder);
611 }
612
613 .cta-paragraph__subheader,
614 .cta-paragraph__header,
615 .cta-paragraph__text p,
616 .cta-paragraph__text li {
617 color: var(--Color);
618 background-color: var(--BackgroundColor);
619 border-color: var(--BorderColor);
620 position: var(--Position);
621 top: var(--Top);
622 left: var(--Left);
623 right: var(--Right);
624 bottom: var(--Bottom);
625 padding: var(--Padding);
626 border: var(--BorderSize);
627 font-size: var(--FontSize);
628 text-transform: var(--FontStyle);
629 line-height: var(--LineHeight);
630 font-weight: var(--FontWeight);
631 font-family: var(--FontFamily);
632 border-radius: var(--BorderRadius);
633 }
634
635 .cta-paragraph__content-container {
636 align-items: var(--ContentElementAlignmentAlignItems);
637 text-align: var(--ContentElementAlignmentTextAlign);
638 }
639
640 .cta-paragraph__btn-navigation,
641 .cta-paragraph__content-container {
642 align-items : var(--ContainerFitContentAlignmentAlignItems);
643 justify-content: var(--ContainerFitContentAlignmentJustifyContent);
644 }
645
646 .jumbotron__subheader,
647 .jumbotron__header,
648 .jumbotron__shoutbox-intro p,
649 .jumbotron__shoutbox-intro li,
650 .header--desktop.headerNew {
651 position: relative;
652 }
653
654 .header--desktop.headerNew.stickyheader {
655 position: fixed;
656 }
657
658 @@media screen and (min-width: 992px){
659 .image-left {
660 justify-content: flex-end;
661 flex-direction: row;
662 }
663
664 .image-right {
665 justify-content: flex-start;
666 flex-direction: row-reverse;
667 }
668 }
669
670 .AdvancedGrid__row {
671 background-color: var(--BackgroundColor);
672 }
673
674 .cta-paragraph__btn-navigation {
675 padding: 1.2rem 0rem !important;
676 }
677
678 .AdvancedGrid,
679 .AdvancedGrid__container {
680 width: 100%;
681 background-image: var(--BackgroundImage);
682 min-height: var(--Height);
683 }
684
685 @{
686
687 int PageViewId = Pageview.Page.ID;
688 int AreaId = Pageview.AreaID;
689
690 // HttpContext.Current.Session["PageIdForStyles"] = Pageview.Page.ID;
691 // HttpContext.Current.Session["AreaIdForStyles"] = Pageview.AreaID;
692
693 DataTable AdvancedGridStylesDataTable = null;
694
695 AdvancedGridStylesDataTable = DynamicwebData.Query($@"
696
697 SELECT
698 InlineStyles AS Styles
699
700 FROM
701 [dbo].[ItemType_AdvancedGridConfiguration] AS AGC
702 LEFT JOIN [dbo].[GridRow] AS GR ON GR.GridRowItemId = AGC.Id
703
704 WHERE
705 GR.GridRowPageId = @PageId;
706
707 ", new SqlParameter("PageId", PageViewId));
708
709 DataTable BackgroundConfigDataTable = null;
710
711 BackgroundConfigDataTable = DynamicwebData.Query($@"
712
713 SELECT
714 distinct(BG.Stylesheet) AS Styles
715
716 FROM [dbo].GridRow AS GR
717 INNER JOIN dbo.Paragraph AS PG ON PG.ParagraphGridRowId = GR.GridRowId
718 LEFT JOIN dbo.ItemType_CTAParagraph AS CTA ON CTA.Id = PG.ParagraphItemId
719 LEFT JOIN dbo.ItemType_MultiColumnParagraph AS MCP ON MCP.Id = PG.ParagraphItemId
720 LEFT JOIN dbo.ItemType_Carousel AS CS ON CS.Id = PG.ParagraphItemId
721 LEFT JOIN dbo.ItemType_BackgroundConfiguration AS BG ON CTA.BackgroundConfigurationID = BG.Id
722 OR MCP.BackgroundConfigurationID = BG.Id
723 OR CS.BackgroundConfigurationID = BG.Id
724
725 WHERE GR.GridRowPageID=@PageId
726 AND bg.Stylesheet Is NOT NULL", new SqlParameter("PageId", PageViewId));
727
728 DataTable ButtonConfigDataTable = null;
729
730 ButtonConfigDataTable = DynamicwebData.Query($@"
731
732 SELECT
733 distinct(BCONF.Stylesheet) AS Styles
734
735 FROM [dbo].GridRow AS GR
736 LEFT JOIN [dbo].Paragraph AS P ON P.ParagraphGridRowId = GR.GridRowId
737 LEFT JOIN [dbo].ItemType_CTAParagraph AS CTAP ON CTAP.Id = P.ParagraphItemId
738
739 LEFT JOIN [dbo].ItemType_MultiColumnParagraph AS MCP ON MCP.Id = P.ParagraphItemId
740 LEFT JOIN [dbo].[ItemList] AS ColumnIL ON ColumnIL.ItemListId = MCP.ParagraphListID
741 LEFT JOIN [dbo].[ItemListRelation] AS ColumnILR ON ColumnIL.ItemListId = ColumnILR.ItemListRelationItemListId
742 LEFT JOIN [dbo].[ItemType_ParagraphColumn] AS PC ON PC.Id = ColumnILR.ItemListRelationItemId
743
744 LEFT JOIN [dbo].ItemType_Carousel AS CS ON CS.Id = P.ParagraphItemId
745 LEFT JOIN [dbo].[ItemList] AS CIIL ON CIIL.ItemListId = CS.CarouselListID
746 LEFT JOIN [dbo].[ItemListRelation] AS CIILR ON CIIL.ItemListId = CIILR.ItemListRelationItemListId
747 LEFT JOIN [dbo].ItemType_CarouselItem AS CI ON CI.Id = CIILR.ItemListRelationItemId
748
749 LEFT JOIN [dbo].[ItemType_JumbotronContainer] AS JC ON JC.Id = P.ParagraphItemId
750 LEFT JOIN [dbo].[ItemList] AS JCIL ON JCIL.ItemListId = JC.JumbotronListID
751 LEFT JOIN [dbo].[ItemListRelation] AS JCILR ON JCIL.ItemListId = JCILR.ItemListRelationItemListId
752 LEFT JOIN [dbo].ItemType_JumbotronListItem AS JCLI ON JCLI.Id = JCILR.ItemListRelationItemId
753
754 LEFT JOIN [dbo].[ItemType_CTAButton] AS CTAB ON
755 CTAP.ButtonID = CTAB.Id
756 OR CTAP.ExtraButtonID = CTAB.Id
757 OR MCP.ButtonID = CTAB.Id
758 OR PC.ButtonID = CTAB.Id
759 OR PC.ExtraButtonID = CTAB.Id
760 OR CS.ButtonID = CTAB.Id
761 OR CI.ButtonID = CTAB.Id
762 OR CI.ExtraButtonID = CTAB.Id
763 OR JCLI.ButtonID = CTAB.Id
764 LEFT JOIN [dbo].[ItemType_ButtonConfiguration] AS BCONF ON CTAB.ButtonConfigurationID = BCONF.Id
765
766 WHERE
767 GR.GridRowPageID = @PageId
768 AND GR.GridRowActive = 1
769 AND CTAB.ButtonConfigurationID Is NOT NULL", new SqlParameter("PageId", PageViewId));
770
771 DataTable MasterConfigDataTable = null;
772
773 MasterConfigDataTable = DynamicwebData.Query($@"
774
775 SELECT
776 MC.CustomCSS
777
778 FROM
779 [dbo].[Page] AS P
780 INNER JOIN [dbo].[ItemType_MasterConfig] AS MC ON P.PageItemId = MC.Id
781
782 WHERE
783 p.PageItemType = 'MasterConfig'
784 AND PageAreaId = @AreaId;", new SqlParameter("AreaId", AreaId));
785
786 if (AdvancedGridStylesDataTable != null && AdvancedGridStylesDataTable.Rows.Count > 0)
787 {
788 for (int i = 0; i < AdvancedGridStylesDataTable.Rows.Count; i++)
789 {
790 @AdvancedGridStylesDataTable.Rows[i]["Styles"].ToString();
791 }
792 }
793
794 if (BackgroundConfigDataTable != null && BackgroundConfigDataTable.Rows.Count > 0)
795 {
796 for (int i = 0; i < BackgroundConfigDataTable.Rows.Count; i++)
797 {
798 @BackgroundConfigDataTable.Rows[i]["Styles"].ToString();
799 }
800 }
801
802 if (ButtonConfigDataTable != null && ButtonConfigDataTable.Rows.Count > 0)
803 {
804 for (int i = 0; i < ButtonConfigDataTable.Rows.Count; i++)
805 {
806 @ButtonConfigDataTable.Rows[i]["Styles"].ToString();
807 }
808 }
809
810 @MasterConfigDataTable.Rows[0]["CustomCSS"].ToString();
811 }
812
813 </style>
814
815 </head>
816 <body class="ProductDetailPage Page--@Pageview.Page.ID @MasterConfigCssClass" id="@Pageview.Page.ID">
817
818 @BaseSettings.System.BodyScript
819 @{
820 if (_cookieOptinLevel.ToString() == "All" || _enabledCookieCategories.Contains("Marketing_Cookies"))
821 {
822 @BaseSettings.System.BodyScriptAfterConsent;
823 }
824 }
825
826 @BaseSettings.System.TailScript
827
828 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel>
829
830 @using System.Linq;
831 @using System.Data;
832
833 @using Dynamicweb;
834 @using Dynamicweb.Content;
835 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution.Frontend;
836
837 @{
838
839 DataTable DataTableObj = AdvancedGridServices.GetHeaderGridDataTable(Pageview.AreaID, Pageview.Page.ID);
840
841 WrapperObj Header = AdvancedGridServices.RenderWrapper(DataTableObj, "header", "header", Pageview.AreaID, Pageview.Page.ID);
842 WrapperObj Footer = AdvancedGridServices.RenderWrapper(DataTableObj, "footer", "footer", Pageview.AreaID, Pageview.Page.ID);
843
844 // var homepage = Dynamicweb.Services.Pages.GetRootPagesForArea(Pageview.AreaID).FirstOrDefault(p => p.ItemType == "HomePage" && p.Active) ?? Dynamicweb.Services.Pages.GetFirstPageForArea(Pageview.AreaID);
845
846 MasterLayoutPageObj MasterLayoutPageObj = MasterLayoutControllers.RenderMasterLayoutPageObj(Pageview);
847
848 bool userLoggedIn = false;
849 if (enableLogin) { userLoggedIn = Pageview.User == null ? false : true; }
850
851 string HeaderContainerSize = mc.HeaderConfiguration.ContainerSize != 0 ? mc.HeaderConfiguration.ContainerSize + "px" : "auto";
852
853 }
854
855 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel>
856 @using Dynamicweb;
857 @using Dynamicweb.Content.Items;
858
859 <script>
860
861 function setImagesSizes(Classname) {
862 var Images = document.querySelectorAll(Classname);
863 for (var index = 0; index < Images.length; index++) {
864 if (!Images[index].hasAttribute("height")) {
865 Images[index].setAttribute("height", Images[index].offsetHeight);
866 }
867 if (!Images[index].hasAttribute("width")) {
868 Images[index].setAttribute("width", Images[index].offsetWidth);
869 }
870 }
871 }
872
873 window.addEventListener('load', function () {
874 setImagesSizes("img");
875 setImagesSizes(".mc-header__logo-image");
876 });
877
878 </script>
879
880
881 @if (!hideHeader)
882 {
883 <header>@MasterLayoutPageObj.Header</header>
884
885 <!-- DO NOT REMOVE -->
886 <div id="quick-order"></div>
887 <div id="backdrop-megamenu"></div>
888 <mega-menu id="mega-menu"></mega-menu>
889 <!-- DO NOT REMOVE -->
890 }
891
892 @if (isVisualEditor && IsNotContentManager)
893 {
894 @AdvancedGridServices.RenderVisualEditorNavigation(DataTableObj, "header")
895 }
896
897 <style>@MasterLayoutPageObj.CSS</style>
898
899 <style>
900
901
902 .visual-editor__navigation {
903 position: absolute;
904 top: 10px;
905 left: 10px;
906 display: flex;
907 flex-direction: row;
908 z-index: 100000000;
909 }
910
911 .visual-editor__button {
912 height: 50px;
913 min-width: 150px;
914 right: auto;
915 left: auto;
916 background-color: white;
917 box-shadow: -10px 10px 10px rgb(28 28 84 / 25%);
918 display: flex;
919 justify-content: center;
920 align-items: center;
921 padding: 25px;
922 margin-right: 25px;
923 }
924
925 .visual-editor__button-icon {
926 margin-right: 25px;
927 }
928
929 .header {
930 --HeaderContainerDisplay: none;
931 }
932
933 .header__container {
934 padding: 0;
935 }
936
937 .header__container, .header__stickyheader-container {
938 max-width: none;
939 }
940
941 .header .AdvancedGrid__container {
942 max-width: @HeaderContainerSize;
943 margin: 0 auto;
944 }
945
946 .header .AdvancedGrid__column {
947 background-color: var(--BackgroundColor);
948 flex-grow: var(--FlexGrow);
949 }
950
951 .AdvancedGrid__row {
952 align-items: center;
953 }
954 </style>
955
956 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>>
957 @using Dynamicweb;
958 @using Bluedesk.DynamicWeb.ItemTypes;
959
960 @{
961 var pid = ModuleOnlyParagraph.GetParagraphIDByTag<ModuleOnlyParagraph>("SideBarForm", Pageview.AreaID);
962
963 if (pid > 0)
964 {
965 <section id="vue-side-bar-form" data-paragraphid="@pid" data-telephone="@phonenumber" data-formatphonenumber="@formattedPhonenumber" data-isoffline="@isOffline"></section>
966 }
967 }
968
969
970 @if (@enableProductCompare)
971 {
972 <div id="vue-compare-list"></div>
973 }
974
975 @Model.Grid("grid", "Before breadcrumb", "", "AdvancedGrid")
976
977 @if (showBreadcrumbs && !isOverviewPage)
978 {
979 var navigationSettings = new NavigationSettings();
980 navigationSettings.ExpandMode = ExpandMode.PathOnly;
981 navigationSettings.StartLevel = 1;
982 navigationSettings.StopLevel = 99;
983 navigationSettings.Parameters.Add("PageTitle", Model.Title);
984 navigationSettings.IncludeFoldersAndHidden = true;
985
986 @Navigation.RenderNavigation("Navigation/Breadcrumbs.cshtml", navigationSettings)
987
988 }
989
990 @Model.Grid("grid2", "After breadcrumb", "", "AdvancedGrid")
991
992 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel>
993 @using Dynamicweb;
994 @using Bluedesk.DynamicWeb.ItemTypes;
995 @using Bluedesk.DynamicWeb.ItemTypes.Extensions;
996 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution.Frontend;
997
998 @{
999
1000 string footerLogo = BaseSettings.BrandConfiguration.Logos.FooterLogo;
1001 string footerDescription = BaseSettings.CorporateSettings.FooterDescription;
1002
1003 var fb = BaseSettings.SocialMedia.Facebook;
1004 var twitter = BaseSettings.SocialMedia.Twitter;
1005 var linkedin = BaseSettings.SocialMedia.LinkedIn;
1006 var instagram = BaseSettings.SocialMedia.Instagram;
1007 var youtube = BaseSettings.SocialMedia.Youtube;
1008 var pinterest = BaseSettings.SocialMedia.Pinterest ?? "";
1009
1010 var companyName = BaseSettings.CorporateSettings.CompanyName;
1011 var Emailadress = BaseSettings.CorporateSettings.Emailadress;
1012 var Phonenumber = BaseSettings.CorporateSettings.Phonenumber;
1013 var Address = BaseSettings.CorporateSettings.Address;
1014 var Zipcode = BaseSettings.CorporateSettings.Zipcode;
1015 var City = BaseSettings.CorporateSettings.City;
1016 var Country = BaseSettings.CorporateSettings.Country;
1017
1018 var selectedPaymentLogos = BaseSettings.BrandConfiguration.Logos.FooterPaymentLogos;
1019
1020 bool footer__newsletter_signup_display = !string.IsNullOrWhiteSpace(mc.FooterConfiguration.NewsLetterSignUpDisplay.ToString()) && mc.FooterConfiguration.NewsLetterSignUpDisplay.ToString() == "True" ? true : false;
1021 bool footer__USP_display = !string.IsNullOrWhiteSpace(mc.FooterConfiguration.UspDisplay.ToString()) && mc.FooterConfiguration.UspDisplay.ToString() == "True" ? true : false;
1022
1023 string footer__background_color = mc.FooterConfiguration.BackgroundColor?.GetColorCode(Pageview.AreaID) ?? "#000000";
1024 string footer__color = mc.FooterConfiguration.Color?.GetColorCode(Pageview.AreaID) ?? "#FFFFFF";
1025
1026 string footer__top_image = !string.IsNullOrWhiteSpace(mc.FooterConfiguration.TopImage.ToString()) ? mc.FooterConfiguration.TopImage.ToString() : "";
1027
1028
1029
1030 }
1031
1032 <div id="scroll-to-top" class="scroll-to-top" aria-label="@Translate("Naar boven", "To Top")">
1033 <span class="scroll-to-top__text">
1034 @Translate("Naar boven", "To Top")
1035 </span>
1036 <i class="fal fa-arrow-to-top scroll-to-top__icon"></i>
1037 </div>
1038
1039 @if (Pageview.Page.ParentPageId > 0)
1040 {
1041 var siblings = Dynamicweb.Services.Pages.GetPagesByParentID(Pageview.Page.ParentPageId).Where(p => p.Active).ToList();
1042 var parentpageItemType = Pageview.Page.Parent.ItemType;
1043 bool isParentPageOverviewpage = parentpageItemType == "OverviewPage";
1044
1045 if (siblings.Count() > 1 && isParentPageOverviewpage)
1046 {
1047 var prevPage = siblings.OrderByDescending(p => p.Sort).FirstOrDefault(p => p.Sort < Pageview.Page.Sort);
1048 var nextPage = siblings.OrderBy(p => p.Sort).FirstOrDefault(p => p.Sort > Pageview.Page.Sort);
1049 var overview = "/Default.aspx?ID=" + Pageview.Page.ParentPageId;
1050
1051 <section class="page-navigation">
1052 @if (prevPage != null)
1053 {
1054 var back = "/Default.aspx?ID=" + prevPage.ID;
1055 <a href="@back" class="page-navigation__item">
1056 <i class="fal fa-arrow-alt-to-left page-navigation__item--icon"></i>
1057 <label class="page-navigation__item-label">@Translate("pagenavigation.previous", "Previous")</label>
1058 </a>
1059 }
1060
1061 <a href="@overview" class="page-navigation__item">
1062 <label class="page-navigation__item-label">@Translate("pagenavigation.Overview", "To overview")</label>
1063 <i class="fas fa-th page-navigation__item--icon"></i>
1064 </a>
1065
1066 @if (nextPage != null)
1067 {
1068 var forward = "/Default.aspx?ID=" + nextPage.ID;
1069 <a href="@forward" class="page-navigation__item">
1070 <label class="page-navigation__item-label">@Translate("pagenavigation.next", "Next")</label>
1071 <i class="fal fa-arrow-alt-to-right page-navigation__item--icon"></i>
1072 </a>
1073 }
1074 </section>
1075 }
1076 }
1077
1078 @*
1079
1080 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel>
1081 @using Dynamicweb;
1082 @using Bluedesk.Tools.DynamicWeb.ExtensionMethods;
1083 @using Bluedesk.DynamicWeb.ItemTypes;
1084
1085 @{
1086
1087 if (Pageview.Page.ParentPageId > 0)
1088 {
1089
1090 // Paging
1091
1092 var siblings = Dynamicweb.Services.Pages.GetPagesByParentID(Pageview.Page.ParentPageId).Where(p => p.Active).ToList();
1093 var currentID = Pageview.Page.ID;
1094 var parentpageItemType = Pageview.Page.Parent.ItemType;
1095 bool isParentPageOverviewpage = parentpageItemType == "OverviewPage";
1096
1097
1098 var siblingsCount = siblings.Count;
1099
1100 int previousIdx = 0;
1101 int nextIdx = siblingsCount - 1;
1102 int idx = 0;
1103
1104 for (int i = 0; i < siblingsCount; i++)
1105 {
1106 if (siblings[i].ID == currentID && siblings[i].PropertyItem != null)
1107 {
1108 idx = i;
1109 }
1110 }
1111
1112 previousIdx = idx == previousIdx ? previousIdx : idx - 1;
1113 nextIdx = idx == nextIdx ? nextIdx : idx + 1;
1114
1115 var previousID = siblings[previousIdx].ID;
1116 var nextID = siblings[nextIdx].ID;
1117 var overview = "/Default.aspx?ID=" + Pageview.Page.ParentPageId;
1118
1119 if (siblingsCount > 1)
1120 {
1121
1122 <section class="page-navigation">
1123
1124 @if (!(previousID == currentID || previousID == 0))
1125 {
1126 var back = "/Default.aspx?ID=" + previousID;
1127 <a href="@back" class="page-navigation__item">
1128 <i class="fal fa-arrow-alt-to-left page-navigation__item--icon"></i>
1129 <label class="page-navigation__item-label">@Translate("pagenavigation.previous", "Previous")</label>
1130 </a>
1131 }
1132
1133 <a href="@overview" class="page-navigation__item">
1134 <label class="page-navigation__item-label">@Translate("pagenavigation.Overview", "To overview")</label>
1135 <i class="fas fa-th page-navigation__item--icon"></i>
1136 </a>
1137
1138 @if (!(nextID == currentID || nextID == 0))
1139 {
1140 var forward = "/Default.aspx?ID=" + nextID;
1141 <a href="@forward" class="page-navigation__item">
1142 <label class="page-navigation__item-label">@Translate("pagenavigation.next", "Next")</label>
1143 <i class="fal fa-arrow-alt-to-right page-navigation__item--icon"></i>
1144 </a>
1145 }
1146
1147 </section>
1148
1149 }
1150
1151 }
1152 else
1153 {
1154 // No action
1155 }
1156
1157 }
1158
1159 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>>
1160 @using Dynamicweb;
1161
1162 @if (Pageview.Page.ParentPageId > 0)
1163 {
1164 var siblings = Dynamicweb.Services.Pages.GetPagesByParentID(Pageview.Page.ParentPageId).Where(p => p.Active).ToList();
1165 var parentpageItemType = Pageview.Page.Parent.ItemType;
1166 bool isParentPageOverviewpage = parentpageItemType == "OverviewPage";
1167
1168 if (siblings.Count() > 1 && isParentPageOverviewpage)
1169 {
1170 var prevPage = siblings.OrderByDescending(p => p.Sort).FirstOrDefault(p => p.Sort < Pageview.Page.Sort);
1171 var nextPage = siblings.OrderBy(p => p.Sort).FirstOrDefault(p => p.Sort > Pageview.Page.Sort);
1172 var overview = "/Default.aspx?ID=" + Pageview.Page.ParentPageId;
1173
1174 <section class="page-navigation">
1175 @if (prevPage != null)
1176 {
1177 var back = "/Default.aspx?ID=" + prevPage.ID;
1178 <a href="@back" class="page-navigation__item">
1179 <i class="fal fa-arrow-alt-to-left page-navigation__item--icon"></i>
1180 <label class="page-navigation__item-label">@Translate("pagenavigation.previous", "Previous")</label>
1181 </a>
1182 }
1183
1184 <a href="@overview" class="page-navigation__item">
1185 <label class="page-navigation__item-label">@Translate("pagenavigation.Overview", "To overview")</label>
1186 <i class="fas fa-th page-navigation__item--icon"></i>
1187 </a>
1188
1189 @if (nextPage != null)
1190 {
1191 var forward = "/Default.aspx?ID=" + nextPage.ID;
1192 <a href="@forward" class="page-navigation__item">
1193 <label class="page-navigation__item-label">@Translate("pagenavigation.next", "Next")</label>
1194 <i class="fal fa-arrow-alt-to-right page-navigation__item--icon"></i>
1195 </a>
1196 }
1197 </section>
1198 }
1199 }
1200
1201 *@
1202
1203
1204
1205 @if (!hideFooter)
1206 {
1207 <footer>@MasterLayoutPageObj.Footer</footer>
1208 }
1209
1210 @if (isVisualEditor && IsNotContentManager)
1211 {
1212 <nav class="footer-layout">
1213 @AdvancedGridServices.RenderVisualEditorNavigation(DataTableObj, "footer")
1214 </nav>
1215
1216 <style>
1217 .footer-layout {
1218 position: absolute;
1219 bottom: 25px;
1220 }
1221 </style>
1222 }
1223
1224 @if (!string.IsNullOrWhiteSpace(footer__top_image) && HideStandardFooter == false)
1225 {
1226 <figure class="footer__top-image">
1227 <img src="@footer__top_image" alt="" />
1228 </figure>
1229 }
1230
1231 @if (HideStandardFooter == false || !hideFooter)
1232 {
1233
1234 <footer class="footer" style="--footer-bg-color: @footer__background_color; --footer-color: @footer__color;">
1235
1236 @if (footer__USP_display)
1237 {
1238 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))
1239 {
1240 <div class="footer-usp__wrapper">
1241 <div class="container">
1242 <ul class="footer-usp__list flex-wrap">
1243 @RenderFooterUSP(BaseSettings.USP.USP_1, BaseSettings.USP.USP_1_icon)
1244 @RenderFooterUSP(BaseSettings.USP.USP_2, BaseSettings.USP.USP_2_icon)
1245 @RenderFooterUSP(BaseSettings.USP.USP_3, BaseSettings.USP.USP_3_icon)
1246 @RenderFooterUSP(BaseSettings.USP.USP_4, BaseSettings.USP.USP_4_icon)
1247 @RenderFooterUSP(BaseSettings.USP.USP_5, BaseSettings.USP.USP_5_icon)
1248
1249 </ul>
1250 </div>
1251 </div>
1252 }
1253 }
1254
1255 @if (footer__newsletter_signup_display)
1256 {
1257 <div>
1258 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel>
1259 @using Dynamicweb;
1260
1261 @{
1262 var newsletterFormID = ModuleOnlyParagraph.GetParagraphIDByTag<ModuleOnlyParagraph>("Footer.Newsletter", Pageview.AreaID);
1263
1264 if (newsletterFormID > 0)
1265 {
1266 <section class="footer__newsletter-container">
1267 <div class="container footer__newsletter">
1268 <label class="footer__newsletter-label">
1269 @Translate("Footer.SignUpNewsletter", "Sign up for the digital newsletter")
1270 </label>
1271 @RenderParagraphContent(newsletterFormID)
1272 </div>
1273 </section>
1274 }
1275 }
1276
1277 </div>
1278 }
1279
1280 @if (!string.IsNullOrWhiteSpace(mc.FooterConfiguration.BackgroundGradient))
1281 {
1282 <style>
1283 .footer {
1284 @mc.FooterConfiguration.BackgroundGradient;
1285 }
1286 </style>
1287 }
1288
1289 <section class="container footer__content">
1290
1291 <div class="footer__link">
1292 @{
1293 var footerColumnOneNavigationSettings = new NavigationSettings();
1294 footerColumnOneNavigationSettings.ExpandMode = ExpandMode.All;
1295 footerColumnOneNavigationSettings.StartLevel = 1;
1296 footerColumnOneNavigationSettings.StopLevel = 4;
1297 footerColumnOneNavigationSettings.RootNavigationTag = "footer-column-1";
1298 var footerColumnOneNavigation = Navigation.RenderNavigation("Navigation/BottomNavigation.cshtml", footerColumnOneNavigationSettings);
1299
1300 if (!string.IsNullOrEmpty(footerColumnOneNavigation))
1301 {
1302 <p class="footer__link-header">@Translate("Footer.Column1.Header", "What you need to know")</p>
1303 @footerColumnOneNavigation
1304 }
1305 }
1306 </div>
1307 <div class="footer__link">
1308 @{
1309 var footerColumnTwoNavigationSettings = new NavigationSettings();
1310 footerColumnTwoNavigationSettings.ExpandMode = ExpandMode.All;
1311 footerColumnTwoNavigationSettings.StartLevel = 1;
1312 footerColumnTwoNavigationSettings.StopLevel = 4;
1313 footerColumnTwoNavigationSettings.RootNavigationTag = "footer-column-2";
1314 var footerColumnTwoNavigation = Navigation.RenderNavigation("Navigation/BottomNavigation.cshtml", footerColumnTwoNavigationSettings);
1315
1316 if (!string.IsNullOrEmpty(footerColumnTwoNavigation))
1317 {
1318 <p class="footer__link-header">@Translate("Footer.Column2.Header", "Category two")</p>
1319 @footerColumnTwoNavigation
1320 }
1321 }
1322 </div>
1323 <div class="footer__link">
1324 @{
1325 var footerColumnThreeNavigationSettings = new NavigationSettings();
1326 footerColumnThreeNavigationSettings.ExpandMode = ExpandMode.All;
1327 footerColumnThreeNavigationSettings.StartLevel = 1;
1328 footerColumnThreeNavigationSettings.StopLevel = 4;
1329 footerColumnThreeNavigationSettings.RootNavigationTag = "footer-column-3";
1330 var footerColumnThreeNavigation = Navigation.RenderNavigation("Navigation/BottomNavigation.cshtml", footerColumnThreeNavigationSettings);
1331
1332 if (!string.IsNullOrEmpty(footerColumnThreeNavigation))
1333 {
1334 <p class="footer__link-header">@Translate("Footer.Column3.Header", "Category three")</p>
1335 @footerColumnThreeNavigation
1336 }
1337 }
1338 </div>
1339
1340 @if (!string.IsNullOrWhiteSpace(footerLogo) || !string.IsNullOrWhiteSpace(footerDescription))
1341 {
1342 <div class="footer__description-container">
1343 @if (!string.IsNullOrWhiteSpace(footerLogo))
1344 {
1345 <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" />
1346 }
1347
1348 @if (!string.IsNullOrWhiteSpace(footerDescription))
1349 {
1350 <div class="footer__description">
1351 @footerDescription
1352 </div>
1353 }
1354 </div>
1355 }
1356
1357 </section>
1358
1359 <section class="footer__copyright">
1360
1361 <div class="container bottombar__container">
1362 @{
1363 var copyRightMenuNavigationSettings = new NavigationSettings();
1364 copyRightMenuNavigationSettings.ExpandMode = ExpandMode.All;
1365 copyRightMenuNavigationSettings.StartLevel = 1;
1366 copyRightMenuNavigationSettings.StopLevel = 4;
1367 copyRightMenuNavigationSettings.RootNavigationTag = "bottombar";
1368 var copyRightMenuNavigation = Navigation.RenderNavigation("Navigation/CleanNavigation.cshtml", copyRightMenuNavigationSettings);
1369
1370 if (!string.IsNullOrEmpty(copyRightMenuNavigation))
1371 {
1372 @copyRightMenuNavigation;
1373 }
1374 }
1375
1376 @if (!string.IsNullOrWhiteSpace(twitter) || !string.IsNullOrWhiteSpace(fb) || !string.IsNullOrWhiteSpace(linkedin) || !string.IsNullOrWhiteSpace(youtube) || !string.IsNullOrWhiteSpace(instagram) || !string.IsNullOrWhiteSpace(pinterest))
1377 {
1378 <section class="footer__social-container">
1379
1380 <span class="footer__icon-labels">@Translate("Footer.FollowUs", "Volg ons op:")</span>
1381
1382 <div class="footer__social-icon-container">
1383 @if (!string.IsNullOrWhiteSpace(twitter))
1384 {
1385 <a href="@twitter" target="_blank" title="twitter" class="footer__social" rel="noreferrer"><i class="fab fa-twitter"></i></a>
1386 }
1387 @if (!string.IsNullOrWhiteSpace(fb))
1388 {
1389 <a href="@fb" target="_blank" title="facebook" class="footer__social" rel="noreferrer"><i class="fab fa-facebook-square"></i></a>
1390 }
1391 @if (!string.IsNullOrWhiteSpace(linkedin))
1392 {
1393 <a href="@linkedin" target="_blank" title="LinkedIn" class="footer__social" rel="noreferrer"><i class="fab fa-linkedin"></i></a>
1394 }
1395 @if (!string.IsNullOrWhiteSpace(youtube))
1396 {
1397 <a href="@youtube" target="_blank" title="YouTube" class="footer__social" rel="noreferrer"><i class="fab fa-youtube"></i></a>
1398 }
1399 @if (!string.IsNullOrWhiteSpace(instagram))
1400 {
1401 <a href="@instagram" target="_blank" title="Instagram" class="footer__social" rel="noreferrer"><i class="fab fa-instagram"></i></a>
1402 }
1403 @if (!string.IsNullOrWhiteSpace(pinterest))
1404 {
1405 <a href="@pinterest" target="_blank" title="Pinterest" class="footer__social" rel="noreferrer"><i class="fab fa-pinterest"></i></a>
1406 }
1407 </div>
1408
1409 </section>
1410 }
1411 </div>
1412
1413 </section>
1414
1415 <section class="footer-paymentoptions" data-paymentmethods="@selectedPaymentLogos"></section>
1416 </footer>
1417
1418 }
1419
1420 @helper RenderFooterUSP(string USP_content, string USP_icon)
1421 {
1422 if (!string.IsNullOrWhiteSpace(USP_content))
1423 {
1424 var usp_icon_class = (!string.IsNullOrWhiteSpace(USP_icon)) ? USP_icon : "fal fa-check";
1425
1426 <li class="footer-usp__item">
1427 <i class="@usp_icon_class footer-usp__icon"></i>
1428 <span>@USP_content</span>
1429 </li>
1430 }
1431 }
1432
1433 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel>
1434 @using Dynamicweb;
1435 @using Dynamicweb.Content.Items;
1436 @using Bluedesk.DynamicWeb.ItemTypes;
1437
1438 @{
1439 var colorService = new ColorSwatchService();
1440 bool displayPrices = mc.EcomConfiguration.HidePricesForGuests ? Pageview.User != null : true;
1441 string ShowZeroPrices = (!mc.EcomConfiguration.HideZeroPrices).ToString().ToLower();
1442
1443 var homepage = Dynamicweb.Services.Pages.GetRootPagesForArea(Pageview.AreaID).FirstOrDefault(p => p.ItemType == "HomePage" && p.Active) ?? Dynamicweb.Services.Pages.GetFirstPageForArea(Pageview.AreaID);
1444
1445 var bottomBarItemsList = new List<object>();
1446 foreach (var _item in mc.FooterConfiguration.BottombarItemList)
1447 {
1448 string title = _item.Title;
1449 string link = _item.TargetLink;
1450
1451 if (_item.Type == "login" && Pageview.User != null)
1452 {
1453 title = @Translate("Bottombar.Logout", "Logout");
1454 link = $"/Admin/Public/ExtranetLogoff.aspx?ID={homepage.ID}";
1455 }
1456
1457 var newItem = new
1458 {
1459 title = title,
1460 icon = _item.Icon,
1461 link = link,
1462 subtitle = _item.Title,
1463 type = _item.Type,
1464 visible = true
1465 };
1466 bottomBarItemsList.Add(newItem);
1467 }
1468 var allBottomBarItems = bottomBarItemsList.ToArray();
1469 string bottomBarItemsJson = Newtonsoft.Json.JsonConvert.SerializeObject(allBottomBarItems).Replace("\"", "\'");
1470
1471 string BottombarBackgroundColor = mc.FooterConfiguration.BottombarBackgroundColor;
1472 if (!string.IsNullOrWhiteSpace(BottombarBackgroundColor))
1473 {
1474 BottombarBackgroundColor = !BottombarBackgroundColor.Contains("#") ? colorService.GetHexColor(Pageview.AreaID, BottombarBackgroundColor) : BottombarBackgroundColor;
1475 }
1476
1477 string BottombarTextColor = mc.FooterConfiguration.BottombarTextColor;
1478 if (!string.IsNullOrWhiteSpace(BottombarTextColor))
1479 {
1480 BottombarTextColor = !BottombarTextColor.Contains("#") ? colorService.GetHexColor(Pageview.AreaID, BottombarTextColor) : BottombarTextColor;
1481 }
1482
1483 string BottombarIconColor = mc.FooterConfiguration.BottombarIconColor;
1484 if (!string.IsNullOrWhiteSpace(BottombarIconColor))
1485 {
1486 BottombarIconColor = !BottombarIconColor.Contains("#") ? colorService.GetHexColor(Pageview.AreaID, BottombarIconColor) : BottombarIconColor;
1487 }
1488 }
1489
1490 <style>
1491 .bottombar {
1492 background-color: @BottombarBackgroundColor;
1493 }
1494 .bottombar__button span {
1495 color: @BottombarTextColor;
1496 }
1497 .bottombar__button [class^=fa],
1498 .bottombar__button [class^=svg-] {
1499 color: @BottombarIconColor;
1500 }
1501 </style>
1502
1503 @if (!hideBottombar)
1504 {
1505 <section id="vue-modal"
1506 data-show-prices="@displayPrices.ToString().ToLower()"
1507 data-show-zero-prices="@ShowZeroPrices">
1508 </section>
1509
1510 <section id="vue-bottom-bar"
1511 data-items="@bottomBarItemsJson"
1512 data-phonenumber="@formattedPhonenumber"
1513 data-isoffline="@isOffline"
1514 data-emailadress="@emailadress"
1515 data-currentpageid="@homepage.ID"
1516 data-enable-login="@enableLogin"
1517 data-enable-shoppingcart="@enableShoppingCart"
1518 data-enable-advancedsearch="@enableAdvancedSearch"></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