Error compiling template "Designs/VanBuuren_generated/_parsed/LayoutConfigurationPage.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 456: 'Services' is obsolete: 'Use Dynamicweb.Content.Services instead.'
Line 456: 'Services.Pages' is obsolete: 'Use Dynamicweb.Content.Services.Pages instead.'
Line 487: A local variable or function named 'websitesettings' is already defined in this scope

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 166 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\LayoutConfigurationPage.parsed.cshtml" 14 using System; 15 16 #line default 17 #line hidden 18 using System.Collections.Generic; 19 20 #line 168 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\LayoutConfigurationPage.parsed.cshtml" 21 using System.Linq; 22 23 #line default 24 #line hidden 25 26 #line 171 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\LayoutConfigurationPage.parsed.cshtml" 27 using Dynamicweb; 28 29 #line default 30 #line hidden 31 32 #line 177 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\LayoutConfigurationPage.parsed.cshtml" 33 using Bluedesk.Tools.Generic; 34 35 #line default 36 #line hidden 37 38 #line 169 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\LayoutConfigurationPage.parsed.cshtml" 39 using System.Globalization; 40 41 #line default 42 #line hidden 43 44 #line 172 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\LayoutConfigurationPage.parsed.cshtml" 45 using Dynamicweb.Content.Items; 46 47 #line default 48 #line hidden 49 50 #line 179 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\LayoutConfigurationPage.parsed.cshtml" 51 using Bluedesk.DynamicWeb.ItemTypes; 52 53 #line default 54 #line hidden 55 56 #line 180 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\LayoutConfigurationPage.parsed.cshtml" 57 using Bluedesk.DynamicWeb.ItemTypes.Settings; 58 59 #line default 60 #line hidden 61 62 #line 167 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\LayoutConfigurationPage.parsed.cshtml" 63 using System.Web; 64 65 #line default 66 #line hidden 67 68 #line 173 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\LayoutConfigurationPage.parsed.cshtml" 69 using Dynamicweb.Environment; 70 71 #line default 72 #line hidden 73 74 #line 174 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\LayoutConfigurationPage.parsed.cshtml" 75 using Dynamicweb.Frontend; 76 77 #line default 78 #line hidden 79 80 #line 175 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\LayoutConfigurationPage.parsed.cshtml" 81 using Dynamicweb.Frontend.Navigation; 82 83 #line default 84 #line hidden 85 86 #line 185 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\LayoutConfigurationPage.parsed.cshtml" 87 using Bluedesk.DynamicWeb.ItemTypes.Settings.Configuration; 88 89 #line default 90 #line hidden 91 92 #line 182 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\LayoutConfigurationPage.parsed.cshtml" 93 using Bluedesk.DynamicWeb.ItemTypes.Configuration; 94 95 #line default 96 #line hidden 97 98 #line 183 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\LayoutConfigurationPage.parsed.cshtml" 99 using Bluedesk.DynamicWeb.ItemTypes.BaseSolution; 100 101 #line default 102 #line hidden 103 104 #line 51 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\LayoutConfigurationPage.parsed.cshtml" 105 using Bluedesk.DynamicWeb.ItemTypes.BaseSolution.Frontend; 106 107 #line default 108 #line hidden 109 110 #line 184 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\LayoutConfigurationPage.parsed.cshtml" 111 using Bluedesk.DynamicWeb.ItemTypes.Extensions; 112 113 #line default 114 #line hidden 115 116 117 public class RazorEngine_06ef945a756f406888ce686734a1be79 : Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> { 118 119 #line hidden 120 121 #line 114 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\LayoutConfigurationPage.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 115 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\LayoutConfigurationPage.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 118 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\LayoutConfigurationPage.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 118 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\LayoutConfigurationPage.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 119 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\LayoutConfigurationPage.parsed.cshtml" 160 } 161 162 163 #line default 164 #line hidden 165 }); 166 167 #line 120 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\LayoutConfigurationPage.parsed.cshtml" 168 } 169 #line default 170 #line hidden 171 172 173 #line 122 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\LayoutConfigurationPage.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 123 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\LayoutConfigurationPage.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 140 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\LayoutConfigurationPage.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 142 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\LayoutConfigurationPage.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 144 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\LayoutConfigurationPage.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 145 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\LayoutConfigurationPage.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 146 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\LayoutConfigurationPage.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 147 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\LayoutConfigurationPage.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 149 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\LayoutConfigurationPage.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 150 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\LayoutConfigurationPage.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 151 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\LayoutConfigurationPage.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 153 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\LayoutConfigurationPage.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 154 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\LayoutConfigurationPage.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 155 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\LayoutConfigurationPage.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 157 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\LayoutConfigurationPage.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 158 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\LayoutConfigurationPage.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 159 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\LayoutConfigurationPage.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 162 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\LayoutConfigurationPage.parsed.cshtml" 371 372 373 374 #line default 375 #line hidden 376 }); 377 378 #line 163 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\LayoutConfigurationPage.parsed.cshtml" 379 } 380 #line default 381 #line hidden 382 383 384 public RazorEngine_06ef945a756f406888ce686734a1be79() { 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\LayoutConfigurationPage.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\LayoutConfigurationPage.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 409 #line default 410 #line hidden 411 WriteLiteral("\r\n\r\n<!DOCTYPE html>\r\n<html"); 412 413 WriteLiteral(" prefix=\"og: http://ogp.me/ns#\""); 414 415 WriteLiteral(">\r\n<head>\r\n\r\n</head>\r\n<body>\r\n\t<link"); 416 417 WriteAttribute("href", Tuple.Create(" href=\"", 795), Tuple.Create("\"", 809) 418 419 #line 25 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\LayoutConfigurationPage.parsed.cshtml" 420 , Tuple.Create(Tuple.Create("", 802), Tuple.Create<System.Object, System.Int32>(appcss 421 422 #line default 423 #line hidden 424 , 802), false) 425 ); 426 427 WriteLiteral(" rel=\"stylesheet\""); 428 429 WriteLiteral(" />\r\n"); 430 431 432 #line 26 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\LayoutConfigurationPage.parsed.cshtml" 433 434 435 #line default 436 #line hidden 437 WriteLiteral("\r\n"); 438 439 WriteLiteral("\r\n"); 440 441 WriteLiteral("\r\n"); 442 443 WriteLiteral("\r\n"); 444 445 WriteLiteral("\r\n"); 446 447 WriteLiteral("\r\n"); 448 449 WriteLiteral("\r\n"); 450 451 452 #line 53 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\LayoutConfigurationPage.parsed.cshtml" 453 454 455 // Hydrated once per request: the product detail template (rendered before the master) reads the same MasterConfig. 456 MasterConfig mc = application._webapi.Helper.RenderCache.GetForRequest("MasterConfig_" + Pageview.AreaID, () => Dynamicweb.Services.Pages.GetPageByNavigationTag(Pageview.AreaID, "MasterConfiguration").Item.ToCodeFirstItem<MasterConfig>()); 457 458 string MasterConfigCssClass = !string.IsNullOrWhiteSpace(mc.CssClass) ? mc.CssClass : ""; 459 460 // GeneralConfig GeneralConfiguration = mc.GeneralConfiguration; 461 EcomConfig EcommerceConfiguration = mc.EcomConfiguration; 462 463 bool WithVATBool = Pageview.Area.EcomPricesWithVat == "True"; 464 bool pricesWithoutVatForUsers = EcommerceConfiguration.ShowPricesWithoutVatForUsers; 465 bool pricesWithoutVatForValidVat = EcommerceConfiguration.ShowPricesWithoutVatWhenValidVatNumber; 466 if (pricesWithoutVatForUsers && !pricesWithoutVatForValidVat && Pageview.User != null) 467 { 468 WithVATBool = false; 469 } 470 if (pricesWithoutVatForValidVat && Pageview.User != null && !string.IsNullOrWhiteSpace(Pageview.User.VatRegNumber)) 471 { 472 WithVATBool = false; 473 } 474 string ecomShowPricesWithVat = WithVATBool.ToString().ToLower(); 475 string ecomPricesFormatted = (EcommerceConfiguration.FormattedPrices).ToString().ToLower(); 476 477 bool IsNotContentManager = false; 478 bool isVisualEditor = Pageview.IsVisualEditorMode; 479 480 if (isVisualEditor) 481 { 482 System.Web.HttpContext.Current.Session["PreviousPage"] = Pageview.Page.ID; 483 IsNotContentManager = (Dynamicweb.Security.UserManagement.User.GetCurrentBackendUser()?.Groups?.All(g => g.Name != "Content managers") ?? true); 484 } 485 486 // Recaptcha configuration 487 var websitesettings = Dynamicweb.Content.Services.Items.GetItemById<WebsiteSettings>(Model.Area.Item.Id); 488 string recaptchaType = websitesettings.RecaptchaType; 489 string recaptchaKey = websitesettings.RecaptchaKey; 490 491 492 #line default 493 #line hidden 494 WriteLiteral("\r\n\r\n"); 495 496 497 #line 92 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\LayoutConfigurationPage.parsed.cshtml" 498 499 500 #line default 501 #line hidden 502 WriteLiteral("\r\n"); 503 504 WriteLiteral("\r\n"); 505 506 WriteLiteral("\r\n"); 507 508 WriteLiteral("\r\n"); 509 510 WriteLiteral("\r\n"); 511 512 WriteLiteral("\r\n"); 513 514 WriteLiteral("\r\n"); 515 516 517 #line 165 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\LayoutConfigurationPage.parsed.cshtml" 518 519 520 #line default 521 #line hidden 522 WriteLiteral("\r\n"); 523 524 WriteLiteral("\r\n"); 525 526 WriteLiteral("\r\n"); 527 528 WriteLiteral("\r\n"); 529 530 WriteLiteral("\r\n\r\n\t<header"); 531 532 WriteLiteral(" style=\"padding: 25px;\""); 533 534 WriteLiteral(">\r\n\t\t<h1>Header Configuration</h1>\r\n\t</header>\r\n\r\n\t<h2><i"); 535 536 WriteLiteral(" class=\"fas fa-desktop-alt\""); 537 538 WriteLiteral("></i> Desktop</h2>\r\n\t<div"); 539 540 WriteLiteral(" style=\"display: flex; flex-direction: column; padding: 25px; background-color:#f" + 541 "1f1f1;\""); 542 543 WriteLiteral(">\r\n"); 544 545 WriteLiteral("\t\t"); 546 547 548 #line 194 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\LayoutConfigurationPage.parsed.cshtml" 549 Write(Model.Grid("LayoutDesktop", "Layout Desktop", "default:true;sort:1", "Configuration/Layout/Header")); 550 551 552 #line default 553 #line hidden 554 WriteLiteral("\r\n\t</div>\r\n\r\n\t<h2><i"); 555 556 WriteLiteral(" class=\"fas fa-mobile-alt\""); 557 558 WriteLiteral("></i> Mobile</h2>\r\n\t<div"); 559 560 WriteLiteral(" style=\"display: flex; flex-direction: column; padding: 25px; background-color:#f" + 561 "1f1f1;\""); 562 563 WriteLiteral(">\r\n"); 564 565 WriteLiteral("\t\t"); 566 567 568 #line 199 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\LayoutConfigurationPage.parsed.cshtml" 569 Write(Model.Grid("LayoutMobile", "Layout mobile", "default:true;sort:1", "Configuration/Layout/Header")); 570 571 572 #line default 573 #line hidden 574 WriteLiteral("\r\n\t</div>\r\n\r\n"); 575 576 577 #line 202 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\LayoutConfigurationPage.parsed.cshtml" 578 579 580 #line default 581 #line hidden 582 583 #line 202 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\LayoutConfigurationPage.parsed.cshtml" 584 if (font_configuration != null) 585 { 586 foreach (var item in font_configuration.Item.ToCodeFirstItem<Bluedesk.DynamicWeb.ItemTypes.Pages.ConfigurationPagesParent>().GetChildConfigs<FontConfiguration>()) 587 { 588 589 590 #line default 591 #line hidden 592 WriteLiteral("\t\t\t<link"); 593 594 WriteAttribute("href", Tuple.Create(" href=\"", 7679), Tuple.Create("\"", 7703) 595 596 #line 206 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\LayoutConfigurationPage.parsed.cshtml" 597 , Tuple.Create(Tuple.Create("", 7686), Tuple.Create<System.Object, System.Int32>(item["FontLink"] 598 599 #line default 600 #line hidden 601 , 7686), false) 602 ); 603 604 WriteLiteral(" rel=\"stylesheet\""); 605 606 WriteLiteral(">\r\n"); 607 608 609 #line 207 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\LayoutConfigurationPage.parsed.cshtml" 610 } 611 } 612 613 614 #line default 615 #line hidden 616 WriteLiteral("\r\n\t<link"); 617 618 WriteLiteral(" rel=\"stylesheet\""); 619 620 WriteLiteral(" href=\"https://pro.fontawesome.com/releases/v5.15.4/css/all.css\""); 621 622 WriteLiteral(" integrity=\"sha384-rqn26AG5Pj86AF4SO72RK5fyefcQ/x32DNQfChxWvbXIyXFePlEktwD18fEz+k" + 623 "QU\""); 624 625 WriteLiteral(" crossorigin=\"anonymous\""); 626 627 WriteLiteral(">\r\n\r\n</body>\r\n</html>\r\n"); 628 629 } 630 } 631 } 632

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 19 <!DOCTYPE html> 20 <html prefix="og: http://ogp.me/ns#"> 21 <head> 22 23 </head> 24 <body> 25 <link href="@appcss" rel="stylesheet" /> 26 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 27 28 @using System; 29 @using System.Web; 30 @using System.Linq; 31 @using System.Globalization; 32 33 @using Dynamicweb; 34 @using Dynamicweb.Content.Items; 35 @using Dynamicweb.Environment; 36 @using Dynamicweb.Frontend; 37 @using Dynamicweb.Frontend.Navigation; 38 39 @using Bluedesk.Tools.Generic; 40 41 @using Bluedesk.DynamicWeb.ItemTypes; 42 @using Bluedesk.DynamicWeb.ItemTypes.Settings; 43 @using Bluedesk.DynamicWeb.ItemTypes.Settings.Configuration; 44 45 @using Bluedesk.DynamicWeb.ItemTypes.Configuration; 46 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution; 47 48 @using Bluedesk.DynamicWeb.ItemTypes.Configuration; 49 50 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution; 51 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution.Frontend; 52 53 @{ 54 55 // Hydrated once per request: the product detail template (rendered before the master) reads the same MasterConfig. 56 MasterConfig mc = application._webapi.Helper.RenderCache.GetForRequest("MasterConfig_" + Pageview.AreaID, () => Dynamicweb.Services.Pages.GetPageByNavigationTag(Pageview.AreaID, "MasterConfiguration").Item.ToCodeFirstItem<MasterConfig>()); 57 58 string MasterConfigCssClass = !string.IsNullOrWhiteSpace(mc.CssClass) ? mc.CssClass : ""; 59 60 // GeneralConfig GeneralConfiguration = mc.GeneralConfiguration; 61 EcomConfig EcommerceConfiguration = mc.EcomConfiguration; 62 63 bool WithVATBool = Pageview.Area.EcomPricesWithVat == "True"; 64 bool pricesWithoutVatForUsers = EcommerceConfiguration.ShowPricesWithoutVatForUsers; 65 bool pricesWithoutVatForValidVat = EcommerceConfiguration.ShowPricesWithoutVatWhenValidVatNumber; 66 if (pricesWithoutVatForUsers && !pricesWithoutVatForValidVat && Pageview.User != null) 67 { 68 WithVATBool = false; 69 } 70 if (pricesWithoutVatForValidVat && Pageview.User != null && !string.IsNullOrWhiteSpace(Pageview.User.VatRegNumber)) 71 { 72 WithVATBool = false; 73 } 74 string ecomShowPricesWithVat = WithVATBool.ToString().ToLower(); 75 string ecomPricesFormatted = (EcommerceConfiguration.FormattedPrices).ToString().ToLower(); 76 77 bool IsNotContentManager = false; 78 bool isVisualEditor = Pageview.IsVisualEditorMode; 79 80 if (isVisualEditor) 81 { 82 System.Web.HttpContext.Current.Session["PreviousPage"] = Pageview.Page.ID; 83 IsNotContentManager = (Dynamicweb.Security.UserManagement.User.GetCurrentBackendUser()?.Groups?.All(g => g.Name != "Content managers") ?? true); 84 } 85 86 // Recaptcha configuration 87 var websitesettings = Dynamicweb.Content.Services.Items.GetItemById<WebsiteSettings>(Model.Area.Item.Id); 88 string recaptchaType = websitesettings.RecaptchaType; 89 string recaptchaKey = websitesettings.RecaptchaKey; 90 } 91 92 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 93 @using System; 94 @using System.Web; 95 @using System.Linq; 96 @using System.Globalization; 97 98 @using Dynamicweb; 99 @using Dynamicweb.Content.Items; 100 @using Dynamicweb.Environment; 101 @using Dynamicweb.Frontend; 102 @using Dynamicweb.Frontend.Navigation; 103 104 @using Bluedesk.Tools.Generic; 105 106 @using Bluedesk.DynamicWeb.ItemTypes; 107 @using Bluedesk.DynamicWeb.ItemTypes.Settings; 108 @using Bluedesk.DynamicWeb.ItemTypes.Settings.Configuration; 109 110 @using Bluedesk.DynamicWeb.ItemTypes.Configuration; 111 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution; 112 @using Bluedesk.DynamicWeb.ItemTypes.Extensions; 113 114 @helper RenderCSSKeyAndValue(string Key, string Value) 115 { 116 if (!string.IsNullOrWhiteSpace(Value)) 117 { 118 <text>@Key : @Value !important;</text> 119 } 120 } 121 122 @helper SetFontCSSVariables(FontConfigurationItemTab FontConfiguration) 123 { 124 125 string Top = FontConfiguration.top != 0 ? FontConfiguration.top.ToString() + "px" : ""; 126 string Left = FontConfiguration.left != 0 ? FontConfiguration.left.ToString() + "px" : ""; 127 string Right = FontConfiguration.right != 0 ? FontConfiguration.right.ToString() + "px" : ""; 128 string Bottom = FontConfiguration.bottom != 0 ? FontConfiguration.bottom.ToString() + "px" : ""; 129 130 string Position = FontConfiguration.PositionAbsolute ? "absolute" : "relative"; 131 132 string Color = FontConfiguration.Color?.GetColorCode(Pageview.AreaID) ?? ""; 133 string BackgroundColor = FontConfiguration.Backgroundcolor?.GetColorCode(Pageview.AreaID) ?? ""; 134 135 string BorderColor = FontConfiguration.BorderColor?.GetColorCode(Pageview.AreaID) ?? ""; 136 string BorderSize = FontConfiguration.BorderSize != 0 ? FontConfiguration.BorderSize.ToString() + "px" : ""; 137 138 <text> 139 140 --Position: @Position; 141 142 @RenderCSSKeyAndValue("--Padding", FontConfiguration.Padding) 143 144 @RenderCSSKeyAndValue("--Top", Top) 145 @RenderCSSKeyAndValue("--Left", Left) 146 @RenderCSSKeyAndValue("--Right", Right) 147 @RenderCSSKeyAndValue("--Bottom", Bottom) 148 149 @RenderCSSKeyAndValue("--Color", Color) 150 @RenderCSSKeyAndValue("--FontSize", FontConfiguration.FontSize) 151 @RenderCSSKeyAndValue("--FontStyle", FontConfiguration.FontStyle) 152 153 @RenderCSSKeyAndValue("--FontWeight", FontConfiguration.FontWeight) 154 @RenderCSSKeyAndValue("--FontFamily", FontConfiguration.FontConfiguration.FontFamily) 155 @RenderCSSKeyAndValue("--LineHeight", FontConfiguration.LineHeight) 156 157 @RenderCSSKeyAndValue("--BackgroundColor", BackgroundColor) 158 @RenderCSSKeyAndValue("--BorderColor", BorderColor) 159 @RenderCSSKeyAndValue("--BorderSize", BorderSize) 160 161 </text> 162 163 } 164 165 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 166 @using System; 167 @using System.Web; 168 @using System.Linq; 169 @using System.Globalization; 170 171 @using Dynamicweb; 172 @using Dynamicweb.Content.Items; 173 @using Dynamicweb.Environment; 174 @using Dynamicweb.Frontend; 175 @using Dynamicweb.Frontend.Navigation; 176 177 @using Bluedesk.Tools.Generic; 178 179 @using Bluedesk.DynamicWeb.ItemTypes; 180 @using Bluedesk.DynamicWeb.ItemTypes.Settings; 181 182 @using Bluedesk.DynamicWeb.ItemTypes.Configuration; 183 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution; 184 @using Bluedesk.DynamicWeb.ItemTypes.Extensions; 185 @using Bluedesk.DynamicWeb.ItemTypes.Settings.Configuration; 186 187 188 <header style="padding: 25px;"> 189 <h1>Header Configuration</h1> 190 </header> 191 192 <h2><i class="fas fa-desktop-alt"></i> Desktop</h2> 193 <div style="display: flex; flex-direction: column; padding: 25px; background-color:#f1f1f1;"> 194 @Model.Grid("LayoutDesktop", "Layout Desktop", "default:true;sort:1", "Configuration/Layout/Header") 195 </div> 196 197 <h2><i class="fas fa-mobile-alt"></i> Mobile</h2> 198 <div style="display: flex; flex-direction: column; padding: 25px; background-color:#f1f1f1;"> 199 @Model.Grid("LayoutMobile", "Layout mobile", "default:true;sort:1", "Configuration/Layout/Header") 200 </div> 201 202 @if (font_configuration != null) 203 { 204 foreach (var item in font_configuration.Item.ToCodeFirstItem<Bluedesk.DynamicWeb.ItemTypes.Pages.ConfigurationPagesParent>().GetChildConfigs<FontConfiguration>()) 205 { 206 <link href="@item["FontLink"]" rel="stylesheet"> 207 } 208 } 209 210 <link rel="stylesheet" href="https://pro.fontawesome.com/releases/v5.15.4/css/all.css" integrity="sha384-rqn26AG5Pj86AF4SO72RK5fyefcQ/x32DNQfChxWvbXIyXFePlEktwD18fEz+kQU" crossorigin="anonymous"> 211 212 </body> 213 </html> 214