Error executing template "Designs/TheGift_generated/_parsed/WebshopPage.parsed.cshtml"
System.Data.SqlClient.SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) ---> System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified
   at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
   at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
   at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
   at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
   at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
   at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
   at System.Data.SqlClient.SqlConnection.Open()
   at Bluedesk.Tools.DynamicWeb.DataAccess.DynamicwebData.Query(String sqlQuery, SqlParameter[] parameters)
   at Bluedesk.DynamicWeb.ItemTypes.BaseSolution.Frontend.BaseSettingServices.GetDataTable(Int32 PageId, Int32 AreaId) in C:\vso\TheGiftBaseSolutionRepo\BluedeskBaseSolution\ClientBase\ItemTypes\Bluedesk.DynamicWeb.ItemTypes.BaseSolution\Frontend\BaseSettings.cs:line 515
   at Bluedesk.DynamicWeb.ItemTypes.BaseSolution.Frontend.BaseSettingServices.RenderBaseSettings(PageView PageViewObj) in C:\vso\TheGiftBaseSolutionRepo\BluedeskBaseSolution\ClientBase\ItemTypes\Bluedesk.DynamicWeb.ItemTypes.BaseSolution\Frontend\BaseSettings.cs:line 535
   at CompiledRazorTemplates.Dynamic.RazorEngine_6accc36c4ac548d28a1e70b8ada1e915.Execute() in D:\dynamicweb.net\Solutions\TheGift\Production\files\Templates\Designs\TheGift_generated\_parsed\WebshopPage.parsed.cshtml:line 87
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader)
   at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<RunCompile>b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template)
   at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()
ClientConnectionId:00000000-0000-0000-0000-000000000000
Error Number:2,State:0,Class:20

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