Error compiling template "Designs/VanBuuren_generated/_parsed/MasterConfigurationPage.parsed.cshtml"
Line 426: 'Services' is obsolete: 'Use Dynamicweb.Content.Services instead.'
Line 426: 'Services.Items' is obsolete: 'Use Dynamicweb.Content.Services.Items instead.'
Line 427: 'Services' is obsolete: 'Use Dynamicweb.Content.Services instead.'
Line 427: 'Services.Pages' is obsolete: 'Use Dynamicweb.Content.Services.Pages instead.'
Line 443: 'Services' is obsolete: 'Use Dynamicweb.Content.Services instead.'
Line 443: 'Services.Pages' is obsolete: 'Use Dynamicweb.Content.Services.Pages instead.'
Line 494: 'Services' is obsolete: 'Use Dynamicweb.Content.Services instead.'
Line 494: 'Services.Pages' is obsolete: 'Use Dynamicweb.Content.Services.Pages instead.'
Line 516: A local variable or function named 'isVisualEditor' is already defined in this scope
Line 525: A local variable or function named 'websitesettings' is already defined in this scope
Line 1005: 'Services' is obsolete: 'Use Dynamicweb.Content.Services instead.'
Line 1005: 'Services.Items' is obsolete: 'Use Dynamicweb.Content.Services.Items instead.'
Line 1020: 'Services' is obsolete: 'Use Dynamicweb.Content.Services instead.'
Line 1020: 'Services.Pages' is obsolete: 'Use Dynamicweb.Content.Services.Pages instead.'
Line 1022: 'Services' is obsolete: 'Use Dynamicweb.Content.Services instead.'
Line 1022: 'Services.Items' is obsolete: 'Use Dynamicweb.Content.Services.Items instead.'

