Error executing template "Designs/ProNails_generated/_parsed/WebshopPage.parsed.cshtml"
System.Data.SqlClient.SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) ---> System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified
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_7590efad26f244098d86bf6e0f4d8373.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:00000000-0000-0000-0000-000000000000
Error Number:2,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.Active)
215 {
216 pageTranslations.Add(language);
217 }
218 }
219 }
220 }
221 else
222 {
223 pageTranslations.Add(Pageview.Page.MasterPage);
224 if (Pageview.Page.MasterPage != null)
225 {
226 if (Pageview.Page.MasterPage.Languages != null)
227 {
228 foreach (var language in Pageview.Page.MasterPage.Languages)
229 {
230 if (language.Active)
231 {
232 pageTranslations.Add(language);
233 }
234 }
235 }
236 }
237 }
238 foreach (var page in pageTranslations)
239 {
240 if (page != null)
241 {
242 string url = $"Default.aspx?ID={page.ID}";
243 string groupid = Dynamicweb.Context.Current.Request.QueryString.Get("GroupID");
244 string productid = Dynamicweb.Context.Current.Request.QueryString.Get("ProductID");
245 string variantid = Dynamicweb.Context.Current.Request.QueryString.Get("VariantID");
246 if (!string.IsNullOrWhiteSpace(groupid))
247 {
248 var groupObj = Dynamicweb.Ecommerce.Services.ProductGroups.GetGroup(groupid, page.Area.EcomLanguageId);
249 if (groupObj == null)
250 {
251 continue;
252 }
253 url = $"{url}&GroupID={groupid}";
254 }
255 if (!string.IsNullOrWhiteSpace(productid))
256 {
257 var productObj = Dynamicweb.Ecommerce.Services.Products.GetProductById(productid, variantid, page.Area.EcomLanguageId);;
258 if (productObj == null)
259 {
260 continue;
261 }
262 url = $"{url}&ProductID={productid}";
263 if (!string.IsNullOrWhiteSpace(variantid))
264 {
265 url = $"{url}&VariantID={variantid}";
266 }
267 }
268
269 string currentdomain = Context.Current.Request.Url.DnsSafeHost;
270 if (!string.IsNullOrEmpty(page.Area.DomainLock)) {
271 currentdomain = page.Area.DomainLock;
272 }
273 string friendlyUrl = Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(url);
274 string href = $"{urlProtocol}://{currentdomain}{friendlyUrl}";
275 string hreflang = page.Area.CultureInfo.Name.ToLower();
276 <link rel="alternate" href="@href" hreflang="@hreflang" />
277 }
278 }
279 }
280
281
282 <link rel="preconnect" href="https://fonts.googleapis.com">
283 <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
284 <link href="@appcss" rel="stylesheet" type="text/css" />
285
286 @{
287 if (!string.IsNullOrWhiteSpace(favicon32))
288 {
289 <link rel="icon" type="image/png" sizes="32x32" href="@favicon32">
290 }
291 if (!string.IsNullOrWhiteSpace(favicon16))
292 {
293 <link rel="icon" type="image/png" sizes="16x16" href="@favicon16">
294 }
295 if (!string.IsNullOrWhiteSpace(favicon))
296 {
297 <link rel="shortcut icon" href="@favicon">
298 }
299 }
300
301 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>>
302 @using System;
303 @using System.Web;
304 @using System.Linq;
305 @using System.Globalization;
306
307 @using Dynamicweb;
308 @using Dynamicweb.Content.Items;
309 @using Dynamicweb.Environment;
310 @using Dynamicweb.Frontend;
311 @using Dynamicweb.Frontend.Navigation;
312
313 @using Bluedesk.Tools.Generic;
314
315 @using Bluedesk.DynamicWeb.ItemTypes;
316 @using Bluedesk.DynamicWeb.ItemTypes.Settings;
317 @using Bluedesk.DynamicWeb.ItemTypes.Settings.Configuration;
318
319 @using Bluedesk.DynamicWeb.ItemTypes.Configuration;
320 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution;
321 @using Bluedesk.DynamicWeb.ItemTypes.Extensions;
322
323 @helper RenderCSSKeyAndValue(string Key, string Value)
324 {
325 if (!string.IsNullOrWhiteSpace(Value))
326 {
327 <text>@Key : @Value !important;</text>
328 }
329 }
330
331 @helper SetFontCSSVariables(FontConfigurationItemTab FontConfiguration)
332 {
333
334 string Top = FontConfiguration.top != 0 ? FontConfiguration.top.ToString() + "px" : "";
335 string Left = FontConfiguration.left != 0 ? FontConfiguration.left.ToString() + "px" : "";
336 string Right = FontConfiguration.right != 0 ? FontConfiguration.right.ToString() + "px" : "";
337 string Bottom = FontConfiguration.bottom != 0 ? FontConfiguration.bottom.ToString() + "px" : "";
338
339 string Position = FontConfiguration.PositionAbsolute ? "absolute" : "relative";
340
341 string Color = FontConfiguration.Color?.GetColorCode(Pageview.AreaID) ?? "";
342 string BackgroundColor = FontConfiguration.Backgroundcolor?.GetColorCode(Pageview.AreaID) ?? "";
343
344 string BorderColor = FontConfiguration.BorderColor?.GetColorCode(Pageview.AreaID) ?? "";
345 string BorderSize = FontConfiguration.BorderSize != 0 ? FontConfiguration.BorderSize.ToString() + "px" : "";
346
347 <text>
348
349 --Position: @Position;
350
351 @RenderCSSKeyAndValue("--Padding", FontConfiguration.Padding)
352
353 @RenderCSSKeyAndValue("--Top", Top)
354 @RenderCSSKeyAndValue("--Left", Left)
355 @RenderCSSKeyAndValue("--Right", Right)
356 @RenderCSSKeyAndValue("--Bottom", Bottom)
357
358 @RenderCSSKeyAndValue("--Color", Color)
359 @RenderCSSKeyAndValue("--FontSize", FontConfiguration.FontSize)
360 @RenderCSSKeyAndValue("--FontStyle", FontConfiguration.FontStyle)
361
362 @RenderCSSKeyAndValue("--FontWeight", FontConfiguration.FontWeight)
363 @RenderCSSKeyAndValue("--FontFamily", FontConfiguration.FontConfiguration.FontFamily)
364 @RenderCSSKeyAndValue("--LineHeight", FontConfiguration.LineHeight)
365
366 @RenderCSSKeyAndValue("--BackgroundColor", BackgroundColor)
367 @RenderCSSKeyAndValue("--BorderColor", BorderColor)
368 @RenderCSSKeyAndValue("--BorderSize", BorderSize)
369
370 </text>
371
372 }
373
374
375 <script>
376 window.globals = {
377 pageId: '@Pageview.ID',
378 Token: '@csrftoken',
379 DW_AREA_CULTURE: '@langName',
380 DW_AREA_CULTURE_SHORT: '@lang',
381 globalIconClass: '@buttonIconClass',
382 DW_USERID: '@Dynamicweb.Security.UserManagement.User.GetCurrentExtranetUserId()',
383 isEcomOverview: @jsIsOverviewPage,
384 DW_SHOW_PRICES_WITH_VAT: @ecomShowPricesWithVat,
385 DW_PRICES_FORMATTED: @ecomPricesFormatted,
386 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().Replace("--Color: ;", "");
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 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel>
828 @using System.Linq;
829 @using System.Data;
830 @using Dynamicweb;
831 @using Dynamicweb.Content;
832 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution.Frontend;
833 @using Bluedesk.DynamicWeb.ItemTypes;
834 @using Bluedesk.DynamicWeb.ItemTypes.Configuration;
835 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution;
836
837 @{
838 var corporate_settings = Dynamicweb.Services.Pages.GetPageByNavigationTag(Pageview.AreaID, "CorporateSettingsPage");
839 CorporateSettingsPage cs = corporate_settings.Item.ToCodeFirstItem<CorporateSettingsPage>();
840 var bannerActive = cs.BannerActive;
841 var bannerText = cs.BannerText;
842 var bannerTextColor = cs.BannerTextColor;
843 var bannerBackgroundColor = cs.BannerBackgroundColor;
844 var bannerLink = cs.BannerLink;
845
846 if (string.IsNullOrEmpty(bannerBackgroundColor))
847 {
848 bannerBackgroundColor = "#FFFFFF";
849 }
850 if (string.IsNullOrEmpty(bannerTextColor))
851 {
852 bannerTextColor = "#000000";
853 }
854 }
855
856 @if (bannerActive)
857 {
858 <div class="campaign-banner" style="--campaign-bg-color: @bannerBackgroundColor; --campaign-text-color: @bannerTextColor;">
859 <div class="campaign-banner__container">
860 @if(!string.IsNullOrWhiteSpace(bannerLink))
861 {
862 <a href="@bannerLink" class="campaign-banner__link">
863 <span class="campaign-banner__text">@bannerText</span>
864 </a>
865 }
866 else
867 {
868 <span class="campaign-banner__text">@bannerText</span>
869 }
870 <button class="campaign-banner__close">
871 <i class="fa fa-times" aria-hidden="true"></i>
872 </button>
873 </div>
874 </div>
875 }
876
877
878 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel>
879
880 @using System.Linq;
881 @using System.Data;
882
883 @using Dynamicweb;
884 @using Dynamicweb.Content;
885 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution.Frontend;
886
887 @{
888
889 DataTable DataTableObj = AdvancedGridServices.GetHeaderGridDataTable(Pageview.AreaID, Pageview.Page.ID);
890
891 WrapperObj Header = AdvancedGridServices.RenderWrapper(DataTableObj, "header", "header", Pageview.AreaID, Pageview.Page.ID);
892 WrapperObj Footer = AdvancedGridServices.RenderWrapper(DataTableObj, "footer", "footer", Pageview.AreaID, Pageview.Page.ID);
893
894 // var homepage = Dynamicweb.Services.Pages.GetRootPagesForArea(Pageview.AreaID).FirstOrDefault(p => p.ItemType == "HomePage" && p.Active) ?? Dynamicweb.Services.Pages.GetFirstPageForArea(Pageview.AreaID);
895
896 MasterLayoutPageObj MasterLayoutPageObj = MasterLayoutControllers.RenderMasterLayoutPageObj(Pageview);
897
898 bool userLoggedIn = false;
899 if (enableLogin) { userLoggedIn = Pageview.User == null ? false : true; }
900
901 string HeaderContainerSize = mc.HeaderConfiguration.ContainerSize != 0 ? mc.HeaderConfiguration.ContainerSize + "px" : "auto";
902
903 }
904
905 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel>
906 @using Dynamicweb;
907 @using Dynamicweb.Content.Items;
908
909 <script>
910
911 function setImagesSizes(Classname) {
912 var Images = document.querySelectorAll(Classname);
913 for (var index = 0; index < Images.length; index++) {
914 if (!Images[index].hasAttribute("height")) {
915 Images[index].setAttribute("height", Images[index].offsetHeight);
916 }
917 if (!Images[index].hasAttribute("width")) {
918 Images[index].setAttribute("width", Images[index].offsetWidth);
919 }
920 }
921 }
922
923 window.addEventListener('load', function () {
924 setImagesSizes("img");
925 setImagesSizes(".mc-header__logo-image");
926 });
927
928 </script>
929
930
931 @if (!hideHeader)
932 {
933 <header>@MasterLayoutPageObj.Header</header>
934
935 <!-- DO NOT REMOVE -->
936 <div id="quick-order"></div>
937 <div id="backdrop-megamenu"></div>
938 <mega-menu id="mega-menu"></mega-menu>
939 <!-- DO NOT REMOVE -->
940 }
941
942 @if (isVisualEditor && IsNotContentManager)
943 {
944 @AdvancedGridServices.RenderVisualEditorNavigation(DataTableObj, "header")
945 }
946
947 <style>@MasterLayoutPageObj.CSS</style>
948
949 <style>
950
951
952 .visual-editor__navigation {
953 position: absolute;
954 top: 10px;
955 left: 10px;
956 display: flex;
957 flex-direction: row;
958 z-index: 100000000;
959 }
960
961 .visual-editor__button {
962 height: 50px;
963 min-width: 150px;
964 right: auto;
965 left: auto;
966 background-color: white;
967 box-shadow: -10px 10px 10px rgb(28 28 84 / 25%);
968 display: flex;
969 justify-content: center;
970 align-items: center;
971 padding: 25px;
972 margin-right: 25px;
973 }
974
975 .visual-editor__button-icon {
976 margin-right: 25px;
977 }
978
979 .header {
980 --HeaderContainerDisplay: none;
981 }
982
983 .header__container {
984 padding: 0;
985 }
986
987 .header__container, .header__stickyheader-container {
988 max-width: none;
989 }
990
991 .header .AdvancedGrid__container {
992 max-width: @HeaderContainerSize;
993 margin: 0 auto;
994 }
995
996 .header .AdvancedGrid__column {
997 background-color: var(--BackgroundColor);
998 flex-grow: var(--FlexGrow);
999 }
1000
1001 .AdvancedGrid__row {
1002 align-items: center;
1003 }
1004 </style>
1005
1006 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>>
1007 @using Dynamicweb;
1008 @using Bluedesk.DynamicWeb.ItemTypes;
1009
1010 @{
1011 var pid = ModuleOnlyParagraph.GetParagraphIDByTag<ModuleOnlyParagraph>("SideBarForm", Pageview.AreaID);
1012
1013 if (pid > 0)
1014 {
1015 <section id="vue-side-bar-form" data-paragraphid="@pid" data-telephone="@phonenumber" data-formatphonenumber="@formattedPhonenumber" data-isoffline="@isOffline"></section>
1016 }
1017 }
1018
1019
1020 @if (@enableProductCompare)
1021 {
1022 <div id="vue-compare-list"></div>
1023 }
1024
1025 @Model.Grid("grid", "Before breadcrumb", "", "AdvancedGrid")
1026
1027 @if (showBreadcrumbs && !isOverviewPage)
1028 {
1029 var navigationSettings = new NavigationSettings();
1030 navigationSettings.ExpandMode = ExpandMode.PathOnly;
1031 navigationSettings.StartLevel = 1;
1032 navigationSettings.StopLevel = 99;
1033 navigationSettings.Parameters.Add("PageTitle", Model.Title);
1034 navigationSettings.IncludeFoldersAndHidden = true;
1035
1036 @Navigation.RenderNavigation("Navigation/Breadcrumbs.cshtml", navigationSettings)
1037
1038 }
1039
1040 @Model.Grid("grid2", "After breadcrumb", "", "AdvancedGrid")
1041
1042 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel>
1043 @using Dynamicweb;
1044 @using Bluedesk.DynamicWeb.ItemTypes;
1045 @using Bluedesk.DynamicWeb.ItemTypes.Extensions;
1046 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution.Frontend;
1047
1048 @{
1049
1050 string footerLogo = BaseSettings.BrandConfiguration.Logos.FooterLogo;
1051 string footerDescription = BaseSettings.CorporateSettings.FooterDescription;
1052
1053 var fb = BaseSettings.SocialMedia.Facebook;
1054 var twitter = BaseSettings.SocialMedia.Twitter;
1055 var linkedin = BaseSettings.SocialMedia.LinkedIn;
1056 var instagram = BaseSettings.SocialMedia.Instagram;
1057 var youtube = BaseSettings.SocialMedia.Youtube;
1058 var pinterest = BaseSettings.SocialMedia.Pinterest ?? "";
1059
1060 var companyName = BaseSettings.CorporateSettings.CompanyName;
1061 var Emailadress = BaseSettings.CorporateSettings.Emailadress;
1062 var Phonenumber = BaseSettings.CorporateSettings.Phonenumber;
1063 var Address = BaseSettings.CorporateSettings.Address;
1064 var Zipcode = BaseSettings.CorporateSettings.Zipcode;
1065 var City = BaseSettings.CorporateSettings.City;
1066 var Country = BaseSettings.CorporateSettings.Country;
1067
1068 var selectedPaymentLogos = BaseSettings.BrandConfiguration.Logos.FooterPaymentLogos;
1069
1070 bool footer__newsletter_signup_display = !string.IsNullOrWhiteSpace(mc.FooterConfiguration.NewsLetterSignUpDisplay.ToString()) && mc.FooterConfiguration.NewsLetterSignUpDisplay.ToString() == "True" ? true : false;
1071 bool footer__USP_display = !string.IsNullOrWhiteSpace(mc.FooterConfiguration.UspDisplay.ToString()) && mc.FooterConfiguration.UspDisplay.ToString() == "True" ? true : false;
1072
1073 string footer__background_color = mc.FooterConfiguration.BackgroundColor?.GetColorCode(Pageview.AreaID) ?? "#000000";
1074 string footer__color = mc.FooterConfiguration.Color?.GetColorCode(Pageview.AreaID) ?? "#FFFFFF";
1075
1076 string footer__top_image = !string.IsNullOrWhiteSpace(mc.FooterConfiguration.TopImage.ToString()) ? mc.FooterConfiguration.TopImage.ToString() : "";
1077
1078
1079
1080 }
1081
1082 <div id="scroll-to-top" class="scroll-to-top" aria-label="@Translate("Naar boven", "To Top")">
1083 <span class="scroll-to-top__text">
1084 @Translate("Naar boven", "To Top")
1085 </span>
1086 <i class="fal fa-arrow-to-top scroll-to-top__icon"></i>
1087 </div>
1088
1089 @if (Pageview.Page.ParentPageId > 0)
1090 {
1091 var siblings = Dynamicweb.Services.Pages.GetPagesByParentID(Pageview.Page.ParentPageId).Where(p => p.Active).ToList();
1092 var parentpageItemType = Pageview.Page.Parent.ItemType;
1093 bool isParentPageOverviewpage = parentpageItemType == "OverviewPage";
1094
1095 if (siblings.Count() > 1 && isParentPageOverviewpage)
1096 {
1097 var prevPage = siblings.OrderByDescending(p => p.Sort).FirstOrDefault(p => p.Sort < Pageview.Page.Sort);
1098 var nextPage = siblings.OrderBy(p => p.Sort).FirstOrDefault(p => p.Sort > Pageview.Page.Sort);
1099 var overview = "/Default.aspx?ID=" + Pageview.Page.ParentPageId;
1100
1101 <section class="page-navigation">
1102 @if (prevPage != null)
1103 {
1104 var back = "/Default.aspx?ID=" + prevPage.ID;
1105 <a href="@back" class="page-navigation__item">
1106 <i class="fal fa-arrow-alt-to-left page-navigation__item--icon"></i>
1107 <label class="page-navigation__item-label">@Translate("pagenavigation.previous", "Previous")</label>
1108 </a>
1109 }
1110
1111 <a href="@overview" class="page-navigation__item">
1112 <label class="page-navigation__item-label">@Translate("pagenavigation.Overview", "To overview")</label>
1113 <i class="fas fa-th page-navigation__item--icon"></i>
1114 </a>
1115
1116 @if (nextPage != null)
1117 {
1118 var forward = "/Default.aspx?ID=" + nextPage.ID;
1119 <a href="@forward" class="page-navigation__item">
1120 <label class="page-navigation__item-label">@Translate("pagenavigation.next", "Next")</label>
1121 <i class="fal fa-arrow-alt-to-right page-navigation__item--icon"></i>
1122 </a>
1123 }
1124 </section>
1125 }
1126 }
1127
1128 @*
1129
1130 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel>
1131 @using Dynamicweb;
1132 @using Bluedesk.Tools.DynamicWeb.ExtensionMethods;
1133 @using Bluedesk.DynamicWeb.ItemTypes;
1134
1135 @{
1136
1137 if (Pageview.Page.ParentPageId > 0)
1138 {
1139
1140 // Paging
1141
1142 var siblings = Dynamicweb.Services.Pages.GetPagesByParentID(Pageview.Page.ParentPageId).Where(p => p.Active).ToList();
1143 var currentID = Pageview.Page.ID;
1144 var parentpageItemType = Pageview.Page.Parent.ItemType;
1145 bool isParentPageOverviewpage = parentpageItemType == "OverviewPage";
1146
1147
1148 var siblingsCount = siblings.Count;
1149
1150 int previousIdx = 0;
1151 int nextIdx = siblingsCount - 1;
1152 int idx = 0;
1153
1154 for (int i = 0; i < siblingsCount; i++)
1155 {
1156 if (siblings[i].ID == currentID && siblings[i].PropertyItem != null)
1157 {
1158 idx = i;
1159 }
1160 }
1161
1162 previousIdx = idx == previousIdx ? previousIdx : idx - 1;
1163 nextIdx = idx == nextIdx ? nextIdx : idx + 1;
1164
1165 var previousID = siblings[previousIdx].ID;
1166 var nextID = siblings[nextIdx].ID;
1167 var overview = "/Default.aspx?ID=" + Pageview.Page.ParentPageId;
1168
1169 if (siblingsCount > 1)
1170 {
1171
1172 <section class="page-navigation">
1173
1174 @if (!(previousID == currentID || previousID == 0))
1175 {
1176 var back = "/Default.aspx?ID=" + previousID;
1177 <a href="@back" class="page-navigation__item">
1178 <i class="fal fa-arrow-alt-to-left page-navigation__item--icon"></i>
1179 <label class="page-navigation__item-label">@Translate("pagenavigation.previous", "Previous")</label>
1180 </a>
1181 }
1182
1183 <a href="@overview" class="page-navigation__item">
1184 <label class="page-navigation__item-label">@Translate("pagenavigation.Overview", "To overview")</label>
1185 <i class="fas fa-th page-navigation__item--icon"></i>
1186 </a>
1187
1188 @if (!(nextID == currentID || nextID == 0))
1189 {
1190 var forward = "/Default.aspx?ID=" + nextID;
1191 <a href="@forward" class="page-navigation__item">
1192 <label class="page-navigation__item-label">@Translate("pagenavigation.next", "Next")</label>
1193 <i class="fal fa-arrow-alt-to-right page-navigation__item--icon"></i>
1194 </a>
1195 }
1196
1197 </section>
1198
1199 }
1200
1201 }
1202 else
1203 {
1204 // No action
1205 }
1206
1207 }
1208
1209 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>>
1210 @using Dynamicweb;
1211
1212 @if (Pageview.Page.ParentPageId > 0)
1213 {
1214 var siblings = Dynamicweb.Services.Pages.GetPagesByParentID(Pageview.Page.ParentPageId).Where(p => p.Active).ToList();
1215 var parentpageItemType = Pageview.Page.Parent.ItemType;
1216 bool isParentPageOverviewpage = parentpageItemType == "OverviewPage";
1217
1218 if (siblings.Count() > 1 && isParentPageOverviewpage)
1219 {
1220 var prevPage = siblings.OrderByDescending(p => p.Sort).FirstOrDefault(p => p.Sort < Pageview.Page.Sort);
1221 var nextPage = siblings.OrderBy(p => p.Sort).FirstOrDefault(p => p.Sort > Pageview.Page.Sort);
1222 var overview = "/Default.aspx?ID=" + Pageview.Page.ParentPageId;
1223
1224 <section class="page-navigation">
1225 @if (prevPage != null)
1226 {
1227 var back = "/Default.aspx?ID=" + prevPage.ID;
1228 <a href="@back" class="page-navigation__item">
1229 <i class="fal fa-arrow-alt-to-left page-navigation__item--icon"></i>
1230 <label class="page-navigation__item-label">@Translate("pagenavigation.previous", "Previous")</label>
1231 </a>
1232 }
1233
1234 <a href="@overview" class="page-navigation__item">
1235 <label class="page-navigation__item-label">@Translate("pagenavigation.Overview", "To overview")</label>
1236 <i class="fas fa-th page-navigation__item--icon"></i>
1237 </a>
1238
1239 @if (nextPage != null)
1240 {
1241 var forward = "/Default.aspx?ID=" + nextPage.ID;
1242 <a href="@forward" class="page-navigation__item">
1243 <label class="page-navigation__item-label">@Translate("pagenavigation.next", "Next")</label>
1244 <i class="fal fa-arrow-alt-to-right page-navigation__item--icon"></i>
1245 </a>
1246 }
1247 </section>
1248 }
1249 }
1250
1251 *@
1252
1253
1254
1255 @if (!hideFooter)
1256 {
1257 <footer>@MasterLayoutPageObj.Footer</footer>
1258 }
1259
1260 @if (isVisualEditor && IsNotContentManager)
1261 {
1262 <nav class="footer-layout">
1263 @AdvancedGridServices.RenderVisualEditorNavigation(DataTableObj, "footer")
1264 </nav>
1265
1266 <style>
1267 .footer-layout {
1268 position: absolute;
1269 bottom: 25px;
1270 }
1271 </style>
1272 }
1273
1274 @if (!string.IsNullOrWhiteSpace(footer__top_image) && HideStandardFooter == false)
1275 {
1276 <figure class="footer__top-image">
1277 <img src="@footer__top_image" alt="" />
1278 </figure>
1279 }
1280
1281 @if (HideStandardFooter == false || !hideFooter)
1282 {
1283
1284 <footer class="footer" style="--footer-bg-color: @footer__background_color; --footer-color: @footer__color;">
1285
1286 @if (footer__USP_display)
1287 {
1288 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))
1289 {
1290 <div class="footer-usp__wrapper">
1291 <div class="container">
1292 <ul class="footer-usp__list flex-wrap">
1293 @RenderFooterUSP(BaseSettings.USP.USP_1, BaseSettings.USP.USP_1_icon)
1294 @RenderFooterUSP(BaseSettings.USP.USP_2, BaseSettings.USP.USP_2_icon)
1295 @RenderFooterUSP(BaseSettings.USP.USP_3, BaseSettings.USP.USP_3_icon)
1296 @RenderFooterUSP(BaseSettings.USP.USP_4, BaseSettings.USP.USP_4_icon)
1297 @RenderFooterUSP(BaseSettings.USP.USP_5, BaseSettings.USP.USP_5_icon)
1298
1299 </ul>
1300 </div>
1301 </div>
1302 }
1303 }
1304
1305 @if (footer__newsletter_signup_display)
1306 {
1307 <div>
1308 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel>
1309 @using Dynamicweb;
1310
1311 @{
1312 var newsletterFormID = ModuleOnlyParagraph.GetParagraphIDByTag<ModuleOnlyParagraph>("Footer.Newsletter", Pageview.AreaID);
1313
1314 if (newsletterFormID > 0)
1315 {
1316 <section class="footer__newsletter-container">
1317 <div class="container footer__newsletter">
1318 <label class="footer__newsletter-label">
1319 @Translate("Footer.SignUpNewsletter", "Sign up for the digital newsletter")
1320 </label>
1321 @RenderParagraphContent(newsletterFormID)
1322 </div>
1323 </section>
1324 }
1325 }
1326
1327 </div>
1328 }
1329
1330 @if (!string.IsNullOrWhiteSpace(mc.FooterConfiguration.BackgroundGradient))
1331 {
1332 <style>
1333 .footer {
1334 @mc.FooterConfiguration.BackgroundGradient;
1335 }
1336 </style>
1337 }
1338
1339 <section class="container footer__content">
1340
1341 <div class="footer__link">
1342 @{
1343 var footerColumnOneNavigationSettings = new NavigationSettings();
1344 footerColumnOneNavigationSettings.ExpandMode = ExpandMode.All;
1345 footerColumnOneNavigationSettings.StartLevel = 1;
1346 footerColumnOneNavigationSettings.StopLevel = 4;
1347 footerColumnOneNavigationSettings.RootNavigationTag = "footer-column-1";
1348 var footerColumnOneNavigation = Navigation.RenderNavigation("Navigation/BottomNavigation.cshtml", footerColumnOneNavigationSettings);
1349
1350 if (!string.IsNullOrEmpty(footerColumnOneNavigation))
1351 {
1352 <p class="footer__link-header">@Translate("Footer.Column1.Header", "What you need to know")</p>
1353 @footerColumnOneNavigation
1354 }
1355 }
1356 </div>
1357 <div class="footer__link">
1358 @{
1359 var footerColumnTwoNavigationSettings = new NavigationSettings();
1360 footerColumnTwoNavigationSettings.ExpandMode = ExpandMode.All;
1361 footerColumnTwoNavigationSettings.StartLevel = 1;
1362 footerColumnTwoNavigationSettings.StopLevel = 4;
1363 footerColumnTwoNavigationSettings.RootNavigationTag = "footer-column-2";
1364 var footerColumnTwoNavigation = Navigation.RenderNavigation("Navigation/BottomNavigation.cshtml", footerColumnTwoNavigationSettings);
1365
1366 if (!string.IsNullOrEmpty(footerColumnTwoNavigation))
1367 {
1368 <p class="footer__link-header">@Translate("Footer.Column2.Header", "Category two")</p>
1369 @footerColumnTwoNavigation
1370 }
1371 }
1372 </div>
1373 <div class="footer__link">
1374 @{
1375 var footerColumnThreeNavigationSettings = new NavigationSettings();
1376 footerColumnThreeNavigationSettings.ExpandMode = ExpandMode.All;
1377 footerColumnThreeNavigationSettings.StartLevel = 1;
1378 footerColumnThreeNavigationSettings.StopLevel = 4;
1379 footerColumnThreeNavigationSettings.RootNavigationTag = "footer-column-3";
1380 var footerColumnThreeNavigation = Navigation.RenderNavigation("Navigation/BottomNavigation.cshtml", footerColumnThreeNavigationSettings);
1381
1382 if (!string.IsNullOrEmpty(footerColumnThreeNavigation))
1383 {
1384 <p class="footer__link-header">@Translate("Footer.Column3.Header", "Category three")</p>
1385 @footerColumnThreeNavigation
1386 }
1387 }
1388 </div>
1389
1390 @if (!string.IsNullOrWhiteSpace(footerLogo) || !string.IsNullOrWhiteSpace(footerDescription))
1391 {
1392 <div class="footer__description-container">
1393 @if (!string.IsNullOrWhiteSpace(footerLogo))
1394 {
1395 <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" />
1396 }
1397
1398 @if (!string.IsNullOrWhiteSpace(footerDescription))
1399 {
1400 <div class="footer__description">
1401 @footerDescription
1402 </div>
1403 }
1404 </div>
1405 }
1406
1407 </section>
1408
1409 <section class="footer__copyright">
1410
1411 <div class="container bottombar__container">
1412 @{
1413 var copyRightMenuNavigationSettings = new NavigationSettings();
1414 copyRightMenuNavigationSettings.ExpandMode = ExpandMode.All;
1415 copyRightMenuNavigationSettings.StartLevel = 1;
1416 copyRightMenuNavigationSettings.StopLevel = 4;
1417 copyRightMenuNavigationSettings.RootNavigationTag = "bottombar";
1418 var copyRightMenuNavigation = Navigation.RenderNavigation("Navigation/CleanNavigation.cshtml", copyRightMenuNavigationSettings);
1419
1420 if (!string.IsNullOrEmpty(copyRightMenuNavigation))
1421 {
1422 @copyRightMenuNavigation;
1423 }
1424 }
1425
1426 @if (!string.IsNullOrWhiteSpace(twitter) || !string.IsNullOrWhiteSpace(fb) || !string.IsNullOrWhiteSpace(linkedin) || !string.IsNullOrWhiteSpace(youtube) || !string.IsNullOrWhiteSpace(instagram) || !string.IsNullOrWhiteSpace(pinterest))
1427 {
1428 <section class="footer__social-container">
1429
1430 <span class="footer__icon-labels">@Translate("Footer.FollowUs", "Volg ons op:")</span>
1431
1432 <div class="footer__social-icon-container">
1433 @if (!string.IsNullOrWhiteSpace(twitter))
1434 {
1435 <a href="@twitter" target="_blank" title="twitter" class="footer__social" rel="noreferrer"><i class="fab fa-twitter"></i></a>
1436 }
1437 @if (!string.IsNullOrWhiteSpace(fb))
1438 {
1439 <a href="@fb" target="_blank" title="facebook" class="footer__social" rel="noreferrer"><i class="fab fa-facebook-square"></i></a>
1440 }
1441 @if (!string.IsNullOrWhiteSpace(linkedin))
1442 {
1443 <a href="@linkedin" target="_blank" title="LinkedIn" class="footer__social" rel="noreferrer"><i class="fab fa-linkedin"></i></a>
1444 }
1445 @if (!string.IsNullOrWhiteSpace(youtube))
1446 {
1447 <a href="@youtube" target="_blank" title="YouTube" class="footer__social" rel="noreferrer"><i class="fab fa-youtube"></i></a>
1448 }
1449 @if (!string.IsNullOrWhiteSpace(instagram))
1450 {
1451 <a href="@instagram" target="_blank" title="Instagram" class="footer__social" rel="noreferrer"><i class="fab fa-instagram"></i></a>
1452 }
1453 @if (!string.IsNullOrWhiteSpace(pinterest))
1454 {
1455 <a href="@pinterest" target="_blank" title="Pinterest" class="footer__social" rel="noreferrer"><i class="fab fa-pinterest"></i></a>
1456 }
1457 </div>
1458
1459 </section>
1460 }
1461 </div>
1462
1463 </section>
1464
1465 <section class="footer-paymentoptions" data-paymentmethods="@selectedPaymentLogos"></section>
1466 </footer>
1467
1468 }
1469
1470 @helper RenderFooterUSP(string USP_content, string USP_icon)
1471 {
1472 if (!string.IsNullOrWhiteSpace(USP_content))
1473 {
1474 var usp_icon_class = (!string.IsNullOrWhiteSpace(USP_icon)) ? USP_icon : "fal fa-check";
1475
1476 <li class="footer-usp__item">
1477 <i class="@usp_icon_class footer-usp__icon"></i>
1478 <span>@USP_content</span>
1479 </li>
1480 }
1481 }
1482
1483 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel>
1484 @using Dynamicweb;
1485 @using Dynamicweb.Content.Items;
1486 @using Bluedesk.DynamicWeb.ItemTypes;
1487
1488 @{
1489 var colorService = new ColorSwatchService();
1490 bool displayPrices = mc.EcomConfiguration.HidePricesForGuests ? Pageview.User != null : true;
1491 string ShowZeroPrices = (!mc.EcomConfiguration.HideZeroPrices).ToString().ToLower();
1492
1493 var homepage = Dynamicweb.Services.Pages.GetRootPagesForArea(Pageview.AreaID).FirstOrDefault(p => p.ItemType == "HomePage" && p.Active) ?? Dynamicweb.Services.Pages.GetFirstPageForArea(Pageview.AreaID);
1494
1495 var bottomBarItemsList = new List<object>();
1496 foreach (var _item in mc.FooterConfiguration.BottombarItemList)
1497 {
1498 string title = _item.Title;
1499 string link = _item.TargetLink;
1500
1501 if (_item.Type == "login" && Pageview.User != null)
1502 {
1503 title = @Translate("Bottombar.Logout", "Logout");
1504 link = $"/Admin/Public/ExtranetLogoff.aspx?ID={homepage.ID}";
1505 }
1506
1507 var newItem = new
1508 {
1509 title = title,
1510 icon = _item.Icon,
1511 link = link,
1512 subtitle = _item.Title,
1513 type = _item.Type,
1514 visible = true
1515 };
1516 bottomBarItemsList.Add(newItem);
1517 }
1518 var allBottomBarItems = bottomBarItemsList.ToArray();
1519 string bottomBarItemsJson = Newtonsoft.Json.JsonConvert.SerializeObject(allBottomBarItems).Replace("\"", "\'");
1520
1521 string BottombarBackgroundColor = mc.FooterConfiguration.BottombarBackgroundColor;
1522 if (!string.IsNullOrWhiteSpace(BottombarBackgroundColor))
1523 {
1524 BottombarBackgroundColor = !BottombarBackgroundColor.Contains("#") ? colorService.GetHexColor(Pageview.AreaID, BottombarBackgroundColor) : BottombarBackgroundColor;
1525 }
1526
1527 string BottombarTextColor = mc.FooterConfiguration.BottombarTextColor;
1528 if (!string.IsNullOrWhiteSpace(BottombarTextColor))
1529 {
1530 BottombarTextColor = !BottombarTextColor.Contains("#") ? colorService.GetHexColor(Pageview.AreaID, BottombarTextColor) : BottombarTextColor;
1531 }
1532
1533 string BottombarIconColor = mc.FooterConfiguration.BottombarIconColor;
1534 if (!string.IsNullOrWhiteSpace(BottombarIconColor))
1535 {
1536 BottombarIconColor = !BottombarIconColor.Contains("#") ? colorService.GetHexColor(Pageview.AreaID, BottombarIconColor) : BottombarIconColor;
1537 }
1538 }
1539
1540 <style>
1541 .bottombar {
1542 background-color: @BottombarBackgroundColor;
1543 }
1544 .bottombar__button span {
1545 color: @BottombarTextColor;
1546 }
1547 .bottombar__button [class^=fa],
1548 .bottombar__button [class^=svg-] {
1549 color: @BottombarIconColor;
1550 }
1551 </style>
1552
1553 <section id="vue-modal"
1554 data-show-prices="@displayPrices.ToString().ToLower()"
1555 data-show-zero-prices="@ShowZeroPrices">
1556 </section>
1557
1558 @if (!hideBottombar)
1559 {
1560 <section id="vue-bottom-bar"
1561 data-items="@bottomBarItemsJson"
1562 data-phonenumber="@formattedPhonenumber"
1563 data-isoffline="@isOffline"
1564 data-emailadress="@emailadress"
1565 data-currentpageid="@homepage.ID"
1566 data-enable-login="@enableLogin"
1567 data-enable-shoppingcart="@enableShoppingCart"
1568 data-enable-advancedsearch="@enableAdvancedSearch">
1569 </section>
1570 }
1571
1572 @{
1573 int SearchPageID = Bluedesk.Tools.DynamicWeb.Generic.PageHelper.GetPageIDByNavigationTag("searchresults", Pageview.AreaID);
1574 var SearchPlaceholder = Translate("Searchbox.PlaceholderValue", "Search...");
1575 var SearchPlaceholderHover = Translate("Search.PlaceholderValue2", "Zoekt u misschien een ...?");
1576 var SearchPrefill = Dynamicweb.Context.Current.Request["q"];
1577 var SearchboxClass = !string.IsNullOrWhiteSpace(SearchPrefill) ? "open" : "";
1578 var SearchtoggleClass = !string.IsNullOrWhiteSpace(SearchPrefill) ? "close" : "";
1579 }
1580
1581 <section class="bottombar__searchbox__wrapper">
1582 <form class="searchbox__form" method="get" action="/Default.aspx" style="display: flex; flex-grow: 1;">
1583 <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;" />
1584 <div class="searchbox__button">
1585 <button type="submit" class="searchbox__form__submit icon icon--medium icon__search input__icon" aria-label="Search">
1586 <i class="fal fa-search"></i>
1587 </button>
1588 </div>
1589 <input type="hidden" name="ID" value="@SearchPageID" />
1590 </form>
1591
1592 </section>
1593
1594 @using Dynamicweb.Rendering
1595 @using Dynamicweb.Security.UserManagement
1596
1597 @{
1598 UserImpersonation impersonationMode = User.ImpersonationMode;
1599 User currentUser = Pageview.User;
1600 User secondaryUser = Pageview.User?.CurrentSecondaryUser ?? null;
1601 bool isImpersonating = Pageview.User?.CurrentSecondaryUser != null;
1602 int impersonationPageId = GetPageIdByNavigationTag("CustomerImpersonation");
1603
1604 if(isImpersonating && impersonationMode == UserImpersonation.Full) {
1605 currentUser = Pageview.User.CurrentSecondaryUser;
1606 secondaryUser = Pageview.User;
1607 }
1608 }
1609
1610 @if(currentUser != null && currentUser.GetUsersICanSetAsSecondary().Count > 0)
1611 {
1612 <div class="impersonation">
1613 <div class="impersonation__header">
1614 <p class="impersonation__title">
1615 @Translate("Impersonate.Modal.Title", "Impersonation")
1616 @if (isImpersonating)
1617 {
1618 <span title="On" class="impersonation__indicator"></span>
1619 }
1620 </p>
1621 <i class="fal fa-chevron-up impersonation__header-icon"></i>
1622 </div>
1623 <div class="impersonation__body">
1624 @if (isImpersonating)
1625 {
1626 <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>
1627
1628 <form method="post" name="stopImpersonation">
1629 <input name="DwExtranetRemoveSecondaryUser" id="DwExtranetRemoveSecondaryUser" type="hidden">
1630 <div class="mt-4">
1631 <button class="btn btn__primary" type="submit">
1632 <span class="btn__text">@Translate("Impersonate.StopBtn", "Stop impersonation")</span>
1633 <i class="fas fa-ban btn__icon"></i>
1634 </button>
1635 </div>
1636 </form>
1637 } else {
1638 <p>@Translate("Impersonate.Modal.Content", "Take a look at the list of customers you can impersonate.")</p>
1639 <div class="w-full flex mt-2">
1640 <a href="Default.aspx?ID=@impersonationPageId" class="btn btn__primary">
1641 <span class="btn__text">@Translate("Impersonate.Modal.ViewList", "View List")</span>
1642 <i class="fal fa-chevron-right btn__icon"></i>
1643 </a>
1644 </div>
1645 }
1646 </div>
1647 </div>
1648 }
1649
1650 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel>
1651 @using System;
1652 @using Dynamicweb;
1653 @using Dynamicweb.Ecommerce.CustomerExperienceCenter.Favorites;
1654
1655 @{
1656 var favListService = new FavoriteListService();
1657 IEnumerable<FavoriteList> favoriteLists = Pageview.User != null ? favListService.GetLists(Pageview.User.ID) : null;
1658 int favoritelistsPageId = GetPageIdByNavigationTag("CustomerFavorites");
1659 }
1660
1661 @if(favoriteLists != null && Pageview.User != null)
1662 {
1663 <div class="offcanvas__backdrop" name="favoritelist"></div>
1664 <aside class="offcanvas" data-listcount="@favoriteLists.Count()" name="favoritelist">
1665 <header class="offcanvas__header">
1666 <span class="offcanvas__title">@Translate("OffCanvasMenu.FavoritesTitle", "Add to favorite list")</span>
1667 <button class="offcanvas__close" aria-label="@Translate("OffCanvasMenu.Close", "Close menu")">
1668 <i class="fal fa-times"></i>
1669 </button>
1670 </header>
1671 <div class="offcanvas__body">
1672 <p>@Translate("OffCanvasMenu.FavoritesContent", "Select the list you want to add the product to")</p>
1673 <ul class="favorites__list">
1674 @foreach(FavoriteList list in favoriteLists) {
1675 <li class="favorites__list-item" data-listid="@list.ListId">
1676 <span class="favorites__list-itemname">@list.Name</span>
1677 <i class="fas fa-plus"></i>
1678 </li>
1679 }
1680 </ul>
1681 </div>
1682 <footer class="offcanvas__footer">
1683 <a href="/Default.aspx?ID=@favoritelistsPageId" class="btn btn__primary">
1684 <span class="btn__text">@Translate("OffCanvasMenu.FavoritesManageLists", "Manage lists")</span>
1685 <i class="far fa-chevron-right btn__icon"></i>
1686 </a>
1687 </footer>
1688 </aside>
1689 }
1690
1691 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel>
1692 @using System;
1693 @using Dynamicweb;
1694
1695 @{
1696 string currentWebsiteUrl = Dynamicweb.Environment.Helpers.LinkHelper.GetHttpDomain().Replace("https://", "").Replace("http://", "");
1697 string redirectUrl = "www.pronails.nl";
1698 }
1699
1700 <div class="popup__backdrop" name="language-popup"></div>
1701
1702 <div class="popup popup--content-centered" name="language-popup">
1703 <div class="popup__innerwrapper">
1704 <button class="popup__close languagemodal__close">
1705 <i class="fal fa-times cross"></i>
1706 </button>
1707 <header class="popup__header">
1708 <h2 class="popup__title">@Translate("LanguageSwitchModal.Title", "Hi Beautify Professional")</h2>
1709 </header>
1710 <div class="popup__body">
1711 <p>@string.Format(Translate("LanguageSwitchModal.Current", "Now you've reached the website {0}."), currentWebsiteUrl)</p>
1712 <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>
1713 </div>
1714 <div class="popup__footer">
1715 <a href="@redirectUrl" class="btn btn__contrast popup__btn languagemodal__btn">
1716 <span class="btn__text">@Translate("LanguageSwitchModal.Button", "Yes, I want to switch")</span>
1717 <i class="btn__icon fal fa-chevron-right"></i>
1718 </a>
1719 </div>
1720 </div>
1721 </div>
1722
1723
1724 <div id="backdrop"></div>
1725
1726 <script src="@appbundlejs"></script>
1727 <script defer src="@vuebundlejs"></script>
1728 <script defer src="@appAsyncbundlejs"></script>
1729
1730 @if (font_configuration != null)
1731 {
1732 foreach (var item in font_configuration.Item.ToCodeFirstItem<Bluedesk.DynamicWeb.ItemTypes.Pages.ConfigurationPagesParent>().GetChildConfigs<FontConfiguration>())
1733 {
1734 if (item["FontLink"] != null)
1735 {
1736 string FontName = item["FontName"].ToString().Replace(" ", "");
1737 string cssFile = $"files/Templates/Designs/Backyard/GoogleFont/{FontName}/{FontName}.css";
1738 <link href="@cssFile" rel="stylesheet">
1739 }
1740 }
1741 }
1742
1743 <link rel="stylesheet" href="https://pro.fontawesome.com/releases/v5.15.4/css/all.css" integrity="sha384-rqn26AG5Pj86AF4SO72RK5fyefcQ/x32DNQfChxWvbXIyXFePlEktwD18fEz+kQU" crossorigin="anonymous">
1744
1745 @if (isVisualEditor && IsNotContentManager)
1746 {
1747
1748 <style>
1749 body {
1750 background-color: #f1f1f1;
1751 font-family: 'Barlow', sans-serif;
1752 }
1753
1754 .slidePanel {
1755 position: fixed;
1756 top: 0;
1757 bottom: 0;
1758 min-width: 500px;
1759 box-shadow: -10px 10px 10px rgb(153 153 255 / 10%);
1760 background-color: #FFFFFF;
1761 z-index: 1000;
1762 box-sizing: border-box;
1763 transition: all .5s ease-in;
1764 }
1765
1766 .slidePanel.open {
1767 right: 0;
1768 }
1769
1770 .slidePanel {
1771 right: -500px;
1772 transition: all 0.5s ease-in;
1773 }
1774
1775 .slidePanel__container {
1776 display: flex;
1777 position: relative;
1778 height: 100%;
1779 }
1780
1781 .togglePanelButton {
1782 position: fixed;
1783 top: 50px;
1784 left: 50px;
1785 display: flex;
1786 justify-content: center;
1787 align-items: center;
1788 color: white;
1789 background-color: black;
1790 padding: 0px 25px;
1791 height: 50px;
1792 cursor: pointer;
1793 z-index: 1000;
1794 }
1795
1796 .closeButton {
1797 position: absolute;
1798 display: flex;
1799 top: 25px;
1800 right: 25px;
1801 font-size: 2rem;
1802 text-decoration: none;
1803 color: black;
1804 }
1805
1806 .blur {
1807 filter: blur(4px);
1808 pointer-events: none;
1809 }
1810
1811 .sideMenu {
1812 display: flex;
1813 position: absolute;
1814 align-items: center;
1815 min-height: 100px;
1816 z-index: 1200;
1817 top: 0;
1818 bottom: 0;
1819 right: 100%;
1820 flex-direction: column;
1821 justify-content: center;
1822 }
1823
1824 .sideMenu__link:first-child {
1825 margin-top: 10px;
1826 }
1827
1828 .sideMenu__link {
1829 position: relative;
1830 flex-direction: column;
1831 display: flex;
1832 height: 50px;
1833 width: 50px;
1834 background-color: #f1f1f1;
1835 margin-bottom: 10px;
1836 margin-left: 10px;
1837 margin-right: 10px;
1838 justify-content: space-between;
1839 align-items: center;
1840 font-size: 10px;
1841 padding: 10px;
1842 box-sizing: border-box;
1843 text-decoration: none;
1844 color: rgb(22, 101, 123);
1845 font-size: 24px;
1846 }
1847 .sideMenu__link:hover {
1848 background-color: #c9c9c9;
1849 color: white;
1850 transition: all ease-in 0.5s;
1851 }
1852 .sideMenu__link label {
1853 font-size: 12px;
1854 }
1855
1856 .sideMenu__container {
1857 display: flex;
1858 position: relative;
1859 flex-direction: column;
1860 box-shadow: -10px 10px 10px rgb(153 153 255 / 10%);
1861 background-color: white;
1862 }
1863
1864 .toolbar.close {
1865 display: none;
1866 }
1867
1868 #toolbarVE {
1869 position: fixed !important;
1870 z-index: 100;
1871 background-color: #CCC;
1872 border: 2px solid #F1F1F1;
1873 text-align: center;
1874 right: 0px;
1875 top: 300px;
1876 }
1877
1878 #toolbarVEHeader {
1879 padding: 10px;
1880 cursor: move;
1881 z-index: 10;
1882 background-color: #6e6e6e;
1883 color: #fff;
1884 }
1885 </style>
1886
1887 <div class="toolbarVE" id="toolbar" style="top: 150px; left: auto; width: 70px; position: fixed !important; right: 0px !important; ">
1888 <div id="toolbarVEHeader">
1889 <a href="javascript:void(0);" onclick="toggleClass('.toolbar', 'close');" style="color: #FFF;"><i class="icon fa-light fa-circle-xmark"></i></a>
1890 </div>
1891 <section class="sideMenu__container">
1892 <a href="javascript:history.back();" class="sideMenu__link"><i class="icon fa-light fa-reply"></i></a>
1893 <a href="/dashboard-configuration" class="sideMenu__link"><i class="icon fa-light fa-grid-horizontal"></i></a>
1894 <a href="/button-configuration" class="sideMenu__link"><i class="icon fa-light fa-diagram-cells"></i></a>
1895 <a href="/button-configuration" class="sideMenu__link"><i class="icon fa-light fa-link"></i></a>
1896 <a href="/background-configuration" class="sideMenu__link"><i class="icon fa-light fa-paintbrush"></i></a>
1897 <a href="/jumbotron-configuration" class="sideMenu__link"><i class="icon fa-light fa-megaphone"></i></a>
1898 <a href="/theme-configuration-page/theme-01" class="sideMenu__link"><i class="icon fa-light fa-brush"></i></a>
1899 <a href="/font-configuration" class="sideMenu__link"><i class="icon fa-light fa-font"></i></a>
1900 <a href="/device-manager" class="sideMenu__link"><i class="icon fa-light fa-computer"></i></a>
1901 </section>
1902 </div>
1903
1904 <script>
1905 function toggleClass(ClassName, AddedClassName) {
1906 var element = document.querySelector(ClassName);
1907 if (element.classList.contains(AddedClassName)) {
1908 element.classList.remove(AddedClassName);
1909 } else {
1910 element.classList.add(AddedClassName);
1911 }
1912 }
1913 </script>
1914
1915 <script>
1916 //Make the DIV element draggagle:
1917 dragElement(document.getElementById("toolbar"));
1918
1919 function dragElement(elmnt) {
1920 var pos1 = 0, pos2 = 0, pos3 = 0, pos4 = 0;
1921 if (document.getElementById(elmnt.id + "Header")) {
1922 /* if present, the header is where you move the DIV from:*/
1923 document.getElementById(elmnt.id + "Header").onmousedown = dragMouseDown;
1924 } else {
1925 /* otherwise, move the DIV from anywhere inside the DIV:*/
1926 elmnt.onmousedown = dragMouseDown;
1927 }
1928
1929 function dragMouseDown(e) {
1930 e = e || window.event;
1931 e.preventDefault();
1932 // get the mouse cursor position at startup:
1933 pos3 = e.clientX;
1934 pos4 = e.clientY;
1935 document.onmouseup = closeDragElement;
1936 // call a function whenever the cursor moves:
1937 document.onmousemove = elementDrag;
1938 }
1939
1940 function elementDrag(e) {
1941 e = e || window.event;
1942 e.preventDefault();
1943 // calculate the new cursor position:
1944 pos1 = pos3 - e.clientX;
1945 pos2 = pos4 - e.clientY;
1946 pos3 = e.clientX;
1947 pos4 = e.clientY;
1948 // set the element's new position:
1949 elmnt.style.top = (elmnt.offsetTop - pos2) + "px";
1950 elmnt.style.left = (elmnt.offsetLeft - pos1) + "px";
1951 }
1952
1953 function closeDragElement() {
1954 /* stop moving when mouse button is released:*/
1955 document.onmouseup = null;
1956 document.onmousemove = null;
1957 }
1958 }
1959 </script>
1960
1961 @*<section class="slidePanel" id="slidePanel">
1962
1963 <div class="slidePanel__container">
1964
1965 <a href="javasciprt:void(0);" onclick="toggleClass('.slidePanel', 'open'); toggleClass('main', 'blur')" class="closeButton">
1966 <i class="fal fa-circle-xmark"></i>
1967 </a>
1968
1969
1970 <nav class="sideMenu" id="sideMenu">
1971
1972 <section class="sideMenu__container">
1973 <a href="javascript:history.back();" class="sideMenu__link"><i class="fal fa-reply"></i></a>
1974 <a href="/dashboard-configuration" class="sideMenu__link"><i class="fal fa-grid-horizontal"></i></a>
1975 <a href="/button-configuration" class="sideMenu__link"><i class="fal fa-diagram-cells"></i></a>
1976 <a href="/button-configuration" class="sideMenu__link"><i class="fal fa-link"></i></a>
1977 <a href="/background-configuration" class="sideMenu__link"><i class="fal fa-paintbrush"></i></a>
1978 <a href="/jumbotron-configuration" class="sideMenu__link"><i class="fal fa-megaphone"></i></a>
1979 <a href="/theme-configuration-page/theme-01" class="sideMenu__link"><i class="fal fa-brush"></i></a>
1980 <a href="/font-configuration" class="sideMenu__link"><i class="fal fa-font"></i></a>
1981 <a href="/device-manager" class="sideMenu__link"><i class="fal fa-computer"></i></a>
1982 </section>
1983 </nav>
1984
1985 </div>
1986
1987 </section>*@
1988
1989 <script src="https://kit.fontawesome.com/a46eca85e2.js" crossorigin="anonymous"></script>
1990
1991 }
1992
1993
1994 @if (isVisualEditor)
1995 {
1996
1997 int FooProductDetailLayoutID = 0;
1998
1999 <nav class="webshop-visual-editor__navigation">
2000 <section class="webshop-visual-editor__link-container">
2001 <a href="Default.aspx?ID=@ProductOverviewLayoutID" class="webshop-visual-editor__link"><i class="fa-regular fa-cart-shopping"></i> Edit Product Overview</a>
2002 </section>
2003 <section class="webshop-visual-editor__link-container">
2004 <a href="Default.aspx?ID=@ProductDetailLayoutID" class="webshop-visual-editor__link"><i class="fa-regular fa-cart-shopping"></i> Edit Product Detail</a>
2005 <ul>
2006 @foreach (GridRow g in Dynamicweb.Services.Grids.GetGridRowsByPageId(ProductDetailLayoutID))
2007 {
2008
2009 ProductDetailPageBreakpointRow _data = ItemManager.Storage.GetById<ProductDetailPageBreakpointRow>(g.ItemId.ToString());
2010 FooProductDetailLayoutID = Dynamicweb.Services.Pages.GetPageForItem("ProductDetailPage", _data.ProductDetailConfiguration.Id).ID;
2011
2012 <li><a href="Default.aspx?ID=@FooProductDetailLayoutID">@_data.ProductDetailConfiguration.Name</a></li>
2013
2014 }
2015 </ul>
2016 </section>
2017 </nav>
2018
2019 <style>
2020 .webshop-visual-editor__navigation {
2021 position: fixed;
2022 display: flex;
2023 top: 50px;
2024 left: 50px;
2025 z-index: 100000;
2026 flex-direction: row;
2027 }
2028
2029 .webshop-visual-editor__link {
2030 color: black;
2031 }
2032
2033 .webshop-visual-editor__link-container {
2034 position: relative;
2035 display: flex;
2036 box-shadow: -10px 10px 10px rgb(153 153 255 / 10%);
2037 background-color: white;
2038 padding: 5px;
2039 margin-right: 25px;
2040 flex-direction: column;
2041 }
2042 </style>
2043
2044 }
2045
2046 </body>
2047 </html>
2048