Error compiling template "Designs/VanBuuren_generated/_parsed/HeaderConfigurationPage.parsed.cshtml"
Line 402: 'Services' is obsolete: 'Use Dynamicweb.Content.Services instead.'
Line 402: 'Services.Items' is obsolete: 'Use Dynamicweb.Content.Services.Items instead.'
Line 403: 'Services' is obsolete: 'Use Dynamicweb.Content.Services instead.'
Line 403: 'Services.Pages' is obsolete: 'Use Dynamicweb.Content.Services.Pages instead.'
Line 471: 'Services' is obsolete: 'Use Dynamicweb.Content.Services instead.'
Line 471: 'Services.Pages' is obsolete: 'Use Dynamicweb.Content.Services.Pages instead.'
Line 502: A local or parameter named 'websitesettings' cannot be declared in this scope because that name is used in an enclosing local scope to define a local or parameter

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 171 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\HeaderConfigurationPage.parsed.cshtml" 14 using System; 15 16 #line default 17 #line hidden 18 using System.Collections.Generic; 19 20 #line 173 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\HeaderConfigurationPage.parsed.cshtml" 21 using System.Linq; 22 23 #line default 24 #line hidden 25 26 #line 176 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\HeaderConfigurationPage.parsed.cshtml" 27 using Dynamicweb; 28 29 #line default 30 #line hidden 31 32 #line 182 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\HeaderConfigurationPage.parsed.cshtml" 33 using Bluedesk.Tools.Generic; 34 35 #line default 36 #line hidden 37 38 #line 174 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\HeaderConfigurationPage.parsed.cshtml" 39 using System.Globalization; 40 41 #line default 42 #line hidden 43 44 #line 177 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\HeaderConfigurationPage.parsed.cshtml" 45 using Dynamicweb.Content.Items; 46 47 #line default 48 #line hidden 49 50 #line 184 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\HeaderConfigurationPage.parsed.cshtml" 51 using Bluedesk.DynamicWeb.ItemTypes; 52 53 #line default 54 #line hidden 55 56 #line 185 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\HeaderConfigurationPage.parsed.cshtml" 57 using Bluedesk.DynamicWeb.ItemTypes.Settings; 58 59 #line default 60 #line hidden 61 62 #line 172 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\HeaderConfigurationPage.parsed.cshtml" 63 using System.Web; 64 65 #line default 66 #line hidden 67 68 #line 178 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\HeaderConfigurationPage.parsed.cshtml" 69 using Dynamicweb.Environment; 70 71 #line default 72 #line hidden 73 74 #line 179 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\HeaderConfigurationPage.parsed.cshtml" 75 using Dynamicweb.Frontend; 76 77 #line default 78 #line hidden 79 80 #line 180 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\HeaderConfigurationPage.parsed.cshtml" 81 using Dynamicweb.Frontend.Navigation; 82 83 #line default 84 #line hidden 85 86 #line 190 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\HeaderConfigurationPage.parsed.cshtml" 87 using Bluedesk.DynamicWeb.ItemTypes.Settings.Configuration; 88 89 #line default 90 #line hidden 91 92 #line 187 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\HeaderConfigurationPage.parsed.cshtml" 93 using Bluedesk.DynamicWeb.ItemTypes.Configuration; 94 95 #line default 96 #line hidden 97 98 #line 188 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\HeaderConfigurationPage.parsed.cshtml" 99 using Bluedesk.DynamicWeb.ItemTypes.BaseSolution; 100 101 #line default 102 #line hidden 103 104 #line 56 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\HeaderConfigurationPage.parsed.cshtml" 105 using Bluedesk.DynamicWeb.ItemTypes.BaseSolution.Frontend; 106 107 #line default 108 #line hidden 109 110 #line 189 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\HeaderConfigurationPage.parsed.cshtml" 111 using Bluedesk.DynamicWeb.ItemTypes.Extensions; 112 113 #line default 114 #line hidden 115 116 117 public class RazorEngine_5424e384acd446779ae3bcda925bb382 : Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> { 118 119 #line hidden 120 121 #line 119 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\HeaderConfigurationPage.parsed.cshtml" 122 public RazorEngine.Templating.TemplateWriter RenderCSSKeyAndValue(string Key, string Value) 123 { 124 #line default 125 #line hidden 126 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 127 128 #line 120 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\HeaderConfigurationPage.parsed.cshtml" 129 130 if (!string.IsNullOrWhiteSpace(Value)) 131 { 132 133 134 #line default 135 #line hidden 136 WriteLiteralTo(__razor_helper_writer, "\t\t"); 137 138 139 #line 123 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\HeaderConfigurationPage.parsed.cshtml" 140 WriteTo(__razor_helper_writer, Key); 141 142 143 #line default 144 #line hidden 145 WriteLiteralTo(__razor_helper_writer, " : "); 146 147 148 #line 123 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\HeaderConfigurationPage.parsed.cshtml" 149 WriteTo(__razor_helper_writer, Value); 150 151 152 #line default 153 #line hidden 154 WriteLiteralTo(__razor_helper_writer, " !important;"); 155 156 WriteLiteralTo(__razor_helper_writer, "\r\n"); 157 158 159 #line 124 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\HeaderConfigurationPage.parsed.cshtml" 160 } 161 162 163 #line default 164 #line hidden 165 }); 166 167 #line 125 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\HeaderConfigurationPage.parsed.cshtml" 168 } 169 #line default 170 #line hidden 171 172 173 #line 127 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\HeaderConfigurationPage.parsed.cshtml" 174 public RazorEngine.Templating.TemplateWriter SetFontCSSVariables(FontConfigurationItemTab FontConfiguration) 175 { 176 #line default 177 #line hidden 178 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 179 180 #line 128 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\HeaderConfigurationPage.parsed.cshtml" 181 182 183 string Top = FontConfiguration.top != 0 ? FontConfiguration.top.ToString() + "px" : ""; 184 string Left = FontConfiguration.left != 0 ? FontConfiguration.left.ToString() + "px" : ""; 185 string Right = FontConfiguration.right != 0 ? FontConfiguration.right.ToString() + "px" : ""; 186 string Bottom = FontConfiguration.bottom != 0 ? FontConfiguration.bottom.ToString() + "px" : ""; 187 188 string Position = FontConfiguration.PositionAbsolute ? "absolute" : "relative"; 189 190 string Color = FontConfiguration.Color?.GetColorCode(Pageview.AreaID) ?? ""; 191 string BackgroundColor = FontConfiguration.Backgroundcolor?.GetColorCode(Pageview.AreaID) ?? ""; 192 193 string BorderColor = FontConfiguration.BorderColor?.GetColorCode(Pageview.AreaID) ?? ""; 194 string BorderSize = FontConfiguration.BorderSize != 0 ? FontConfiguration.BorderSize.ToString() + "px" : ""; 195 196 197 198 #line default 199 #line hidden 200 WriteLiteralTo(__razor_helper_writer, "\t"); 201 202 WriteLiteralTo(__razor_helper_writer, "\r\n\r\n\t\t--Position:\t\t"); 203 204 205 #line 145 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\HeaderConfigurationPage.parsed.cshtml" 206 WriteTo(__razor_helper_writer, Position); 207 208 209 #line default 210 #line hidden 211 WriteLiteralTo(__razor_helper_writer, ";\r\n\r\n"); 212 213 WriteLiteralTo(__razor_helper_writer, "\t\t"); 214 215 216 #line 147 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\HeaderConfigurationPage.parsed.cshtml" 217 WriteTo(__razor_helper_writer, RenderCSSKeyAndValue("--Padding", FontConfiguration.Padding)); 218 219 220 #line default 221 #line hidden 222 WriteLiteralTo(__razor_helper_writer, "\r\n\r\n"); 223 224 WriteLiteralTo(__razor_helper_writer, "\t\t"); 225 226 227 #line 149 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\HeaderConfigurationPage.parsed.cshtml" 228 WriteTo(__razor_helper_writer, RenderCSSKeyAndValue("--Top", Top)); 229 230 231 #line default 232 #line hidden 233 WriteLiteralTo(__razor_helper_writer, "\r\n"); 234 235 WriteLiteralTo(__razor_helper_writer, "\t\t"); 236 237 238 #line 150 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\HeaderConfigurationPage.parsed.cshtml" 239 WriteTo(__razor_helper_writer, RenderCSSKeyAndValue("--Left", Left)); 240 241 242 #line default 243 #line hidden 244 WriteLiteralTo(__razor_helper_writer, "\r\n"); 245 246 WriteLiteralTo(__razor_helper_writer, "\t\t"); 247 248 249 #line 151 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\HeaderConfigurationPage.parsed.cshtml" 250 WriteTo(__razor_helper_writer, RenderCSSKeyAndValue("--Right", Right)); 251 252 253 #line default 254 #line hidden 255 WriteLiteralTo(__razor_helper_writer, "\r\n"); 256 257 WriteLiteralTo(__razor_helper_writer, "\t\t"); 258 259 260 #line 152 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\HeaderConfigurationPage.parsed.cshtml" 261 WriteTo(__razor_helper_writer, RenderCSSKeyAndValue("--Bottom", Bottom)); 262 263 264 #line default 265 #line hidden 266 WriteLiteralTo(__razor_helper_writer, "\r\n\r\n"); 267 268 WriteLiteralTo(__razor_helper_writer, "\t\t"); 269 270 271 #line 154 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\HeaderConfigurationPage.parsed.cshtml" 272 WriteTo(__razor_helper_writer, RenderCSSKeyAndValue("--Color", Color)); 273 274 275 #line default 276 #line hidden 277 WriteLiteralTo(__razor_helper_writer, "\r\n"); 278 279 WriteLiteralTo(__razor_helper_writer, "\t\t"); 280 281 282 #line 155 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\HeaderConfigurationPage.parsed.cshtml" 283 WriteTo(__razor_helper_writer, RenderCSSKeyAndValue("--FontSize", FontConfiguration.FontSize)); 284 285 286 #line default 287 #line hidden 288 WriteLiteralTo(__razor_helper_writer, "\r\n"); 289 290 WriteLiteralTo(__razor_helper_writer, "\t\t"); 291 292 293 #line 156 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\HeaderConfigurationPage.parsed.cshtml" 294 WriteTo(__razor_helper_writer, RenderCSSKeyAndValue("--FontStyle", FontConfiguration.FontStyle)); 295 296 297 #line default 298 #line hidden 299 WriteLiteralTo(__razor_helper_writer, "\r\n\r\n"); 300 301 WriteLiteralTo(__razor_helper_writer, "\t\t"); 302 303 304 #line 158 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\HeaderConfigurationPage.parsed.cshtml" 305 WriteTo(__razor_helper_writer, RenderCSSKeyAndValue("--FontWeight", FontConfiguration.FontWeight)); 306 307 308 #line default 309 #line hidden 310 WriteLiteralTo(__razor_helper_writer, "\r\n"); 311 312 WriteLiteralTo(__razor_helper_writer, "\t\t"); 313 314 315 #line 159 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\HeaderConfigurationPage.parsed.cshtml" 316 WriteTo(__razor_helper_writer, RenderCSSKeyAndValue("--FontFamily", FontConfiguration.FontConfiguration.FontFamily)); 317 318 319 #line default 320 #line hidden 321 WriteLiteralTo(__razor_helper_writer, "\r\n"); 322 323 WriteLiteralTo(__razor_helper_writer, "\t\t"); 324 325 326 #line 160 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\HeaderConfigurationPage.parsed.cshtml" 327 WriteTo(__razor_helper_writer, RenderCSSKeyAndValue("--LineHeight", FontConfiguration.LineHeight)); 328 329 330 #line default 331 #line hidden 332 WriteLiteralTo(__razor_helper_writer, "\r\n\r\n"); 333 334 WriteLiteralTo(__razor_helper_writer, "\t\t"); 335 336 337 #line 162 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\HeaderConfigurationPage.parsed.cshtml" 338 WriteTo(__razor_helper_writer, RenderCSSKeyAndValue("--BackgroundColor", BackgroundColor)); 339 340 341 #line default 342 #line hidden 343 WriteLiteralTo(__razor_helper_writer, "\r\n"); 344 345 WriteLiteralTo(__razor_helper_writer, "\t\t"); 346 347 348 #line 163 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\HeaderConfigurationPage.parsed.cshtml" 349 WriteTo(__razor_helper_writer, RenderCSSKeyAndValue("--BorderColor", BorderColor)); 350 351 352 #line default 353 #line hidden 354 WriteLiteralTo(__razor_helper_writer, "\r\n"); 355 356 WriteLiteralTo(__razor_helper_writer, "\t\t"); 357 358 359 #line 164 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\HeaderConfigurationPage.parsed.cshtml" 360 WriteTo(__razor_helper_writer, RenderCSSKeyAndValue("--BorderSize", BorderSize)); 361 362 363 #line default 364 #line hidden 365 WriteLiteralTo(__razor_helper_writer, "\r\n\r\n\t"); 366 367 WriteLiteralTo(__razor_helper_writer, "\r\n"); 368 369 370 #line 167 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\HeaderConfigurationPage.parsed.cshtml" 371 372 373 374 #line default 375 #line hidden 376 }); 377 378 #line 168 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\HeaderConfigurationPage.parsed.cshtml" 379 } 380 #line default 381 #line hidden 382 383 384 public RazorEngine_5424e384acd446779ae3bcda925bb382() { 385 } 386 387 public override void Execute() { 388 WriteLiteral("\r\n"); 389 390 391 #line 9 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\HeaderConfigurationPage.parsed.cshtml" 392 Write(Title("Configuration page template")); 393 394 395 #line default 396 #line hidden 397 WriteLiteral("\r\n\r\n"); 398 399 400 #line 11 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\HeaderConfigurationPage.parsed.cshtml" 401 402 var websitesettings = Dynamicweb.Services.Items.GetItemById<WebsiteSettings>(Model.Area.Item.Id); 403 var font_configuration = Dynamicweb.Services.Pages.GetPageByNavigationTag(Pageview.AreaID, "FontConfiguration"); 404 405 var designRoot = "/Files/Templates/Designs/" + Pageview.Area.Layout.Design.Name; 406 var appcss = Cache.VersionedFile(designRoot + "/dist/app.css"); 407 408 bool isVisualEdit = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.QueryString.Get("VisualEdit")) ? Convert.ToBoolean(Dynamicweb.Context.Current.Request.QueryString.Get("VisualEdit")) : false; 409 410 411 #line default 412 #line hidden 413 WriteLiteral("\r\n\r\n"); 414 415 416 #line 21 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\HeaderConfigurationPage.parsed.cshtml" 417 if (isVisualEdit) 418 { 419 420 421 422 #line default 423 #line hidden 424 WriteLiteral("\t<!DOCTYPE html>\r\n"); 425 426 WriteLiteral("\t<html"); 427 428 WriteLiteral(" prefix=\"og: http://ogp.me/ns#\""); 429 430 WriteLiteral(">\r\n\t<head>\r\n\r\n\t</head>\r\n\t<body>\r\n\t\t<link"); 431 432 WriteAttribute("href", Tuple.Create(" href=\"", 1033), Tuple.Create("\"", 1047) 433 434 #line 30 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\HeaderConfigurationPage.parsed.cshtml" 435 , Tuple.Create(Tuple.Create("", 1040), Tuple.Create<System.Object, System.Int32>(appcss 436 437 #line default 438 #line hidden 439 , 1040), false) 440 ); 441 442 WriteLiteral(" rel=\"stylesheet\""); 443 444 WriteLiteral(" />\r\n"); 445 446 447 #line 31 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\HeaderConfigurationPage.parsed.cshtml" 448 449 450 #line default 451 #line hidden 452 WriteLiteral("\r\n"); 453 454 WriteLiteral("\r\n"); 455 456 WriteLiteral("\r\n"); 457 458 WriteLiteral("\r\n"); 459 460 WriteLiteral("\r\n"); 461 462 WriteLiteral("\r\n"); 463 464 WriteLiteral("\r\n"); 465 466 467 #line 58 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\HeaderConfigurationPage.parsed.cshtml" 468 469 470 // Hydrated once per request: the product detail template (rendered before the master) reads the same MasterConfig. 471 MasterConfig mc = application._webapi.Helper.RenderCache.GetForRequest("MasterConfig_" + Pageview.AreaID, () => Dynamicweb.Services.Pages.GetPageByNavigationTag(Pageview.AreaID, "MasterConfiguration").Item.ToCodeFirstItem<MasterConfig>()); 472 473 string MasterConfigCssClass = !string.IsNullOrWhiteSpace(mc.CssClass) ? mc.CssClass : ""; 474 475 // GeneralConfig GeneralConfiguration = mc.GeneralConfiguration; 476 EcomConfig EcommerceConfiguration = mc.EcomConfiguration; 477 478 bool WithVATBool = Pageview.Area.EcomPricesWithVat == "True"; 479 bool pricesWithoutVatForUsers = EcommerceConfiguration.ShowPricesWithoutVatForUsers; 480 bool pricesWithoutVatForValidVat = EcommerceConfiguration.ShowPricesWithoutVatWhenValidVatNumber; 481 if (pricesWithoutVatForUsers && !pricesWithoutVatForValidVat && Pageview.User != null) 482 { 483 WithVATBool = false; 484 } 485 if (pricesWithoutVatForValidVat && Pageview.User != null && !string.IsNullOrWhiteSpace(Pageview.User.VatRegNumber)) 486 { 487 WithVATBool = false; 488 } 489 string ecomShowPricesWithVat = WithVATBool.ToString().ToLower(); 490 string ecomPricesFormatted = (EcommerceConfiguration.FormattedPrices).ToString().ToLower(); 491 492 bool IsNotContentManager = false; 493 bool isVisualEditor = Pageview.IsVisualEditorMode; 494 495 if (isVisualEditor) 496 { 497 System.Web.HttpContext.Current.Session["PreviousPage"] = Pageview.Page.ID; 498 IsNotContentManager = (Dynamicweb.Security.UserManagement.User.GetCurrentBackendUser()?.Groups?.All(g => g.Name != "Content managers") ?? true); 499 } 500 501 // Recaptcha configuration 502 var websitesettings = Dynamicweb.Content.Services.Items.GetItemById<WebsiteSettings>(Model.Area.Item.Id); 503 string recaptchaType = websitesettings.RecaptchaType; 504 string recaptchaKey = websitesettings.RecaptchaKey; 505 506 507 #line default 508 #line hidden 509 WriteLiteral("\r\n\r\n"); 510 511 512 #line 97 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\HeaderConfigurationPage.parsed.cshtml" 513 514 515 #line default 516 #line hidden 517 WriteLiteral("\r\n"); 518 519 WriteLiteral("\r\n"); 520 521 WriteLiteral("\r\n"); 522 523 WriteLiteral("\r\n"); 524 525 WriteLiteral("\r\n"); 526 527 WriteLiteral("\r\n"); 528 529 WriteLiteral("\r\n"); 530 531 532 #line 170 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\HeaderConfigurationPage.parsed.cshtml" 533 534 535 #line default 536 #line hidden 537 WriteLiteral("\r\n"); 538 539 WriteLiteral("\r\n"); 540 541 WriteLiteral("\r\n"); 542 543 WriteLiteral("\r\n"); 544 545 WriteLiteral("\r\n\r\n\t\t<header"); 546 547 WriteLiteral(" style=\"padding: 25px; display: flex; flex-direction: row;\""); 548 549 WriteLiteral(">\r\n\t\t\t<div>\r\n\t\t\t\t<h1>Branding Stylesheet</h1>\r\n\t\t\t\t<h2"); 550 551 WriteLiteral(" style=\"font-weight: normal;\""); 552 553 WriteLiteral(">"); 554 555 556 #line 196 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\HeaderConfigurationPage.parsed.cshtml" 557 Write(Model.Title); 558 559 560 #line default 561 #line hidden 562 WriteLiteral("</h2>\r\n\t\t\t</div>\r\n\t\t\t<nav"); 563 564 WriteLiteral(" style=\"display: flex; flex-direction: row; margin-left: 50px\""); 565 566 WriteLiteral(">\r\n\r\n\t\t\t\t<a"); 567 568 WriteLiteral(" href=\"javascript:history.back();\""); 569 570 WriteLiteral(" class=\"ConfigurationButton\""); 571 572 WriteLiteral("><i"); 573 574 WriteLiteral(" class=\"icon fa-light fa-reply\""); 575 576 WriteLiteral("></i><label>Terug</label></a>\r\n\t\t\t\t<a"); 577 578 WriteLiteral(" href=\"/Default.aspx?ID=1598\""); 579 580 WriteLiteral(" class=\"ConfigurationButton\""); 581 582 WriteLiteral("><i"); 583 584 WriteLiteral(" class=\"icon fa-light fa-diagram-cells\""); 585 586 WriteLiteral("></i><label>Dashboard</label></a>\r\n\t\t\t\t<a"); 587 588 WriteLiteral(" href=\"/Default.aspx?ID=1055\""); 589 590 WriteLiteral(" class=\"ConfigurationButton\""); 591 592 WriteLiteral("><i"); 593 594 WriteLiteral(" class=\"icon fa-light fa-diagram-cells\""); 595 596 WriteLiteral("></i><label>Masters</label></a>\r\n\t\t\t\t<a"); 597 598 WriteLiteral(" href=\"/Default.aspx?ID=1055\""); 599 600 WriteLiteral(" class=\"ConfigurationButton\""); 601 602 WriteLiteral("><i"); 603 604 WriteLiteral(" class=\"icon fa-light fa-link\""); 605 606 WriteLiteral("></i><label>Buttons</label></a>\r\n\t\t\t\t<a"); 607 608 WriteLiteral(" href=\"/Default.aspx?ID=1009\""); 609 610 WriteLiteral(" class=\"ConfigurationButton\""); 611 612 WriteLiteral("><i"); 613 614 WriteLiteral(" class=\"icon fa-light fa-paintbrush\""); 615 616 WriteLiteral("></i><label>Backgrounds</label></a>\r\n\t\t\t\t<a"); 617 618 WriteLiteral(" href=\"/Default.aspx?ID=1460\""); 619 620 WriteLiteral(" class=\"ConfigurationButton\""); 621 622 WriteLiteral("><i"); 623 624 WriteLiteral(" class=\"icon fa-light fa-megaphone\""); 625 626 WriteLiteral("></i><label>Jumbotrons</label></a>\r\n\t\t\t\t<a"); 627 628 WriteLiteral(" href=\"/Default.aspx?ID=1518\""); 629 630 WriteLiteral(" class=\"ConfigurationButton\""); 631 632 WriteLiteral("><i"); 633 634 WriteLiteral(" class=\"icon fa-light fa-brush\""); 635 636 WriteLiteral("></i><label>Themes</label></a>\r\n\t\t\t\t<a"); 637 638 WriteLiteral(" href=\"/Default.aspx?ID=1450\""); 639 640 WriteLiteral(" class=\"ConfigurationButton\""); 641 642 WriteLiteral("><i"); 643 644 WriteLiteral(" class=\"icon fa-light fa-font\""); 645 646 WriteLiteral("></i><label>Fonts</label></a>\r\n\t\t\t\t<a"); 647 648 WriteLiteral(" href=\"/Default.aspx?ID=1514\""); 649 650 WriteLiteral(" class=\"ConfigurationButton\""); 651 652 WriteLiteral("><i"); 653 654 WriteLiteral(" class=\"icon fa-light fa-computer\""); 655 656 WriteLiteral(@"></i><label>Devices</label></a> 657 658 </nav> 659 </header> 660 661 <style> 662 .ConfigurationButton { 663 display: flex; 664 flex-direction: column; 665 height: 100px; 666 width: 100px; 667 margin-right: 25px; 668 padding: 25px; 669 background-color: #f1f1f1; 670 justify-content: center; 671 align-items: center; 672 box-sizing: border-box; 673 text-align: center; 674 font-size: 12px; 675 } 676 677 .ConfigurationButton .icon { 678 font-size: 25px; 679 } 680 </style> 681 682 <h2><i"); 683 684 WriteLiteral(" class=\"fas fa-desktop-alt\""); 685 686 WriteLiteral("></i> Desktop</h2>\r\n\t\t<div"); 687 688 WriteLiteral(" style=\"display: flex; flex-direction: column; padding: 25px; background-color:#f" + 689 "1f1f1; margin-bottom: 50px;\""); 690 691 WriteLiteral(">\r\n"); 692 693 WriteLiteral("\t\t\t"); 694 695 696 #line 236 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\HeaderConfigurationPage.parsed.cshtml" 697 Write(Model.Grid("HeaderLayoutDesktop", "Header Layout", "default:true;sort:1", "Configuration/Layout/Header")); 698 699 700 #line default 701 #line hidden 702 WriteLiteral("\r\n\t\t</div>\r\n\r\n"); 703 704 705 #line 239 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\HeaderConfigurationPage.parsed.cshtml" 706 707 708 #line default 709 #line hidden 710 711 #line 239 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\HeaderConfigurationPage.parsed.cshtml" 712 if (font_configuration != null) 713 { 714 foreach (var item in font_configuration.Item.ToCodeFirstItem<Bluedesk.DynamicWeb.ItemTypes.Pages.ConfigurationPagesParent>().GetChildConfigs<FontConfiguration>()) 715 { 716 717 718 #line default 719 #line hidden 720 WriteLiteral("\t\t\t\t<link"); 721 722 WriteAttribute("href", Tuple.Create(" href=\"", 9523), Tuple.Create("\"", 9547) 723 724 #line 243 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\HeaderConfigurationPage.parsed.cshtml" 725 , Tuple.Create(Tuple.Create("", 9530), Tuple.Create<System.Object, System.Int32>(item["FontLink"] 726 727 #line default 728 #line hidden 729 , 9530), false) 730 ); 731 732 WriteLiteral(" rel=\"stylesheet\""); 733 734 WriteLiteral(">\r\n"); 735 736 737 #line 244 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\HeaderConfigurationPage.parsed.cshtml" 738 } 739 } 740 741 742 #line default 743 #line hidden 744 WriteLiteral("\r\n\t\t<link"); 745 746 WriteLiteral(" rel=\"stylesheet\""); 747 748 WriteLiteral(" href=\"https://pro.fontawesome.com/releases/v5.15.4/css/all.css\""); 749 750 WriteLiteral(" integrity=\"sha384-rqn26AG5Pj86AF4SO72RK5fyefcQ/x32DNQfChxWvbXIyXFePlEktwD18fEz+k" + 751 "QU\""); 752 753 WriteLiteral(" crossorigin=\"anonymous\""); 754 755 WriteLiteral(">\r\n\t\t<script"); 756 757 WriteLiteral(" src=\"https://kit.fontawesome.com/a46eca85e2.js\""); 758 759 WriteLiteral(" crossorigin=\"anonymous\""); 760 761 WriteLiteral("></script>\r\n\t</body>\r\n\t</html>\r\n"); 762 763 764 #line 251 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\HeaderConfigurationPage.parsed.cshtml" 765 766 } 767 else 768 { 769 770 771 #line default 772 #line hidden 773 WriteLiteral("\t<h1>Default header</h1>\r\n"); 774 775 776 #line 256 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\HeaderConfigurationPage.parsed.cshtml" 777 } 778 779 780 #line default 781 #line hidden 782 } 783 } 784 } 785

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 2 @using Dynamicweb; 3 @using Bluedesk.Tools.Generic; 4 @using System.Globalization; 5 @using Dynamicweb.Content.Items; 6 @using Bluedesk.DynamicWeb.ItemTypes; 7 @using Bluedesk.DynamicWeb.ItemTypes.Settings; 8 9 @Title("Configuration page template") 10 11 @{ 12 var websitesettings = Dynamicweb.Services.Items.GetItemById<WebsiteSettings>(Model.Area.Item.Id); 13 var font_configuration = Dynamicweb.Services.Pages.GetPageByNavigationTag(Pageview.AreaID, "FontConfiguration"); 14 15 var designRoot = "/Files/Templates/Designs/" + Pageview.Area.Layout.Design.Name; 16 var appcss = Cache.VersionedFile(designRoot + "/dist/app.css"); 17 18 bool isVisualEdit = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.QueryString.Get("VisualEdit")) ? Convert.ToBoolean(Dynamicweb.Context.Current.Request.QueryString.Get("VisualEdit")) : false; 19 } 20 21 @if (isVisualEdit) 22 { 23 24 <!DOCTYPE html> 25 <html prefix="og: http://ogp.me/ns#"> 26 <head> 27 28 </head> 29 <body> 30 <link href="@appcss" rel="stylesheet" /> 31 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 32 33 @using System; 34 @using System.Web; 35 @using System.Linq; 36 @using System.Globalization; 37 38 @using Dynamicweb; 39 @using Dynamicweb.Content.Items; 40 @using Dynamicweb.Environment; 41 @using Dynamicweb.Frontend; 42 @using Dynamicweb.Frontend.Navigation; 43 44 @using Bluedesk.Tools.Generic; 45 46 @using Bluedesk.DynamicWeb.ItemTypes; 47 @using Bluedesk.DynamicWeb.ItemTypes.Settings; 48 @using Bluedesk.DynamicWeb.ItemTypes.Settings.Configuration; 49 50 @using Bluedesk.DynamicWeb.ItemTypes.Configuration; 51 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution; 52 53 @using Bluedesk.DynamicWeb.ItemTypes.Configuration; 54 55 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution; 56 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution.Frontend; 57 58 @{ 59 60 // Hydrated once per request: the product detail template (rendered before the master) reads the same MasterConfig. 61 MasterConfig mc = application._webapi.Helper.RenderCache.GetForRequest("MasterConfig_" + Pageview.AreaID, () => Dynamicweb.Services.Pages.GetPageByNavigationTag(Pageview.AreaID, "MasterConfiguration").Item.ToCodeFirstItem<MasterConfig>()); 62 63 string MasterConfigCssClass = !string.IsNullOrWhiteSpace(mc.CssClass) ? mc.CssClass : ""; 64 65 // GeneralConfig GeneralConfiguration = mc.GeneralConfiguration; 66 EcomConfig EcommerceConfiguration = mc.EcomConfiguration; 67 68 bool WithVATBool = Pageview.Area.EcomPricesWithVat == "True"; 69 bool pricesWithoutVatForUsers = EcommerceConfiguration.ShowPricesWithoutVatForUsers; 70 bool pricesWithoutVatForValidVat = EcommerceConfiguration.ShowPricesWithoutVatWhenValidVatNumber; 71 if (pricesWithoutVatForUsers && !pricesWithoutVatForValidVat && Pageview.User != null) 72 { 73 WithVATBool = false; 74 } 75 if (pricesWithoutVatForValidVat && Pageview.User != null && !string.IsNullOrWhiteSpace(Pageview.User.VatRegNumber)) 76 { 77 WithVATBool = false; 78 } 79 string ecomShowPricesWithVat = WithVATBool.ToString().ToLower(); 80 string ecomPricesFormatted = (EcommerceConfiguration.FormattedPrices).ToString().ToLower(); 81 82 bool IsNotContentManager = false; 83 bool isVisualEditor = Pageview.IsVisualEditorMode; 84 85 if (isVisualEditor) 86 { 87 System.Web.HttpContext.Current.Session["PreviousPage"] = Pageview.Page.ID; 88 IsNotContentManager = (Dynamicweb.Security.UserManagement.User.GetCurrentBackendUser()?.Groups?.All(g => g.Name != "Content managers") ?? true); 89 } 90 91 // Recaptcha configuration 92 var websitesettings = Dynamicweb.Content.Services.Items.GetItemById<WebsiteSettings>(Model.Area.Item.Id); 93 string recaptchaType = websitesettings.RecaptchaType; 94 string recaptchaKey = websitesettings.RecaptchaKey; 95 } 96 97 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 98 @using System; 99 @using System.Web; 100 @using System.Linq; 101 @using System.Globalization; 102 103 @using Dynamicweb; 104 @using Dynamicweb.Content.Items; 105 @using Dynamicweb.Environment; 106 @using Dynamicweb.Frontend; 107 @using Dynamicweb.Frontend.Navigation; 108 109 @using Bluedesk.Tools.Generic; 110 111 @using Bluedesk.DynamicWeb.ItemTypes; 112 @using Bluedesk.DynamicWeb.ItemTypes.Settings; 113 @using Bluedesk.DynamicWeb.ItemTypes.Settings.Configuration; 114 115 @using Bluedesk.DynamicWeb.ItemTypes.Configuration; 116 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution; 117 @using Bluedesk.DynamicWeb.ItemTypes.Extensions; 118 119 @helper RenderCSSKeyAndValue(string Key, string Value) 120 { 121 if (!string.IsNullOrWhiteSpace(Value)) 122 { 123 <text>@Key : @Value !important;</text> 124 } 125 } 126 127 @helper SetFontCSSVariables(FontConfigurationItemTab FontConfiguration) 128 { 129 130 string Top = FontConfiguration.top != 0 ? FontConfiguration.top.ToString() + "px" : ""; 131 string Left = FontConfiguration.left != 0 ? FontConfiguration.left.ToString() + "px" : ""; 132 string Right = FontConfiguration.right != 0 ? FontConfiguration.right.ToString() + "px" : ""; 133 string Bottom = FontConfiguration.bottom != 0 ? FontConfiguration.bottom.ToString() + "px" : ""; 134 135 string Position = FontConfiguration.PositionAbsolute ? "absolute" : "relative"; 136 137 string Color = FontConfiguration.Color?.GetColorCode(Pageview.AreaID) ?? ""; 138 string BackgroundColor = FontConfiguration.Backgroundcolor?.GetColorCode(Pageview.AreaID) ?? ""; 139 140 string BorderColor = FontConfiguration.BorderColor?.GetColorCode(Pageview.AreaID) ?? ""; 141 string BorderSize = FontConfiguration.BorderSize != 0 ? FontConfiguration.BorderSize.ToString() + "px" : ""; 142 143 <text> 144 145 --Position: @Position; 146 147 @RenderCSSKeyAndValue("--Padding", FontConfiguration.Padding) 148 149 @RenderCSSKeyAndValue("--Top", Top) 150 @RenderCSSKeyAndValue("--Left", Left) 151 @RenderCSSKeyAndValue("--Right", Right) 152 @RenderCSSKeyAndValue("--Bottom", Bottom) 153 154 @RenderCSSKeyAndValue("--Color", Color) 155 @RenderCSSKeyAndValue("--FontSize", FontConfiguration.FontSize) 156 @RenderCSSKeyAndValue("--FontStyle", FontConfiguration.FontStyle) 157 158 @RenderCSSKeyAndValue("--FontWeight", FontConfiguration.FontWeight) 159 @RenderCSSKeyAndValue("--FontFamily", FontConfiguration.FontConfiguration.FontFamily) 160 @RenderCSSKeyAndValue("--LineHeight", FontConfiguration.LineHeight) 161 162 @RenderCSSKeyAndValue("--BackgroundColor", BackgroundColor) 163 @RenderCSSKeyAndValue("--BorderColor", BorderColor) 164 @RenderCSSKeyAndValue("--BorderSize", BorderSize) 165 166 </text> 167 168 } 169 170 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 171 @using System; 172 @using System.Web; 173 @using System.Linq; 174 @using System.Globalization; 175 176 @using Dynamicweb; 177 @using Dynamicweb.Content.Items; 178 @using Dynamicweb.Environment; 179 @using Dynamicweb.Frontend; 180 @using Dynamicweb.Frontend.Navigation; 181 182 @using Bluedesk.Tools.Generic; 183 184 @using Bluedesk.DynamicWeb.ItemTypes; 185 @using Bluedesk.DynamicWeb.ItemTypes.Settings; 186 187 @using Bluedesk.DynamicWeb.ItemTypes.Configuration; 188 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution; 189 @using Bluedesk.DynamicWeb.ItemTypes.Extensions; 190 @using Bluedesk.DynamicWeb.ItemTypes.Settings.Configuration; 191 192 193 <header style="padding: 25px; display: flex; flex-direction: row;"> 194 <div> 195 <h1>Branding Stylesheet</h1> 196 <h2 style="font-weight: normal;">@Model.Title</h2> 197 </div> 198 <nav style="display: flex; flex-direction: row; margin-left: 50px"> 199 200 <a href="javascript:history.back();" class="ConfigurationButton"><i class="icon fa-light fa-reply"></i><label>Terug</label></a> 201 <a href="/Default.aspx?ID=1598" class="ConfigurationButton"><i class="icon fa-light fa-diagram-cells"></i><label>Dashboard</label></a> 202 <a href="/Default.aspx?ID=1055" class="ConfigurationButton"><i class="icon fa-light fa-diagram-cells"></i><label>Masters</label></a> 203 <a href="/Default.aspx?ID=1055" class="ConfigurationButton"><i class="icon fa-light fa-link"></i><label>Buttons</label></a> 204 <a href="/Default.aspx?ID=1009" class="ConfigurationButton"><i class="icon fa-light fa-paintbrush"></i><label>Backgrounds</label></a> 205 <a href="/Default.aspx?ID=1460" class="ConfigurationButton"><i class="icon fa-light fa-megaphone"></i><label>Jumbotrons</label></a> 206 <a href="/Default.aspx?ID=1518" class="ConfigurationButton"><i class="icon fa-light fa-brush"></i><label>Themes</label></a> 207 <a href="/Default.aspx?ID=1450" class="ConfigurationButton"><i class="icon fa-light fa-font"></i><label>Fonts</label></a> 208 <a href="/Default.aspx?ID=1514" class="ConfigurationButton"><i class="icon fa-light fa-computer"></i><label>Devices</label></a> 209 210 </nav> 211 </header> 212 213 <style> 214 .ConfigurationButton { 215 display: flex; 216 flex-direction: column; 217 height: 100px; 218 width: 100px; 219 margin-right: 25px; 220 padding: 25px; 221 background-color: #f1f1f1; 222 justify-content: center; 223 align-items: center; 224 box-sizing: border-box; 225 text-align: center; 226 font-size: 12px; 227 } 228 229 .ConfigurationButton .icon { 230 font-size: 25px; 231 } 232 </style> 233 234 <h2><i class="fas fa-desktop-alt"></i> Desktop</h2> 235 <div style="display: flex; flex-direction: column; padding: 25px; background-color:#f1f1f1; margin-bottom: 50px;"> 236 @Model.Grid("HeaderLayoutDesktop", "Header Layout", "default:true;sort:1", "Configuration/Layout/Header") 237 </div> 238 239 @if (font_configuration != null) 240 { 241 foreach (var item in font_configuration.Item.ToCodeFirstItem<Bluedesk.DynamicWeb.ItemTypes.Pages.ConfigurationPagesParent>().GetChildConfigs<FontConfiguration>()) 242 { 243 <link href="@item["FontLink"]" rel="stylesheet"> 244 } 245 } 246 247 <link rel="stylesheet" href="https://pro.fontawesome.com/releases/v5.15.4/css/all.css" integrity="sha384-rqn26AG5Pj86AF4SO72RK5fyefcQ/x32DNQfChxWvbXIyXFePlEktwD18fEz+kQU" crossorigin="anonymous"> 248 <script src="https://kit.fontawesome.com/a46eca85e2.js" crossorigin="anonymous"></script> 249 </body> 250 </html> 251 252 } 253 else 254 { 255 <h1>Default header</h1> 256 } 257