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