1 //------------------------------------------------------------------------------ 2 // <auto-generated> 3 // This code was generated by a tool. 4 // Runtime Version:4.0.30319.42000 5 // 6 // Changes to this file may cause incorrect behavior and will be lost if 7 // the code is regenerated. 8 // </auto-generated> 9 //------------------------------------------------------------------------------ 10 11 namespace CompiledRazorTemplates.Dynamic { 12 13 #line 202 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 14 using System; 15 16 #line default 17 #line hidden 18 using System.Collections.Generic; 19 20 #line 204 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 21 using System.Linq; 22 23 #line default 24 #line hidden 25 26 #line 207 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 27 using Dynamicweb; 28 29 #line default 30 #line hidden 31 32 #line 4 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 33 using Dynamicweb.Content; 34 35 #line default 36 #line hidden 37 38 #line 208 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 39 using Dynamicweb.Content.Items; 40 41 #line default 42 #line hidden 43 44 #line 6 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 45 using Bluedesk.DynamicWeb.ItemTypes.Pages; 46 47 #line default 48 #line hidden 49 50 #line 7 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 51 using Bluedesk.Tools.DynamicWeb.ExtensionMethods; 52 53 #line default 54 #line hidden 55 56 #line 213 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 57 using Bluedesk.Tools.Generic; 58 59 #line default 60 #line hidden 61 62 #line 205 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 63 using System.Globalization; 64 65 #line default 66 #line hidden 67 68 #line 215 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 69 using Bluedesk.DynamicWeb.ItemTypes; 70 71 #line default 72 #line hidden 73 74 #line 216 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 75 using Bluedesk.DynamicWeb.ItemTypes.Settings; 76 77 #line default 78 #line hidden 79 80 #line 221 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 81 using Bluedesk.DynamicWeb.ItemTypes.Settings.Configuration; 82 83 #line default 84 #line hidden 85 86 #line 219 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 87 using Bluedesk.DynamicWeb.ItemTypes.BaseSolution; 88 89 #line default 90 #line hidden 91 92 #line 209 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 93 using Dynamicweb.Environment; 94 95 #line default 96 #line hidden 97 98 #line 210 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 99 using Dynamicweb.Frontend; 100 101 #line default 102 #line hidden 103 104 #line 203 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 105 using System.Web; 106 107 #line default 108 #line hidden 109 110 #line 218 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 111 using Bluedesk.DynamicWeb.ItemTypes.Configuration; 112 113 #line default 114 #line hidden 115 116 #line 211 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 117 using Dynamicweb.Frontend.Navigation; 118 119 #line default 120 #line hidden 121 122 #line 87 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 123 using Bluedesk.DynamicWeb.ItemTypes.BaseSolution.Frontend; 124 125 #line default 126 #line hidden 127 128 #line 220 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 129 using Bluedesk.DynamicWeb.ItemTypes.Extensions; 130 131 #line default 132 #line hidden 133 134 135 public class RazorEngine_89d3ae2a1e9a4ec6b954322f89542d44 : Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> { 136 137 #line hidden 138 139 #line 150 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 140 public RazorEngine.Templating.TemplateWriter RenderCSSKeyAndValue(string Key, string Value) 141 { 142 #line default 143 #line hidden 144 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 145 146 #line 151 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 147 148 if (!string.IsNullOrWhiteSpace(Value)) 149 { 150 151 152 #line default 153 #line hidden 154 WriteLiteralTo(__razor_helper_writer, "\t\t"); 155 156 157 #line 154 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 158 WriteTo(__razor_helper_writer, Key); 159 160 161 #line default 162 #line hidden 163 WriteLiteralTo(__razor_helper_writer, " : "); 164 165 166 #line 154 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 167 WriteTo(__razor_helper_writer, Value); 168 169 170 #line default 171 #line hidden 172 WriteLiteralTo(__razor_helper_writer, " !important;"); 173 174 WriteLiteralTo(__razor_helper_writer, "\r\n"); 175 176 177 #line 155 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 178 } 179 180 181 #line default 182 #line hidden 183 }); 184 185 #line 156 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 186 } 187 #line default 188 #line hidden 189 190 191 #line 158 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 192 public RazorEngine.Templating.TemplateWriter SetFontCSSVariables(FontConfigurationItemTab FontConfiguration) 193 { 194 #line default 195 #line hidden 196 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 197 198 #line 159 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 199 200 201 string Top = FontConfiguration.top != 0 ? FontConfiguration.top.ToString() + "px" : ""; 202 string Left = FontConfiguration.left != 0 ? FontConfiguration.left.ToString() + "px" : ""; 203 string Right = FontConfiguration.right != 0 ? FontConfiguration.right.ToString() + "px" : ""; 204 string Bottom = FontConfiguration.bottom != 0 ? FontConfiguration.bottom.ToString() + "px" : ""; 205 206 string Position = FontConfiguration.PositionAbsolute ? "absolute" : "relative"; 207 208 string Color = FontConfiguration.Color?.GetColorCode(Pageview.AreaID) ?? ""; 209 string BackgroundColor = FontConfiguration.Backgroundcolor?.GetColorCode(Pageview.AreaID) ?? ""; 210 211 string BorderColor = FontConfiguration.BorderColor?.GetColorCode(Pageview.AreaID) ?? ""; 212 string BorderSize = FontConfiguration.BorderSize != 0 ? FontConfiguration.BorderSize.ToString() + "px" : ""; 213 214 215 216 #line default 217 #line hidden 218 WriteLiteralTo(__razor_helper_writer, "\t"); 219 220 WriteLiteralTo(__razor_helper_writer, "\r\n\r\n\t\t--Position:\t\t"); 221 222 223 #line 176 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 224 WriteTo(__razor_helper_writer, Position); 225 226 227 #line default 228 #line hidden 229 WriteLiteralTo(__razor_helper_writer, ";\r\n\r\n"); 230 231 WriteLiteralTo(__razor_helper_writer, "\t\t"); 232 233 234 #line 178 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 235 WriteTo(__razor_helper_writer, RenderCSSKeyAndValue("--Padding", FontConfiguration.Padding)); 236 237 238 #line default 239 #line hidden 240 WriteLiteralTo(__razor_helper_writer, "\r\n\r\n"); 241 242 WriteLiteralTo(__razor_helper_writer, "\t\t"); 243 244 245 #line 180 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 246 WriteTo(__razor_helper_writer, RenderCSSKeyAndValue("--Top", Top)); 247 248 249 #line default 250 #line hidden 251 WriteLiteralTo(__razor_helper_writer, "\r\n"); 252 253 WriteLiteralTo(__razor_helper_writer, "\t\t"); 254 255 256 #line 181 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 257 WriteTo(__razor_helper_writer, RenderCSSKeyAndValue("--Left", Left)); 258 259 260 #line default 261 #line hidden 262 WriteLiteralTo(__razor_helper_writer, "\r\n"); 263 264 WriteLiteralTo(__razor_helper_writer, "\t\t"); 265 266 267 #line 182 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 268 WriteTo(__razor_helper_writer, RenderCSSKeyAndValue("--Right", Right)); 269 270 271 #line default 272 #line hidden 273 WriteLiteralTo(__razor_helper_writer, "\r\n"); 274 275 WriteLiteralTo(__razor_helper_writer, "\t\t"); 276 277 278 #line 183 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 279 WriteTo(__razor_helper_writer, RenderCSSKeyAndValue("--Bottom", Bottom)); 280 281 282 #line default 283 #line hidden 284 WriteLiteralTo(__razor_helper_writer, "\r\n\r\n"); 285 286 WriteLiteralTo(__razor_helper_writer, "\t\t"); 287 288 289 #line 185 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 290 WriteTo(__razor_helper_writer, RenderCSSKeyAndValue("--Color", Color)); 291 292 293 #line default 294 #line hidden 295 WriteLiteralTo(__razor_helper_writer, "\r\n"); 296 297 WriteLiteralTo(__razor_helper_writer, "\t\t"); 298 299 300 #line 186 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 301 WriteTo(__razor_helper_writer, RenderCSSKeyAndValue("--FontSize", FontConfiguration.FontSize)); 302 303 304 #line default 305 #line hidden 306 WriteLiteralTo(__razor_helper_writer, "\r\n"); 307 308 WriteLiteralTo(__razor_helper_writer, "\t\t"); 309 310 311 #line 187 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 312 WriteTo(__razor_helper_writer, RenderCSSKeyAndValue("--FontStyle", FontConfiguration.FontStyle)); 313 314 315 #line default 316 #line hidden 317 WriteLiteralTo(__razor_helper_writer, "\r\n\r\n"); 318 319 WriteLiteralTo(__razor_helper_writer, "\t\t"); 320 321 322 #line 189 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 323 WriteTo(__razor_helper_writer, RenderCSSKeyAndValue("--FontWeight", FontConfiguration.FontWeight)); 324 325 326 #line default 327 #line hidden 328 WriteLiteralTo(__razor_helper_writer, "\r\n"); 329 330 WriteLiteralTo(__razor_helper_writer, "\t\t"); 331 332 333 #line 190 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 334 WriteTo(__razor_helper_writer, RenderCSSKeyAndValue("--FontFamily", FontConfiguration.FontConfiguration.FontFamily)); 335 336 337 #line default 338 #line hidden 339 WriteLiteralTo(__razor_helper_writer, "\r\n"); 340 341 WriteLiteralTo(__razor_helper_writer, "\t\t"); 342 343 344 #line 191 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 345 WriteTo(__razor_helper_writer, RenderCSSKeyAndValue("--LineHeight", FontConfiguration.LineHeight)); 346 347 348 #line default 349 #line hidden 350 WriteLiteralTo(__razor_helper_writer, "\r\n\r\n"); 351 352 WriteLiteralTo(__razor_helper_writer, "\t\t"); 353 354 355 #line 193 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 356 WriteTo(__razor_helper_writer, RenderCSSKeyAndValue("--BackgroundColor", BackgroundColor)); 357 358 359 #line default 360 #line hidden 361 WriteLiteralTo(__razor_helper_writer, "\r\n"); 362 363 WriteLiteralTo(__razor_helper_writer, "\t\t"); 364 365 366 #line 194 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 367 WriteTo(__razor_helper_writer, RenderCSSKeyAndValue("--BorderColor", BorderColor)); 368 369 370 #line default 371 #line hidden 372 WriteLiteralTo(__razor_helper_writer, "\r\n"); 373 374 WriteLiteralTo(__razor_helper_writer, "\t\t"); 375 376 377 #line 195 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 378 WriteTo(__razor_helper_writer, RenderCSSKeyAndValue("--BorderSize", BorderSize)); 379 380 381 #line default 382 #line hidden 383 WriteLiteralTo(__razor_helper_writer, "\r\n\r\n\t"); 384 385 WriteLiteralTo(__razor_helper_writer, "\r\n"); 386 387 388 #line 198 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 389 390 391 392 #line default 393 #line hidden 394 }); 395 396 #line 199 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 397 } 398 #line default 399 #line hidden 400 401 402 public RazorEngine_89d3ae2a1e9a4ec6b954322f89542d44() { 403 } 404 405 public override void Execute() { 406 WriteLiteral("\r\n"); 407 408 WriteLiteral("\r\n"); 409 410 WriteLiteral("\r\n"); 411 412 WriteLiteral("\r\n"); 413 414 415 #line 30 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 416 Write(Title("Configuration page template")); 417 418 419 #line default 420 #line hidden 421 WriteLiteral("\r\n\r\n"); 422 423 424 #line 32 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 425 426 var websitesettings = Dynamicweb.Services.Items.GetItemById<WebsiteSettings>(Model.Area.Item.Id); 427 var font_configuration = Dynamicweb.Services.Pages.GetPageByNavigationTag(Pageview.AreaID, "FontConfiguration"); 428 429 var designRoot = "/Files/Templates/Designs/" + Pageview.Area.Layout.Design.Name; 430 var appcss = Cache.VersionedFile(designRoot + "/dist/app.css"); 431 432 bool isVisualEditor = Dynamicweb.Context.Current.Request.GetBoolean("visualedit"); 433 434 if (isVisualEditor) 435 { 436 System.Web.HttpContext.Current.Session["PreviousPage"] = Pageview.Page.ID; 437 } 438 439 string paragraphID = Model.ItemId; 440 MasterConfigurationPage _data = ItemManager.Storage.GetById<MasterConfigurationPage>(paragraphID ?? "0"); 441 442 string ItemTypeId = _data.HeaderConfigurationID; 443 int HeaderLayoutID = Dynamicweb.Services.Pages.GetPageForItem("HeaderConfigurationPage", ItemTypeId).ID; 444 445 446 447 #line default 448 #line hidden 449 WriteLiteral("\r\n\r\n<!DOCTYPE html>\r\n<html"); 450 451 WriteLiteral(" prefix=\"og: http://ogp.me/ns#\""); 452 453 WriteLiteral(">\r\n<head>\r\n\r\n</head>\r\n<body>\r\n\r\n\t<link"); 454 455 WriteAttribute("href", Tuple.Create(" href=\"", 1974), Tuple.Create("\"", 1988) 456 457 #line 61 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 458 , Tuple.Create(Tuple.Create("", 1981), Tuple.Create<System.Object, System.Int32>(appcss 459 460 #line default 461 #line hidden 462 , 1981), false) 463 ); 464 465 WriteLiteral(" rel=\"stylesheet\""); 466 467 WriteLiteral(" />\r\n"); 468 469 470 #line 62 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 471 472 473 #line default 474 #line hidden 475 WriteLiteral("\r\n"); 476 477 WriteLiteral("\r\n"); 478 479 WriteLiteral("\r\n"); 480 481 WriteLiteral("\r\n"); 482 483 WriteLiteral("\r\n"); 484 485 WriteLiteral("\r\n"); 486 487 WriteLiteral("\r\n"); 488 489 490 #line 89 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 491 492 493 // Hydrated once per request: the product detail template (rendered before the master) reads the same MasterConfig. 494 MasterConfig mc = application._webapi.Helper.RenderCache.GetForRequest("MasterConfig_" + Pageview.AreaID, () => Dynamicweb.Services.Pages.GetPageByNavigationTag(Pageview.AreaID, "MasterConfiguration").Item.ToCodeFirstItem<MasterConfig>()); 495 496 string MasterConfigCssClass = !string.IsNullOrWhiteSpace(mc.CssClass) ? mc.CssClass : ""; 497 498 // GeneralConfig GeneralConfiguration = mc.GeneralConfiguration; 499 EcomConfig EcommerceConfiguration = mc.EcomConfiguration; 500 501 bool WithVATBool = Pageview.Area.EcomPricesWithVat == "True"; 502 bool pricesWithoutVatForUsers = EcommerceConfiguration.ShowPricesWithoutVatForUsers; 503 bool pricesWithoutVatForValidVat = EcommerceConfiguration.ShowPricesWithoutVatWhenValidVatNumber; 504 if (pricesWithoutVatForUsers && !pricesWithoutVatForValidVat && Pageview.User != null) 505 { 506 WithVATBool = false; 507 } 508 if (pricesWithoutVatForValidVat && Pageview.User != null && !string.IsNullOrWhiteSpace(Pageview.User.VatRegNumber)) 509 { 510 WithVATBool = false; 511 } 512 string ecomShowPricesWithVat = WithVATBool.ToString().ToLower(); 513 string ecomPricesFormatted = (EcommerceConfiguration.FormattedPrices).ToString().ToLower(); 514 515 bool IsNotContentManager = false; 516 bool isVisualEditor = Pageview.IsVisualEditorMode; 517 518 if (isVisualEditor) 519 { 520 System.Web.HttpContext.Current.Session["PreviousPage"] = Pageview.Page.ID; 521 IsNotContentManager = (Dynamicweb.Security.UserManagement.User.GetCurrentBackendUser()?.Groups?.All(g => g.Name != "Content managers") ?? true); 522 } 523 524 // Recaptcha configuration 525 var websitesettings = Dynamicweb.Content.Services.Items.GetItemById<WebsiteSettings>(Model.Area.Item.Id); 526 string recaptchaType = websitesettings.RecaptchaType; 527 string recaptchaKey = websitesettings.RecaptchaKey; 528 529 530 #line default 531 #line hidden 532 WriteLiteral("\r\n\r\n"); 533 534 535 #line 128 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 536 537 538 #line default 539 #line hidden 540 WriteLiteral("\r\n"); 541 542 WriteLiteral("\r\n"); 543 544 WriteLiteral("\r\n"); 545 546 WriteLiteral("\r\n"); 547 548 WriteLiteral("\r\n"); 549 550 WriteLiteral("\r\n"); 551 552 WriteLiteral("\r\n"); 553 554 555 #line 201 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 556 557 558 #line default 559 #line hidden 560 WriteLiteral("\r\n"); 561 562 WriteLiteral("\r\n"); 563 564 WriteLiteral("\r\n"); 565 566 WriteLiteral("\r\n"); 567 568 WriteLiteral("\r\n\r\n\t<header"); 569 570 WriteLiteral(" style=\"padding: 25px; display: flex; flex-direction: row;\""); 571 572 WriteLiteral(">\r\n\t\t<div>\r\n\t\t\t<h1>Branding Stylesheet</h1>\r\n\t\t\t<h2"); 573 574 WriteLiteral(" style=\"font-weight: normal;\""); 575 576 WriteLiteral(">"); 577 578 579 #line 227 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 580 Write(_data.Title); 581 582 583 #line default 584 #line hidden 585 WriteLiteral("</h2>\r\n\t\t\t<button"); 586 587 WriteLiteral(" onclick=\"toggleClass(\'.slidePanel\', \'open\'); toggleClass(\'main\', \'blur\')\""); 588 589 WriteLiteral(" class=\"togglePanelButton\""); 590 591 WriteLiteral(">Open panel</button>\r\n\t\t</div>\r\n\t\t<nav"); 592 593 WriteLiteral(" style=\"display: flex; flex-direction: row; margin-left: 50px\""); 594 595 WriteLiteral(">\r\n\r\n"); 596 597 598 #line 232 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 599 600 601 #line default 602 #line hidden 603 604 #line 232 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 605 if (System.Web.HttpContext.Current.Session["PreviousPage"] != null) 606 { 607 608 609 #line default 610 #line hidden 611 WriteLiteral("\t\t\t\t<a"); 612 613 WriteAttribute("href", Tuple.Create(" href=\"", 8500), Tuple.Create("\"", 8579) 614 , Tuple.Create(Tuple.Create("", 8507), Tuple.Create("/Default.aspx?ID=", 8507), true) 615 616 #line 234 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 617 , Tuple.Create(Tuple.Create("", 8524), Tuple.Create<System.Object, System.Int32>(System.Web.HttpContext.Current.Session["PreviousPage"] 618 619 #line default 620 #line hidden 621 , 8524), false) 622 ); 623 624 WriteLiteral(" class=\"ConfigurationButton\""); 625 626 WriteLiteral("><i"); 627 628 WriteLiteral(" class=\"icon fa-light fa-reply\""); 629 630 WriteLiteral("></i></a>\r\n"); 631 632 633 #line 235 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 634 } 635 636 637 #line default 638 #line hidden 639 WriteLiteral("\t\t\t<a"); 640 641 WriteLiteral(" href=\"/Default.aspx?ID=1598\""); 642 643 WriteLiteral(" class=\"ConfigurationButton\""); 644 645 WriteLiteral("><i"); 646 647 WriteLiteral(" class=\"icon fa-light fa-grid-horizontal\""); 648 649 WriteLiteral("></i><label>Dashboard</label></a>\r\n\t\t\t<a"); 650 651 WriteLiteral(" href=\"/Default.aspx?ID=1055\""); 652 653 WriteLiteral(" class=\"ConfigurationButton\""); 654 655 WriteLiteral("><i"); 656 657 WriteLiteral(" class=\"icon fa-light fa-diagram-cells\""); 658 659 WriteLiteral("></i><label>Masters</label></a>\r\n\t\t\t<a"); 660 661 WriteLiteral(" href=\"/Default.aspx?ID=1055\""); 662 663 WriteLiteral(" class=\"ConfigurationButton\""); 664 665 WriteLiteral("><i"); 666 667 WriteLiteral(" class=\"icon fa-light fa-link\""); 668 669 WriteLiteral("></i><label>Buttons</label></a>\r\n\t\t\t<a"); 670 671 WriteLiteral(" href=\"/Default.aspx?ID=1009\""); 672 673 WriteLiteral(" class=\"ConfigurationButton\""); 674 675 WriteLiteral("><i"); 676 677 WriteLiteral(" class=\"icon fa-light fa-paintbrush\""); 678 679 WriteLiteral("></i><label>Backgrounds</label></a>\r\n\t\t\t<a"); 680 681 WriteLiteral(" href=\"/Default.aspx?ID=1460\""); 682 683 WriteLiteral(" class=\"ConfigurationButton\""); 684 685 WriteLiteral("><i"); 686 687 WriteLiteral(" class=\"icon fa-light fa-megaphone\""); 688 689 WriteLiteral("></i><label>Jumbotrons</label></a>\r\n\t\t\t<a"); 690 691 WriteLiteral(" href=\"/Default.aspx?ID=1518\""); 692 693 WriteLiteral(" class=\"ConfigurationButton\""); 694 695 WriteLiteral("><i"); 696 697 WriteLiteral(" class=\"icon fa-light fa-brush\""); 698 699 WriteLiteral("></i><label>Themes</label></a>\r\n\t\t\t<a"); 700 701 WriteLiteral(" href=\"/Default.aspx?ID=1450\""); 702 703 WriteLiteral(" class=\"ConfigurationButton\""); 704 705 WriteLiteral("><i"); 706 707 WriteLiteral(" class=\"icon fa-light fa-font\""); 708 709 WriteLiteral("></i><label>Fonts</label></a>\r\n\t\t\t<a"); 710 711 WriteLiteral(" href=\"/Default.aspx?ID=1514\""); 712 713 WriteLiteral(" class=\"ConfigurationButton\""); 714 715 WriteLiteral("><i"); 716 717 WriteLiteral(" class=\"icon fa-light fa-computer\""); 718 719 WriteLiteral("></i><label>Devices</label></a>\r\n\r\n\t\t</nav>\r\n\t</header>\r\n\t<main>\r\n\t\t<a"); 720 721 WriteAttribute("href", Tuple.Create(" href=\"", 9762), Tuple.Create("\"", 9801) 722 , Tuple.Create(Tuple.Create("", 9769), Tuple.Create("/Default.aspx?ID=", 9769), true) 723 724 #line 248 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 725 , Tuple.Create(Tuple.Create("", 9786), Tuple.Create<System.Object, System.Int32>(HeaderLayoutID 726 727 #line default 728 #line hidden 729 , 9786), false) 730 ); 731 732 WriteLiteral(" class=\"ConfigurationButton\""); 733 734 WriteLiteral("><i"); 735 736 WriteLiteral(" class=\"icon fa-light fa-brush\""); 737 738 WriteLiteral("></i><label>Edit Header configuration</label></a>\r\n"); 739 740 WriteLiteral("\t\t"); 741 742 743 #line 249 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 744 Write(RenderGrid(HeaderLayoutID)); 745 746 747 #line default 748 #line hidden 749 WriteLiteral(@" 750 </main> 751 752 <style> 753 .ConfigurationButton { 754 display: flex; 755 flex-direction: column; 756 height: 100px; 757 width: 100px; 758 margin-right: 25px; 759 padding: 25px; 760 background-color: #f1f1f1; 761 justify-content: center; 762 align-items: center; 763 box-sizing: border-box; 764 text-align: center; 765 font-size: 12px; 766 } 767 768 .ConfigurationButton .icon { 769 font-size: 25px; 770 } 771 </style> 772 773 "); 774 775 WriteLiteral("\t"); 776 777 778 #line 273 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 779 Write(Model.Grid("Grid", "Configuration items", "default:true;sort:1", "Configuration")); 780 781 782 #line default 783 #line hidden 784 WriteLiteral("\r\n\r\n"); 785 786 787 #line 275 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 788 789 790 #line default 791 #line hidden 792 793 #line 275 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 794 if (font_configuration != null) 795 { 796 foreach (var item in font_configuration.Item.ToCodeFirstItem<Bluedesk.DynamicWeb.ItemTypes.Pages.ConfigurationPagesParent>().GetChildConfigs<FontConfiguration>()) 797 { 798 799 800 #line default 801 #line hidden 802 WriteLiteral("\t\t\t<link"); 803 804 WriteAttribute("href", Tuple.Create(" href=\"", 10665), Tuple.Create("\"", 10689) 805 806 #line 279 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 807 , Tuple.Create(Tuple.Create("", 10672), Tuple.Create<System.Object, System.Int32>(item["FontLink"] 808 809 #line default 810 #line hidden 811 , 10672), false) 812 ); 813 814 WriteLiteral(" rel=\"stylesheet\""); 815 816 WriteLiteral(">\r\n"); 817 818 819 #line 280 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 820 } 821 } 822 823 824 #line default 825 #line hidden 826 WriteLiteral("\r\n\t<link"); 827 828 WriteLiteral(" rel=\"stylesheet\""); 829 830 WriteLiteral(" href=\"https://pro.fontawesome.com/releases/v5.15.4/css/all.css\""); 831 832 WriteLiteral(" integrity=\"sha384-rqn26AG5Pj86AF4SO72RK5fyefcQ/x32DNQfChxWvbXIyXFePlEktwD18fEz+k" + 833 "QU\""); 834 835 WriteLiteral(" crossorigin=\"anonymous\""); 836 837 WriteLiteral(">\r\n\t<script"); 838 839 WriteLiteral(" src=\"https://kit.fontawesome.com/a46eca85e2.js\""); 840 841 WriteLiteral(" crossorigin=\"anonymous\""); 842 843 WriteLiteral("></script>\r\n\r\n\t<style>\r\n\r\n\t\tbody {\r\n\t\t\tbackground-color: #f1f1f1;\r\n\t\t\tfont-family" + 844 ": \'Barlow\', sans-serif;\r\n\t\t}\r\n\r\n\t\t.slidePanel {\r\n\t\t\tposition: fixed;\r\n\t\t\ttop: 0;" + 845 "\r\n\t\t\tbottom: 0;\r\n\t\t\tmin-width: 500px;\r\n\t\t\tbox-shadow: -10px 10px 10px rgb(153 15" + 846 "3 255 / 10%);\r\n\t\t\tbackground-color: #FFFFFF;\r\n\t\t\tz-index: 1000;\r\n\t\t\tbox-sizing: " + 847 "border-box;\r\n\t\t\ttransition: all .5s ease-in;\r\n\t\t}\r\n\r\n\t\t\t.slidePanel.open {\r\n\t\t\t\t" + 848 "right: 0;\r\n\t\t\t}\r\n\r\n\t\t.slidePanel {\r\n\t\t\tright: -500px;\r\n\t\t\ttransition: all 0.5s e" + 849 "ase-in;\r\n\t\t}\r\n\r\n\t\t.slidePanel__container {\r\n\t\t\tdisplay: flex;\r\n\t\t\tposition: rela" + 850 "tive;\r\n\t\t\theight: 100%;\r\n\t\t}\r\n\r\n\t\t.togglePanelButton {\r\n\t\t\tposition: fixed;\r\n\t\t\t" + 851 "top: 50px;\r\n\t\t\tleft: 50px;\r\n\t\t\tdisplay: flex;\r\n\t\t\tjustify-content: center;\r\n\t\t\ta" + 852 "lign-items: center;\r\n\t\t\tcolor: white;\r\n\t\t\tbackground-color: black;\r\n\t\t\tpadding: " + 853 "0px 25px;\r\n\t\t\theight: 50px;\r\n\t\t\tcursor: pointer;\r\n\t\t\tz-index: 1000;\r\n\t\t}\r\n\r\n\t\t.c" + 854 "loseButton {\r\n\t\t\tposition: absolute;\r\n\t\t\tdisplay: flex;\r\n\t\t\ttop: 25px;\r\n\t\t\tright" + 855 ": 25px;\r\n\t\t\tfont-size: 2rem;\r\n\t\t\ttext-decoration: none;\r\n\t\t\tcolor: black;\r\n\t\t}\r\n" + 856 "\r\n\r\n\t\t.blur {\r\n\t\t\tfilter: blur(4px);\r\n\t\t\tpointer-events: none;\r\n\t\t}\r\n\r\n\t\t.sideMe" + 857 "nu {\r\n\t\t\tdisplay: flex;\r\n\t\t\tposition: absolute;\r\n\t\t\talign-items: center;\r\n\t\t\tmin" + 858 "-height: 100px;\r\n\t\t\tz-index: 1200;\r\n\t\t\ttop: 0;\r\n\t\t\tbottom: 0;\r\n\t\t\tright: 100%;\r\n" + 859 "\t\t}\r\n\r\n\t\t.sideMenu__link:first-child {\r\n\t\t\tmargin-top: 10px;\r\n\t\t}\r\n\r\n\t\t.sideMenu" + 860 "__link {\r\n\t\t\tposition: relative;\r\n\t\t\tflex-direction: column;\r\n\t\t\tdisplay: flex;\r" + 861 "\n\t\t\theight: 50px;\r\n\t\t\twidth: 50px;\r\n\t\t\tbackground-color: #f1f1f1;\r\n\t\t\tmargin-bot" + 862 "tom: 10px;\r\n\t\t\tmargin-left: 10px;\r\n\t\t\tmargin-right: 10px;\r\n\t\t\tjustify-content: s" + 863 "pace-between;\r\n\t\t\talign-items: center;\r\n\t\t\tfont-size: 10px;\r\n\t\t\tpadding: 10px;\r\n" + 864 "\t\t\tbox-sizing: border-box;\r\n\t\t\ttext-decoration: none;\r\n\t\t\tcolor: rgb(22, 101, 12" + 865 "3);\r\n\t\t}\r\n\r\n\t\t\t.sideMenu__link label {\r\n\t\t\t\tfont-size: 12px;\r\n\t\t\t}\r\n\r\n\t\t\t.sideMe" + 866 "nu__link .icon {\r\n\t\t\t\tfont-size: 24px;\r\n\t\t\t}\r\n\r\n\t\t.sideMenu__container {\r\n\t\t\tdis" + 867 "play: flex;\r\n\t\t\tposition: relative;\r\n\t\t\tflex-direction: column;\r\n\t\t\tbox-shadow: " + 868 "-10px 10px 10px rgb(153 153 255 / 10%);\r\n\t\t\tbackground-color: white;\r\n\t\t}\r\n\t</st" + 869 "yle>\r\n\r\n\t<script>\r\n\t\tfunction toggleClass(ClassName, AddedClassName) {\r\n\t\t\tvar e" + 870 "lement = document.querySelector(ClassName);\r\n\t\t\tif (element.classList.contains(A" + 871 "ddedClassName)) {\r\n\t\t\t\telement.classList.remove(AddedClassName);\r\n\t\t\t} else {\r\n\t" + 872 "\t\t\telement.classList.add(AddedClassName);\r\n\t\t\t}\r\n\t\t}\r\n\t</script>\r\n\r\n\t<section"); 873 874 WriteLiteral(" class=\"slidePanel\""); 875 876 WriteLiteral(" id=\"slidePanel\""); 877 878 WriteLiteral(">\r\n\r\n\t\t<div"); 879 880 WriteLiteral(" class=\"slidePanel__container\""); 881 882 WriteLiteral(">\r\n\r\n\t\t\t<a"); 883 884 WriteLiteral(" href=\"javasciprt:void(0);\""); 885 886 WriteLiteral(" onclick=\"toggleClass(\'.slidePanel\', \'open\'); toggleClass(\'main\', \'blur\')\""); 887 888 WriteLiteral(" class=\"closeButton\""); 889 890 WriteLiteral(">\r\n\t\t\t\t<i"); 891 892 WriteLiteral(" class=\"fa-light fa-circle-xmark\""); 893 894 WriteLiteral("></i>\r\n\t\t\t</a>\r\n\r\n\t\t\t<nav"); 895 896 WriteLiteral(" class=\"sideMenu\""); 897 898 WriteLiteral(">\r\n\t\t\t\t<section"); 899 900 WriteLiteral(" class=\"sideMenu__container\""); 901 902 WriteLiteral(">\r\n\t\t\t\t\t<a"); 903 904 WriteLiteral(" href=\"javascript:history.back();\""); 905 906 WriteLiteral(" class=\"sideMenu__link\""); 907 908 WriteLiteral("><i"); 909 910 WriteLiteral(" class=\"icon fa-light fa-reply\""); 911 912 WriteLiteral("></i></a>\r\n\t\t\t\t\t<a"); 913 914 WriteLiteral(" href=\"/dashboard-configuration\""); 915 916 WriteLiteral(" class=\"sideMenu__link\""); 917 918 WriteLiteral("><i"); 919 920 WriteLiteral(" class=\"icon fa-light fa-grid-horizontal\""); 921 922 WriteLiteral("></i></a>\r\n\t\t\t\t\t<a"); 923 924 WriteLiteral(" href=\"javasciprt:void(0);\""); 925 926 WriteLiteral(" onclick=\"toggleClass(\'.slidePanel\', \'open\'); toggleClass(\'main\', \'blur\')\""); 927 928 WriteLiteral(" class=\"sideMenu__link\""); 929 930 WriteLiteral("><i"); 931 932 WriteLiteral(" class=\"icon fa-light fa-diagram-cells\""); 933 934 WriteLiteral("></i></a>\r\n\t\t\t\t\t<a"); 935 936 WriteLiteral(" href=\"/button-configuration\""); 937 938 WriteLiteral(" class=\"sideMenu__link\""); 939 940 WriteLiteral("><i"); 941 942 WriteLiteral(" class=\"icon fa-light fa-link\""); 943 944 WriteLiteral("></i></a>\r\n\t\t\t\t\t<a"); 945 946 WriteLiteral(" href=\"/background-configuration\""); 947 948 WriteLiteral(" class=\"sideMenu__link\""); 949 950 WriteLiteral("><i"); 951 952 WriteLiteral(" class=\"icon fa-light fa-paintbrush\""); 953 954 WriteLiteral("></i></a>\r\n\t\t\t\t\t<a"); 955 956 WriteLiteral(" href=\"/jumbotron-configuration\""); 957 958 WriteLiteral(" class=\"sideMenu__link\""); 959 960 WriteLiteral("><i"); 961 962 WriteLiteral(" class=\"icon fa-light fa-megaphone\""); 963 964 WriteLiteral("></i></a>\r\n\t\t\t\t\t<a"); 965 966 WriteLiteral(" href=\"/theme-configuration-page/theme-01\""); 967 968 WriteLiteral(" class=\"sideMenu__link\""); 969 970 WriteLiteral("><i"); 971 972 WriteLiteral(" class=\"icon fa-light fa-brush\""); 973 974 WriteLiteral("></i></a>\r\n\t\t\t\t\t<a"); 975 976 WriteLiteral(" href=\"/font-configuration\""); 977 978 WriteLiteral(" class=\"sideMenu__link\""); 979 980 WriteLiteral("><i"); 981 982 WriteLiteral(" class=\"icon fa-light fa-font\""); 983 984 WriteLiteral("></i></a>\r\n\t\t\t\t\t<a"); 985 986 WriteLiteral(" href=\"/device-manager\""); 987 988 WriteLiteral(" class=\"sideMenu__link\""); 989 990 WriteLiteral("><i"); 991 992 WriteLiteral(" class=\"icon fa-light fa-computer\""); 993 994 WriteLiteral("></i></a>\r\n\t\t\t\t</section>\r\n\t\t\t</nav>\r\n\r\n"); 995 996 997 #line 435 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 998 999 1000 #line default 1001 #line hidden 1002 1003 #line 435 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 1004 1005 MasterConfigurationPage MCPage = Dynamicweb.Services.Items.GetItemById<MasterConfigurationPage>(Model.Area.Item.Id); 1006 1007 1008 #line default 1009 #line hidden 1010 WriteLiteral("\r\n\r\n\t\t\t<ul>\r\n"); 1011 1012 1013 #line 440 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 1014 1015 1016 #line default 1017 #line hidden 1018 1019 #line 440 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 1020 foreach (Dynamicweb.Content.Page MasterConfigurationPage in Dynamicweb.Services.Pages.GetPagesByParentID(Pageview.Page.ParentPageId)) 1021 { 1022 MCPage = Dynamicweb.Services.Items.GetItemById<MasterConfigurationPage>(MasterConfigurationPage.ID.ToString()); 1023 1024 1025 1026 #line default 1027 #line hidden 1028 WriteLiteral("\t\t\t\t\t<li><a"); 1029 1030 WriteAttribute("href", Tuple.Create(" href=\"", 15243), Tuple.Create("\"", 15294) 1031 , Tuple.Create(Tuple.Create("", 15250), Tuple.Create("/Default.aspx?ID=", 15250), true) 1032 1033 #line 444 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 1034 , Tuple.Create(Tuple.Create("", 15267), Tuple.Create<System.Object, System.Int32>(MasterConfigurationPage.ID 1035 1036 #line default 1037 #line hidden 1038 , 15267), false) 1039 ); 1040 1041 WriteLiteral(">Link naar master "); 1042 1043 1044 #line 444 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 1045 Write(MasterConfigurationPage.ID); 1046 1047 1048 #line default 1049 #line hidden 1050 WriteLiteral("</a></li>\r\n"); 1051 1052 1053 #line 445 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\MasterConfigurationPage.parsed.cshtml" 1054 1055 } 1056 1057 1058 #line default 1059 #line hidden 1060 WriteLiteral("\t\t\t</ul>\r\n\r\n\t\t</div>\r\n\r\n\t</section>\r\n\r\n</body>\r\n</html>\r\n"); 1061 1062 } 1063 } 1064 } 1065

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 2 @using System.Linq; 3 @using Dynamicweb; 4 @using Dynamicweb.Content; 5 @using Dynamicweb.Content.Items; 6 @using Bluedesk.DynamicWeb.ItemTypes.Pages; 7 @using Bluedesk.Tools.DynamicWeb.ExtensionMethods; 8 9 @using Bluedesk.Tools.Generic; 10 @using System.Globalization; 11 12 @using Bluedesk.DynamicWeb.ItemTypes; 13 @using Bluedesk.DynamicWeb.ItemTypes.Settings; 14 @using Bluedesk.DynamicWeb.ItemTypes.Settings.Configuration; 15 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution; 16 17 @using System; 18 @using Dynamicweb; 19 @using Dynamicweb.Environment; 20 @using Dynamicweb.Frontend; 21 @using System.Web; 22 @using Bluedesk.Tools.Generic; 23 @using System.Globalization; 24 @using Dynamicweb.Content.Items; 25 @using Bluedesk.DynamicWeb.ItemTypes; 26 @using Bluedesk.DynamicWeb.ItemTypes.Settings; 27 @using Bluedesk.DynamicWeb.ItemTypes.Configuration; 28 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution; 29 30 @Title("Configuration page template") 31 32 @{ 33 var websitesettings = Dynamicweb.Services.Items.GetItemById<WebsiteSettings>(Model.Area.Item.Id); 34 var font_configuration = Dynamicweb.Services.Pages.GetPageByNavigationTag(Pageview.AreaID, "FontConfiguration"); 35 36 var designRoot = "/Files/Templates/Designs/" + Pageview.Area.Layout.Design.Name; 37 var appcss = Cache.VersionedFile(designRoot + "/dist/app.css"); 38 39 bool isVisualEditor = Dynamicweb.Context.Current.Request.GetBoolean("visualedit"); 40 41 if (isVisualEditor) 42 { 43 System.Web.HttpContext.Current.Session["PreviousPage"] = Pageview.Page.ID; 44 } 45 46 string paragraphID = Model.ItemId; 47 MasterConfigurationPage _data = ItemManager.Storage.GetById<MasterConfigurationPage>(paragraphID ?? "0"); 48 49 string ItemTypeId = _data.HeaderConfigurationID; 50 int HeaderLayoutID = Dynamicweb.Services.Pages.GetPageForItem("HeaderConfigurationPage", ItemTypeId).ID; 51 52 } 53 54 <!DOCTYPE html> 55 <html prefix="og: http://ogp.me/ns#"> 56 <head> 57 58 </head> 59 <body> 60 61 <link href="@appcss" rel="stylesheet" /> 62 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 63 64 @using System; 65 @using System.Web; 66 @using System.Linq; 67 @using System.Globalization; 68 69 @using Dynamicweb; 70 @using Dynamicweb.Content.Items; 71 @using Dynamicweb.Environment; 72 @using Dynamicweb.Frontend; 73 @using Dynamicweb.Frontend.Navigation; 74 75 @using Bluedesk.Tools.Generic; 76 77 @using Bluedesk.DynamicWeb.ItemTypes; 78 @using Bluedesk.DynamicWeb.ItemTypes.Settings; 79 @using Bluedesk.DynamicWeb.ItemTypes.Settings.Configuration; 80 81 @using Bluedesk.DynamicWeb.ItemTypes.Configuration; 82 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution; 83 84 @using Bluedesk.DynamicWeb.ItemTypes.Configuration; 85 86 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution; 87 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution.Frontend; 88 89 @{ 90 91 // Hydrated once per request: the product detail template (rendered before the master) reads the same MasterConfig. 92 MasterConfig mc = application._webapi.Helper.RenderCache.GetForRequest("MasterConfig_" + Pageview.AreaID, () => Dynamicweb.Services.Pages.GetPageByNavigationTag(Pageview.AreaID, "MasterConfiguration").Item.ToCodeFirstItem<MasterConfig>()); 93 94 string MasterConfigCssClass = !string.IsNullOrWhiteSpace(mc.CssClass) ? mc.CssClass : ""; 95 96 // GeneralConfig GeneralConfiguration = mc.GeneralConfiguration; 97 EcomConfig EcommerceConfiguration = mc.EcomConfiguration; 98 99 bool WithVATBool = Pageview.Area.EcomPricesWithVat == "True"; 100 bool pricesWithoutVatForUsers = EcommerceConfiguration.ShowPricesWithoutVatForUsers; 101 bool pricesWithoutVatForValidVat = EcommerceConfiguration.ShowPricesWithoutVatWhenValidVatNumber; 102 if (pricesWithoutVatForUsers && !pricesWithoutVatForValidVat && Pageview.User != null) 103 { 104 WithVATBool = false; 105 } 106 if (pricesWithoutVatForValidVat && Pageview.User != null && !string.IsNullOrWhiteSpace(Pageview.User.VatRegNumber)) 107 { 108 WithVATBool = false; 109 } 110 string ecomShowPricesWithVat = WithVATBool.ToString().ToLower(); 111 string ecomPricesFormatted = (EcommerceConfiguration.FormattedPrices).ToString().ToLower(); 112 113 bool IsNotContentManager = false; 114 bool isVisualEditor = Pageview.IsVisualEditorMode; 115 116 if (isVisualEditor) 117 { 118 System.Web.HttpContext.Current.Session["PreviousPage"] = Pageview.Page.ID; 119 IsNotContentManager = (Dynamicweb.Security.UserManagement.User.GetCurrentBackendUser()?.Groups?.All(g => g.Name != "Content managers") ?? true); 120 } 121 122 // Recaptcha configuration 123 var websitesettings = Dynamicweb.Content.Services.Items.GetItemById<WebsiteSettings>(Model.Area.Item.Id); 124 string recaptchaType = websitesettings.RecaptchaType; 125 string recaptchaKey = websitesettings.RecaptchaKey; 126 } 127 128 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 129 @using System; 130 @using System.Web; 131 @using System.Linq; 132 @using System.Globalization; 133 134 @using Dynamicweb; 135 @using Dynamicweb.Content.Items; 136 @using Dynamicweb.Environment; 137 @using Dynamicweb.Frontend; 138 @using Dynamicweb.Frontend.Navigation; 139 140 @using Bluedesk.Tools.Generic; 141 142 @using Bluedesk.DynamicWeb.ItemTypes; 143 @using Bluedesk.DynamicWeb.ItemTypes.Settings; 144 @using Bluedesk.DynamicWeb.ItemTypes.Settings.Configuration; 145 146 @using Bluedesk.DynamicWeb.ItemTypes.Configuration; 147 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution; 148 @using Bluedesk.DynamicWeb.ItemTypes.Extensions; 149 150 @helper RenderCSSKeyAndValue(string Key, string Value) 151 { 152 if (!string.IsNullOrWhiteSpace(Value)) 153 { 154 <text>@Key : @Value !important;</text> 155 } 156 } 157 158 @helper SetFontCSSVariables(FontConfigurationItemTab FontConfiguration) 159 { 160 161 string Top = FontConfiguration.top != 0 ? FontConfiguration.top.ToString() + "px" : ""; 162 string Left = FontConfiguration.left != 0 ? FontConfiguration.left.ToString() + "px" : ""; 163 string Right = FontConfiguration.right != 0 ? FontConfiguration.right.ToString() + "px" : ""; 164 string Bottom = FontConfiguration.bottom != 0 ? FontConfiguration.bottom.ToString() + "px" : ""; 165 166 string Position = FontConfiguration.PositionAbsolute ? "absolute" : "relative"; 167 168 string Color = FontConfiguration.Color?.GetColorCode(Pageview.AreaID) ?? ""; 169 string BackgroundColor = FontConfiguration.Backgroundcolor?.GetColorCode(Pageview.AreaID) ?? ""; 170 171 string BorderColor = FontConfiguration.BorderColor?.GetColorCode(Pageview.AreaID) ?? ""; 172 string BorderSize = FontConfiguration.BorderSize != 0 ? FontConfiguration.BorderSize.ToString() + "px" : ""; 173 174 <text> 175 176 --Position: @Position; 177 178 @RenderCSSKeyAndValue("--Padding", FontConfiguration.Padding) 179 180 @RenderCSSKeyAndValue("--Top", Top) 181 @RenderCSSKeyAndValue("--Left", Left) 182 @RenderCSSKeyAndValue("--Right", Right) 183 @RenderCSSKeyAndValue("--Bottom", Bottom) 184 185 @RenderCSSKeyAndValue("--Color", Color) 186 @RenderCSSKeyAndValue("--FontSize", FontConfiguration.FontSize) 187 @RenderCSSKeyAndValue("--FontStyle", FontConfiguration.FontStyle) 188 189 @RenderCSSKeyAndValue("--FontWeight", FontConfiguration.FontWeight) 190 @RenderCSSKeyAndValue("--FontFamily", FontConfiguration.FontConfiguration.FontFamily) 191 @RenderCSSKeyAndValue("--LineHeight", FontConfiguration.LineHeight) 192 193 @RenderCSSKeyAndValue("--BackgroundColor", BackgroundColor) 194 @RenderCSSKeyAndValue("--BorderColor", BorderColor) 195 @RenderCSSKeyAndValue("--BorderSize", BorderSize) 196 197 </text> 198 199 } 200 201 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 202 @using System; 203 @using System.Web; 204 @using System.Linq; 205 @using System.Globalization; 206 207 @using Dynamicweb; 208 @using Dynamicweb.Content.Items; 209 @using Dynamicweb.Environment; 210 @using Dynamicweb.Frontend; 211 @using Dynamicweb.Frontend.Navigation; 212 213 @using Bluedesk.Tools.Generic; 214 215 @using Bluedesk.DynamicWeb.ItemTypes; 216 @using Bluedesk.DynamicWeb.ItemTypes.Settings; 217 218 @using Bluedesk.DynamicWeb.ItemTypes.Configuration; 219 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution; 220 @using Bluedesk.DynamicWeb.ItemTypes.Extensions; 221 @using Bluedesk.DynamicWeb.ItemTypes.Settings.Configuration; 222 223 224 <header style="padding: 25px; display: flex; flex-direction: row;"> 225 <div> 226 <h1>Branding Stylesheet</h1> 227 <h2 style="font-weight: normal;">@_data.Title</h2> 228 <button onclick="toggleClass('.slidePanel', 'open'); toggleClass('main', 'blur')" class="togglePanelButton">Open panel</button> 229 </div> 230 <nav style="display: flex; flex-direction: row; margin-left: 50px"> 231 232 @if (System.Web.HttpContext.Current.Session["PreviousPage"] != null) 233 { 234 <a href="/Default.aspx?ID=@System.Web.HttpContext.Current.Session["PreviousPage"]" class="ConfigurationButton"><i class="icon fa-light fa-reply"></i></a> 235 } 236 <a href="/Default.aspx?ID=1598" class="ConfigurationButton"><i class="icon fa-light fa-grid-horizontal"></i><label>Dashboard</label></a> 237 <a href="/Default.aspx?ID=1055" class="ConfigurationButton"><i class="icon fa-light fa-diagram-cells"></i><label>Masters</label></a> 238 <a href="/Default.aspx?ID=1055" class="ConfigurationButton"><i class="icon fa-light fa-link"></i><label>Buttons</label></a> 239 <a href="/Default.aspx?ID=1009" class="ConfigurationButton"><i class="icon fa-light fa-paintbrush"></i><label>Backgrounds</label></a> 240 <a href="/Default.aspx?ID=1460" class="ConfigurationButton"><i class="icon fa-light fa-megaphone"></i><label>Jumbotrons</label></a> 241 <a href="/Default.aspx?ID=1518" class="ConfigurationButton"><i class="icon fa-light fa-brush"></i><label>Themes</label></a> 242 <a href="/Default.aspx?ID=1450" class="ConfigurationButton"><i class="icon fa-light fa-font"></i><label>Fonts</label></a> 243 <a href="/Default.aspx?ID=1514" class="ConfigurationButton"><i class="icon fa-light fa-computer"></i><label>Devices</label></a> 244 245 </nav> 246 </header> 247 <main> 248 <a href="/Default.aspx?ID=@HeaderLayoutID" class="ConfigurationButton"><i class="icon fa-light fa-brush"></i><label>Edit Header configuration</label></a> 249 @RenderGrid(HeaderLayoutID) 250 </main> 251 252 <style> 253 .ConfigurationButton { 254 display: flex; 255 flex-direction: column; 256 height: 100px; 257 width: 100px; 258 margin-right: 25px; 259 padding: 25px; 260 background-color: #f1f1f1; 261 justify-content: center; 262 align-items: center; 263 box-sizing: border-box; 264 text-align: center; 265 font-size: 12px; 266 } 267 268 .ConfigurationButton .icon { 269 font-size: 25px; 270 } 271 </style> 272 273 @Model.Grid("Grid", "Configuration items", "default:true;sort:1", "Configuration") 274 275 @if (font_configuration != null) 276 { 277 foreach (var item in font_configuration.Item.ToCodeFirstItem<Bluedesk.DynamicWeb.ItemTypes.Pages.ConfigurationPagesParent>().GetChildConfigs<FontConfiguration>()) 278 { 279 <link href="@item["FontLink"]" rel="stylesheet"> 280 } 281 } 282 283 <link rel="stylesheet" href="https://pro.fontawesome.com/releases/v5.15.4/css/all.css" integrity="sha384-rqn26AG5Pj86AF4SO72RK5fyefcQ/x32DNQfChxWvbXIyXFePlEktwD18fEz+kQU" crossorigin="anonymous"> 284 <script src="https://kit.fontawesome.com/a46eca85e2.js" crossorigin="anonymous"></script> 285 286 <style> 287 288 body { 289 background-color: #f1f1f1; 290 font-family: 'Barlow', sans-serif; 291 } 292 293 .slidePanel { 294 position: fixed; 295 top: 0; 296 bottom: 0; 297 min-width: 500px; 298 box-shadow: -10px 10px 10px rgb(153 153 255 / 10%); 299 background-color: #FFFFFF; 300 z-index: 1000; 301 box-sizing: border-box; 302 transition: all .5s ease-in; 303 } 304 305 .slidePanel.open { 306 right: 0; 307 } 308 309 .slidePanel { 310 right: -500px; 311 transition: all 0.5s ease-in; 312 } 313 314 .slidePanel__container { 315 display: flex; 316 position: relative; 317 height: 100%; 318 } 319 320 .togglePanelButton { 321 position: fixed; 322 top: 50px; 323 left: 50px; 324 display: flex; 325 justify-content: center; 326 align-items: center; 327 color: white; 328 background-color: black; 329 padding: 0px 25px; 330 height: 50px; 331 cursor: pointer; 332 z-index: 1000; 333 } 334 335 .closeButton { 336 position: absolute; 337 display: flex; 338 top: 25px; 339 right: 25px; 340 font-size: 2rem; 341 text-decoration: none; 342 color: black; 343 } 344 345 346 .blur { 347 filter: blur(4px); 348 pointer-events: none; 349 } 350 351 .sideMenu { 352 display: flex; 353 position: absolute; 354 align-items: center; 355 min-height: 100px; 356 z-index: 1200; 357 top: 0; 358 bottom: 0; 359 right: 100%; 360 } 361 362 .sideMenu__link:first-child { 363 margin-top: 10px; 364 } 365 366 .sideMenu__link { 367 position: relative; 368 flex-direction: column; 369 display: flex; 370 height: 50px; 371 width: 50px; 372 background-color: #f1f1f1; 373 margin-bottom: 10px; 374 margin-left: 10px; 375 margin-right: 10px; 376 justify-content: space-between; 377 align-items: center; 378 font-size: 10px; 379 padding: 10px; 380 box-sizing: border-box; 381 text-decoration: none; 382 color: rgb(22, 101, 123); 383 } 384 385 .sideMenu__link label { 386 font-size: 12px; 387 } 388 389 .sideMenu__link .icon { 390 font-size: 24px; 391 } 392 393 .sideMenu__container { 394 display: flex; 395 position: relative; 396 flex-direction: column; 397 box-shadow: -10px 10px 10px rgb(153 153 255 / 10%); 398 background-color: white; 399 } 400 </style> 401 402 <script> 403 function toggleClass(ClassName, AddedClassName) { 404 var element = document.querySelector(ClassName); 405 if (element.classList.contains(AddedClassName)) { 406 element.classList.remove(AddedClassName); 407 } else { 408 element.classList.add(AddedClassName); 409 } 410 } 411 </script> 412 413 <section class="slidePanel" id="slidePanel"> 414 415 <div class="slidePanel__container"> 416 417 <a href="javasciprt:void(0);" onclick="toggleClass('.slidePanel', 'open'); toggleClass('main', 'blur')" class="closeButton"> 418 <i class="fa-light fa-circle-xmark"></i> 419 </a> 420 421 <nav class="sideMenu"> 422 <section class="sideMenu__container"> 423 <a href="javascript:history.back();" class="sideMenu__link"><i class="icon fa-light fa-reply"></i></a> 424 <a href="/dashboard-configuration" class="sideMenu__link"><i class="icon fa-light fa-grid-horizontal"></i></a> 425 <a href="javasciprt:void(0);" onclick="toggleClass('.slidePanel', 'open'); toggleClass('main', 'blur')" class="sideMenu__link"><i class="icon fa-light fa-diagram-cells"></i></a> 426 <a href="/button-configuration" class="sideMenu__link"><i class="icon fa-light fa-link"></i></a> 427 <a href="/background-configuration" class="sideMenu__link"><i class="icon fa-light fa-paintbrush"></i></a> 428 <a href="/jumbotron-configuration" class="sideMenu__link"><i class="icon fa-light fa-megaphone"></i></a> 429 <a href="/theme-configuration-page/theme-01" class="sideMenu__link"><i class="icon fa-light fa-brush"></i></a> 430 <a href="/font-configuration" class="sideMenu__link"><i class="icon fa-light fa-font"></i></a> 431 <a href="/device-manager" class="sideMenu__link"><i class="icon fa-light fa-computer"></i></a> 432 </section> 433 </nav> 434 435 @{ 436 MasterConfigurationPage MCPage = Dynamicweb.Services.Items.GetItemById<MasterConfigurationPage>(Model.Area.Item.Id); 437 } 438 439 <ul> 440 @foreach (Dynamicweb.Content.Page MasterConfigurationPage in Dynamicweb.Services.Pages.GetPagesByParentID(Pageview.Page.ParentPageId)) 441 { 442 MCPage = Dynamicweb.Services.Items.GetItemById<MasterConfigurationPage>(MasterConfigurationPage.ID.ToString()); 443 444 <li><a href="/Default.aspx?ID=@MasterConfigurationPage.ID">Link naar master @MasterConfigurationPage.ID</a></li> 445 446 } 447 </ul> 448 449 </div> 450 451 </section> 452 453 </body> 454 </html> 455