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