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