Error compiling template "Designs/VanDenBroucke_generated/_parsed/ThemeMaster.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 431: 'Services' is obsolete: 'Use Dynamicweb.Content.Services instead.'
Line 431: 'Services.Pages' is obsolete: 'Use Dynamicweb.Content.Services.Pages instead.'
Line 443: A local variable or function named 'isVisualEditor' is already defined in this scope
Line 408: The variable 'isThemeMaster' is assigned but its value is never used

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 213 "E:\Dynamicweb.NET\vandenBroucke\Production\host\files\Templates\Designs\VanDenBroucke_generated\_parsed\ThemeMaster.parsed.cshtml" 14 using System; 15 16 #line default 17 #line hidden 18 using System.Collections.Generic; 19 20 #line 215 "E:\Dynamicweb.NET\vandenBroucke\Production\host\files\Templates\Designs\VanDenBroucke_generated\_parsed\ThemeMaster.parsed.cshtml" 21 using System.Linq; 22 23 #line default 24 #line hidden 25 26 #line 218 "E:\Dynamicweb.NET\vandenBroucke\Production\host\files\Templates\Designs\VanDenBroucke_generated\_parsed\ThemeMaster.parsed.cshtml" 27 using Dynamicweb; 28 29 #line default 30 #line hidden 31 32 #line 224 "E:\Dynamicweb.NET\vandenBroucke\Production\host\files\Templates\Designs\VanDenBroucke_generated\_parsed\ThemeMaster.parsed.cshtml" 33 using Bluedesk.Tools.Generic; 34 35 #line default 36 #line hidden 37 38 #line 216 "E:\Dynamicweb.NET\vandenBroucke\Production\host\files\Templates\Designs\VanDenBroucke_generated\_parsed\ThemeMaster.parsed.cshtml" 39 using System.Globalization; 40 41 #line default 42 #line hidden 43 44 #line 219 "E:\Dynamicweb.NET\vandenBroucke\Production\host\files\Templates\Designs\VanDenBroucke_generated\_parsed\ThemeMaster.parsed.cshtml" 45 using Dynamicweb.Content.Items; 46 47 #line default 48 #line hidden 49 50 #line 226 "E:\Dynamicweb.NET\vandenBroucke\Production\host\files\Templates\Designs\VanDenBroucke_generated\_parsed\ThemeMaster.parsed.cshtml" 51 using Bluedesk.DynamicWeb.ItemTypes; 52 53 #line default 54 #line hidden 55 56 #line 227 "E:\Dynamicweb.NET\vandenBroucke\Production\host\files\Templates\Designs\VanDenBroucke_generated\_parsed\ThemeMaster.parsed.cshtml" 57 using Bluedesk.DynamicWeb.ItemTypes.Settings; 58 59 #line default 60 #line hidden 61 62 #line 221 "E:\Dynamicweb.NET\vandenBroucke\Production\host\files\Templates\Designs\VanDenBroucke_generated\_parsed\ThemeMaster.parsed.cshtml" 63 using Dynamicweb.Frontend; 64 65 #line default 66 #line hidden 67 68 #line 222 "E:\Dynamicweb.NET\vandenBroucke\Production\host\files\Templates\Designs\VanDenBroucke_generated\_parsed\ThemeMaster.parsed.cshtml" 69 using Dynamicweb.Frontend.Navigation; 70 71 #line default 72 #line hidden 73 74 #line 10 "E:\Dynamicweb.NET\vandenBroucke\Production\host\files\Templates\Designs\VanDenBroucke_generated\_parsed\ThemeMaster.parsed.cshtml" 75 using Dynamicweb.Ecommerce.ProductCatalog; 76 77 #line default 78 #line hidden 79 80 #line 220 "E:\Dynamicweb.NET\vandenBroucke\Production\host\files\Templates\Designs\VanDenBroucke_generated\_parsed\ThemeMaster.parsed.cshtml" 81 using Dynamicweb.Environment; 82 83 #line default 84 #line hidden 85 86 #line 214 "E:\Dynamicweb.NET\vandenBroucke\Production\host\files\Templates\Designs\VanDenBroucke_generated\_parsed\ThemeMaster.parsed.cshtml" 87 using System.Web; 88 89 #line default 90 #line hidden 91 92 #line 232 "E:\Dynamicweb.NET\vandenBroucke\Production\host\files\Templates\Designs\VanDenBroucke_generated\_parsed\ThemeMaster.parsed.cshtml" 93 using Bluedesk.DynamicWeb.ItemTypes.Settings.Configuration; 94 95 #line default 96 #line hidden 97 98 #line 229 "E:\Dynamicweb.NET\vandenBroucke\Production\host\files\Templates\Designs\VanDenBroucke_generated\_parsed\ThemeMaster.parsed.cshtml" 99 using Bluedesk.DynamicWeb.ItemTypes.Configuration; 100 101 #line default 102 #line hidden 103 104 #line 230 "E:\Dynamicweb.NET\vandenBroucke\Production\host\files\Templates\Designs\VanDenBroucke_generated\_parsed\ThemeMaster.parsed.cshtml" 105 using Bluedesk.DynamicWeb.ItemTypes.BaseSolution; 106 107 #line default 108 #line hidden 109 110 #line 231 "E:\Dynamicweb.NET\vandenBroucke\Production\host\files\Templates\Designs\VanDenBroucke_generated\_parsed\ThemeMaster.parsed.cshtml" 111 using Bluedesk.DynamicWeb.ItemTypes.Extensions; 112 113 #line default 114 #line hidden 115 116 117 public class RazorEngine_4a390bbc3f6b4d85ad2f929486162b34 : Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> { 118 119 #line hidden 120 121 #line 161 "E:\Dynamicweb.NET\vandenBroucke\Production\host\files\Templates\Designs\VanDenBroucke_generated\_parsed\ThemeMaster.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 162 "E:\Dynamicweb.NET\vandenBroucke\Production\host\files\Templates\Designs\VanDenBroucke_generated\_parsed\ThemeMaster.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 165 "E:\Dynamicweb.NET\vandenBroucke\Production\host\files\Templates\Designs\VanDenBroucke_generated\_parsed\ThemeMaster.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 165 "E:\Dynamicweb.NET\vandenBroucke\Production\host\files\Templates\Designs\VanDenBroucke_generated\_parsed\ThemeMaster.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 166 "E:\Dynamicweb.NET\vandenBroucke\Production\host\files\Templates\Designs\VanDenBroucke_generated\_parsed\ThemeMaster.parsed.cshtml" 160 } 161 162 163 #line default 164 #line hidden 165 }); 166 167 #line 167 "E:\Dynamicweb.NET\vandenBroucke\Production\host\files\Templates\Designs\VanDenBroucke_generated\_parsed\ThemeMaster.parsed.cshtml" 168 } 169 #line default 170 #line hidden 171 172 173 #line 169 "E:\Dynamicweb.NET\vandenBroucke\Production\host\files\Templates\Designs\VanDenBroucke_generated\_parsed\ThemeMaster.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 170 "E:\Dynamicweb.NET\vandenBroucke\Production\host\files\Templates\Designs\VanDenBroucke_generated\_parsed\ThemeMaster.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 187 "E:\Dynamicweb.NET\vandenBroucke\Production\host\files\Templates\Designs\VanDenBroucke_generated\_parsed\ThemeMaster.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 189 "E:\Dynamicweb.NET\vandenBroucke\Production\host\files\Templates\Designs\VanDenBroucke_generated\_parsed\ThemeMaster.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 191 "E:\Dynamicweb.NET\vandenBroucke\Production\host\files\Templates\Designs\VanDenBroucke_generated\_parsed\ThemeMaster.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 192 "E:\Dynamicweb.NET\vandenBroucke\Production\host\files\Templates\Designs\VanDenBroucke_generated\_parsed\ThemeMaster.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 193 "E:\Dynamicweb.NET\vandenBroucke\Production\host\files\Templates\Designs\VanDenBroucke_generated\_parsed\ThemeMaster.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 194 "E:\Dynamicweb.NET\vandenBroucke\Production\host\files\Templates\Designs\VanDenBroucke_generated\_parsed\ThemeMaster.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 196 "E:\Dynamicweb.NET\vandenBroucke\Production\host\files\Templates\Designs\VanDenBroucke_generated\_parsed\ThemeMaster.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 197 "E:\Dynamicweb.NET\vandenBroucke\Production\host\files\Templates\Designs\VanDenBroucke_generated\_parsed\ThemeMaster.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 198 "E:\Dynamicweb.NET\vandenBroucke\Production\host\files\Templates\Designs\VanDenBroucke_generated\_parsed\ThemeMaster.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 200 "E:\Dynamicweb.NET\vandenBroucke\Production\host\files\Templates\Designs\VanDenBroucke_generated\_parsed\ThemeMaster.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 201 "E:\Dynamicweb.NET\vandenBroucke\Production\host\files\Templates\Designs\VanDenBroucke_generated\_parsed\ThemeMaster.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 202 "E:\Dynamicweb.NET\vandenBroucke\Production\host\files\Templates\Designs\VanDenBroucke_generated\_parsed\ThemeMaster.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 204 "E:\Dynamicweb.NET\vandenBroucke\Production\host\files\Templates\Designs\VanDenBroucke_generated\_parsed\ThemeMaster.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 205 "E:\Dynamicweb.NET\vandenBroucke\Production\host\files\Templates\Designs\VanDenBroucke_generated\_parsed\ThemeMaster.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 206 "E:\Dynamicweb.NET\vandenBroucke\Production\host\files\Templates\Designs\VanDenBroucke_generated\_parsed\ThemeMaster.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 209 "E:\Dynamicweb.NET\vandenBroucke\Production\host\files\Templates\Designs\VanDenBroucke_generated\_parsed\ThemeMaster.parsed.cshtml" 371 372 373 374 #line default 375 #line hidden 376 }); 377 378 #line 210 "E:\Dynamicweb.NET\vandenBroucke\Production\host\files\Templates\Designs\VanDenBroucke_generated\_parsed\ThemeMaster.parsed.cshtml" 379 } 380 #line default 381 #line hidden 382 383 384 public RazorEngine_4a390bbc3f6b4d85ad2f929486162b34() { 385 } 386 387 public override void Execute() { 388 WriteLiteral("\r\n"); 389 390 391 #line 13 "E:\Dynamicweb.NET\vandenBroucke\Production\host\files\Templates\Designs\VanDenBroucke_generated\_parsed\ThemeMaster.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 15 "E:\Dynamicweb.NET\vandenBroucke\Production\host\files\Templates\Designs\VanDenBroucke_generated\_parsed\ThemeMaster.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 isThemeMaster = true; 409 410 bool isVisualEditor = Dynamicweb.Context.Current.Request.GetBoolean("visualedit"); 411 412 413 #line default 414 #line hidden 415 WriteLiteral("\r\n\r\n"); 416 417 WriteLiteral("\r\n"); 418 419 WriteLiteral("\r\n"); 420 421 WriteLiteral("\r\n"); 422 423 WriteLiteral("\r\n"); 424 425 WriteLiteral("\r\n"); 426 427 428 #line 49 "E:\Dynamicweb.NET\vandenBroucke\Production\host\files\Templates\Designs\VanDenBroucke_generated\_parsed\ThemeMaster.parsed.cshtml" 429 430 431 var master_configuration = Dynamicweb.Services.Pages.GetPageByNavigationTag(Pageview.AreaID, "MasterConfiguration"); 432 MasterConfig mc = master_configuration.Item.ToCodeFirstItem<MasterConfig>(); 433 434 string MasterConfigCssClass = !string.IsNullOrWhiteSpace(mc.CssClass) ? mc.CssClass : ""; 435 436 GeneralConfig GeneralConfiguration = mc.GeneralConfiguration; 437 EcomConfig EcommerceConfiguration = mc.EcomConfiguration; 438 439 string ecomShowPricesWithVat = (Pageview.Area.EcomPricesWithVat == "True").ToString().ToLower(); 440 string ecomPricesFormatted = (EcommerceConfiguration.FormattedPrices).ToString().ToLower(); 441 442 bool IsNotContentManager = false; 443 bool isVisualEditor = Pageview.IsVisualEditorMode; 444 445 if (isVisualEditor) 446 { 447 System.Web.HttpContext.Current.Session["PreviousPage"] = Pageview.Page.ID; 448 IsNotContentManager = (Dynamicweb.Security.UserManagement.User.GetCurrentBackendUser()?.Groups?.All(g => g.Name != "Content managers") ?? true); 449 } 450 451 452 453 #line default 454 #line hidden 455 WriteLiteral("\r\n\r\n\r\n<!DOCTYPE html>\r\n<html"); 456 457 WriteLiteral(" prefix=\"og: http://ogp.me/ns#\""); 458 459 WriteLiteral(">\r\n<head>\r\n\t"); 460 461 WriteLiteral("\r\n\r\n</head>\r\n\r\n<body>\r\n\r\n\t<script"); 462 463 WriteLiteral(" type=\"text/javascript\""); 464 465 WriteLiteral(@"> 466 467 var stylesDump; 468 469 function onTryItClick(variable) { 470 471 var StyleID = variable + 'Style'; 472 var contentID = variable + 'Content'; 473 var frameID = variable + 'Frame'; 474 var MasterConfigID = 'MasterConfig'; 475 476 var style = document.getElementById(StyleID).innerHTML; 477 var MasterConfig = document.getElementById(MasterConfigID).innerHTML; 478 var content = document.getElementById(contentID).innerHTML; 479 var iframe = document.getElementById(frameID); 480 481 stylesDump = stylesDump + style; 482 483 var frameDoc = iframe.document; 484 if (iframe.contentWindow) 485 frameDoc = iframe.contentWindow.document; 486 487 frameDoc.open(); 488 frameDoc.writeln(content); 489 frameDoc.writeln(MasterConfig); 490 frameDoc.writeln(stylesDump); 491 frameDoc.close(); 492 493 document.getElementById(contentID).remove(); 494 495 } 496 497 </script> 498 499 <section"); 500 501 WriteLiteral(" id=\"MasterConfig\""); 502 503 WriteLiteral(">\r\n"); 504 505 506 #line 139 "E:\Dynamicweb.NET\vandenBroucke\Production\host\files\Templates\Designs\VanDenBroucke_generated\_parsed\ThemeMaster.parsed.cshtml" 507 508 509 #line default 510 #line hidden 511 WriteLiteral("\r\n"); 512 513 WriteLiteral("\r\n"); 514 515 WriteLiteral("\r\n"); 516 517 WriteLiteral("\r\n"); 518 519 WriteLiteral("\r\n"); 520 521 WriteLiteral("\r\n"); 522 523 WriteLiteral("\r\n"); 524 525 526 #line 212 "E:\Dynamicweb.NET\vandenBroucke\Production\host\files\Templates\Designs\VanDenBroucke_generated\_parsed\ThemeMaster.parsed.cshtml" 527 528 529 #line default 530 #line hidden 531 WriteLiteral("\r\n"); 532 533 WriteLiteral("\r\n"); 534 535 WriteLiteral("\r\n"); 536 537 WriteLiteral("\r\n"); 538 539 WriteLiteral("\r\n\t</section>\r\n\r\n"); 540 541 542 #line 236 "E:\Dynamicweb.NET\vandenBroucke\Production\host\files\Templates\Designs\VanDenBroucke_generated\_parsed\ThemeMaster.parsed.cshtml" 543 544 545 #line default 546 #line hidden 547 548 #line 236 "E:\Dynamicweb.NET\vandenBroucke\Production\host\files\Templates\Designs\VanDenBroucke_generated\_parsed\ThemeMaster.parsed.cshtml" 549 if (isVisualEditor) 550 { 551 552 553 #line default 554 #line hidden 555 WriteLiteral("\t\t<link"); 556 557 WriteAttribute("href", Tuple.Create(" href=\"", 7644), Tuple.Create("\"", 7658) 558 559 #line 238 "E:\Dynamicweb.NET\vandenBroucke\Production\host\files\Templates\Designs\VanDenBroucke_generated\_parsed\ThemeMaster.parsed.cshtml" 560 , Tuple.Create(Tuple.Create("", 7651), Tuple.Create<System.Object, System.Int32>(appcss 561 562 #line default 563 #line hidden 564 , 7651), false) 565 ); 566 567 WriteLiteral(" rel=\"stylesheet\""); 568 569 WriteLiteral(" />\r\n"); 570 571 572 #line 239 "E:\Dynamicweb.NET\vandenBroucke\Production\host\files\Templates\Designs\VanDenBroucke_generated\_parsed\ThemeMaster.parsed.cshtml" 573 574 575 576 #line default 577 #line hidden 578 WriteLiteral("\t\t<header"); 579 580 WriteLiteral(" style=\"padding: 25px;\""); 581 582 WriteLiteral(">\r\n\t\t\t<h1>Theme</h1>\r\n\t\t\t<h2"); 583 584 WriteLiteral(" style=\"font-weight: normal;\""); 585 586 WriteLiteral(">"); 587 588 589 #line 242 "E:\Dynamicweb.NET\vandenBroucke\Production\host\files\Templates\Designs\VanDenBroucke_generated\_parsed\ThemeMaster.parsed.cshtml" 590 Write(Model.Title); 591 592 593 #line default 594 #line hidden 595 WriteLiteral("</h2>\r\n\t\t</header>\r\n"); 596 597 598 #line 244 "E:\Dynamicweb.NET\vandenBroucke\Production\host\files\Templates\Designs\VanDenBroucke_generated\_parsed\ThemeMaster.parsed.cshtml" 599 } 600 601 602 #line default 603 #line hidden 604 WriteLiteral("\r\n"); 605 606 WriteLiteral("\t"); 607 608 609 #line 246 "E:\Dynamicweb.NET\vandenBroucke\Production\host\files\Templates\Designs\VanDenBroucke_generated\_parsed\ThemeMaster.parsed.cshtml" 610 Write(Model.Grid("Breakpoint", "Breakpoint", "default:true;sort:1", "Configuration/Theme")); 611 612 613 #line default 614 #line hidden 615 WriteLiteral("\r\n\r\n"); 616 617 618 #line 248 "E:\Dynamicweb.NET\vandenBroucke\Production\host\files\Templates\Designs\VanDenBroucke_generated\_parsed\ThemeMaster.parsed.cshtml" 619 620 621 #line default 622 #line hidden 623 624 #line 248 "E:\Dynamicweb.NET\vandenBroucke\Production\host\files\Templates\Designs\VanDenBroucke_generated\_parsed\ThemeMaster.parsed.cshtml" 625 if (isVisualEditor) 626 { 627 if (font_configuration != null) 628 { 629 foreach (var item in font_configuration.Item.ToCodeFirstItem<Bluedesk.DynamicWeb.ItemTypes.Pages.ConfigurationPagesParent>().GetChildConfigs<FontConfiguration>()) 630 { 631 632 633 #line default 634 #line hidden 635 WriteLiteral("\t\t\t\t<link"); 636 637 WriteAttribute("href", Tuple.Create(" href=\"", 8150), Tuple.Create("\"", 8174) 638 639 #line 254 "E:\Dynamicweb.NET\vandenBroucke\Production\host\files\Templates\Designs\VanDenBroucke_generated\_parsed\ThemeMaster.parsed.cshtml" 640 , Tuple.Create(Tuple.Create("", 8157), Tuple.Create<System.Object, System.Int32>(item["FontLink"] 641 642 #line default 643 #line hidden 644 , 8157), false) 645 ); 646 647 WriteLiteral(" rel=\"stylesheet\""); 648 649 WriteLiteral(">\r\n"); 650 651 652 #line 255 "E:\Dynamicweb.NET\vandenBroucke\Production\host\files\Templates\Designs\VanDenBroucke_generated\_parsed\ThemeMaster.parsed.cshtml" 653 } 654 } 655 656 657 658 #line default 659 #line hidden 660 WriteLiteral("\t\t<link"); 661 662 WriteLiteral(" rel=\"stylesheet\""); 663 664 WriteLiteral(" href=\"https://pro.fontawesome.com/releases/v5.15.4/css/all.css\""); 665 666 WriteLiteral(" integrity=\"sha384-rqn26AG5Pj86AF4SO72RK5fyefcQ/x32DNQfChxWvbXIyXFePlEktwD18fEz+k" + 667 "QU\""); 668 669 WriteLiteral(" crossorigin=\"anonymous\""); 670 671 WriteLiteral(">\r\n"); 672 673 674 #line 259 "E:\Dynamicweb.NET\vandenBroucke\Production\host\files\Templates\Designs\VanDenBroucke_generated\_parsed\ThemeMaster.parsed.cshtml" 675 } 676 677 678 #line default 679 #line hidden 680 WriteLiteral("</body>\r\n</html>\r\n"); 681 682 } 683 } 684 } 685

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 @using Dynamicweb.Frontend 9 @using Dynamicweb.Frontend.Navigation 10 @using Dynamicweb.Ecommerce.ProductCatalog 11 @using Dynamicweb.Environment 12 13 @Title("Configuration page template") 14 15 @{ 16 var websitesettings = Dynamicweb.Services.Items.GetItemById<WebsiteSettings>(Model.Area.Item.Id); 17 var font_configuration = Dynamicweb.Services.Pages.GetPageByNavigationTag(Pageview.AreaID, "FontConfiguration"); 18 19 var designRoot = "/Files/Templates/Designs/" + Pageview.Area.Layout.Design.Name; 20 var appcss = Cache.VersionedFile(designRoot + "/dist/app.css"); 21 22 bool isThemeMaster = true; 23 24 bool isVisualEditor = Dynamicweb.Context.Current.Request.GetBoolean("visualedit"); 25 } 26 27 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 28 29 @using System; 30 @using System.Web; 31 @using System.Linq; 32 @using System.Globalization; 33 34 @using Dynamicweb; 35 @using Dynamicweb.Content.Items; 36 @using Dynamicweb.Environment; 37 @using Dynamicweb.Frontend; 38 @using Dynamicweb.Frontend.Navigation; 39 40 @using Bluedesk.Tools.Generic; 41 42 @using Bluedesk.DynamicWeb.ItemTypes; 43 @using Bluedesk.DynamicWeb.ItemTypes.Settings; 44 @using Bluedesk.DynamicWeb.ItemTypes.Settings.Configuration; 45 46 @using Bluedesk.DynamicWeb.ItemTypes.Configuration; 47 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution; 48 49 @{ 50 51 var master_configuration = Dynamicweb.Services.Pages.GetPageByNavigationTag(Pageview.AreaID, "MasterConfiguration"); 52 MasterConfig mc = master_configuration.Item.ToCodeFirstItem<MasterConfig>(); 53 54 string MasterConfigCssClass = !string.IsNullOrWhiteSpace(mc.CssClass) ? mc.CssClass : ""; 55 56 GeneralConfig GeneralConfiguration = mc.GeneralConfiguration; 57 EcomConfig EcommerceConfiguration = mc.EcomConfiguration; 58 59 string ecomShowPricesWithVat = (Pageview.Area.EcomPricesWithVat == "True").ToString().ToLower(); 60 string ecomPricesFormatted = (EcommerceConfiguration.FormattedPrices).ToString().ToLower(); 61 62 bool IsNotContentManager = false; 63 bool isVisualEditor = Pageview.IsVisualEditorMode; 64 65 if (isVisualEditor) 66 { 67 System.Web.HttpContext.Current.Session["PreviousPage"] = Pageview.Page.ID; 68 IsNotContentManager = (Dynamicweb.Security.UserManagement.User.GetCurrentBackendUser()?.Groups?.All(g => g.Name != "Content managers") ?? true); 69 } 70 71 } 72 73 74 <!DOCTYPE html> 75 <html prefix="og: http://ogp.me/ns#"> 76 <head> 77 @*@inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 78 @using System; 79 @using System.Web; 80 @using System.Linq; 81 @using System.Globalization; 82 83 @using Dynamicweb; 84 @using Dynamicweb.Content.Items; 85 @using Dynamicweb.Environment; 86 @using Dynamicweb.Frontend; 87 @using Dynamicweb.Frontend.Navigation; 88 89 @using Bluedesk.Tools.Generic; 90 91 @using Bluedesk.DynamicWeb.ItemTypes; 92 @using Bluedesk.DynamicWeb.ItemTypes.Settings; 93 94 @using Bluedesk.DynamicWeb.ItemTypes.Configuration; 95 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution; 96 @using Bluedesk.DynamicWeb.ItemTypes.Extensions; 97 @using Bluedesk.DynamicWeb.ItemTypes.Settings.Configuration; 98 *@ 99 100 </head> 101 102 <body> 103 104 <script type="text/javascript"> 105 106 var stylesDump; 107 108 function onTryItClick(variable) { 109 110 var StyleID = variable + 'Style'; 111 var contentID = variable + 'Content'; 112 var frameID = variable + 'Frame'; 113 var MasterConfigID = 'MasterConfig'; 114 115 var style = document.getElementById(StyleID).innerHTML; 116 var MasterConfig = document.getElementById(MasterConfigID).innerHTML; 117 var content = document.getElementById(contentID).innerHTML; 118 var iframe = document.getElementById(frameID); 119 120 stylesDump = stylesDump + style; 121 122 var frameDoc = iframe.document; 123 if (iframe.contentWindow) 124 frameDoc = iframe.contentWindow.document; 125 126 frameDoc.open(); 127 frameDoc.writeln(content); 128 frameDoc.writeln(MasterConfig); 129 frameDoc.writeln(stylesDump); 130 frameDoc.close(); 131 132 document.getElementById(contentID).remove(); 133 134 } 135 136 </script> 137 138 <section id="MasterConfig"> 139 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 140 @using System; 141 @using System.Web; 142 @using System.Linq; 143 @using System.Globalization; 144 145 @using Dynamicweb; 146 @using Dynamicweb.Content.Items; 147 @using Dynamicweb.Environment; 148 @using Dynamicweb.Frontend; 149 @using Dynamicweb.Frontend.Navigation; 150 151 @using Bluedesk.Tools.Generic; 152 153 @using Bluedesk.DynamicWeb.ItemTypes; 154 @using Bluedesk.DynamicWeb.ItemTypes.Settings; 155 @using Bluedesk.DynamicWeb.ItemTypes.Settings.Configuration; 156 157 @using Bluedesk.DynamicWeb.ItemTypes.Configuration; 158 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution; 159 @using Bluedesk.DynamicWeb.ItemTypes.Extensions; 160 161 @helper RenderCSSKeyAndValue(string Key, string Value) 162 { 163 if (!string.IsNullOrWhiteSpace(Value)) 164 { 165 <text>@Key : @Value !important;</text> 166 } 167 } 168 169 @helper SetFontCSSVariables(FontConfigurationItemTab FontConfiguration) 170 { 171 172 string Top = FontConfiguration.top != 0 ? FontConfiguration.top.ToString() + "px" : ""; 173 string Left = FontConfiguration.left != 0 ? FontConfiguration.left.ToString() + "px" : ""; 174 string Right = FontConfiguration.right != 0 ? FontConfiguration.right.ToString() + "px" : ""; 175 string Bottom = FontConfiguration.bottom != 0 ? FontConfiguration.bottom.ToString() + "px" : ""; 176 177 string Position = FontConfiguration.PositionAbsolute ? "absolute" : "relative"; 178 179 string Color = FontConfiguration.Color?.GetColorCode(Pageview.AreaID) ?? ""; 180 string BackgroundColor = FontConfiguration.Backgroundcolor?.GetColorCode(Pageview.AreaID) ?? ""; 181 182 string BorderColor = FontConfiguration.BorderColor?.GetColorCode(Pageview.AreaID) ?? ""; 183 string BorderSize = FontConfiguration.BorderSize != 0 ? FontConfiguration.BorderSize.ToString() + "px" : ""; 184 185 <text> 186 187 --Position: @Position; 188 189 @RenderCSSKeyAndValue("--Padding", FontConfiguration.Padding) 190 191 @RenderCSSKeyAndValue("--Top", Top) 192 @RenderCSSKeyAndValue("--Left", Left) 193 @RenderCSSKeyAndValue("--Right", Right) 194 @RenderCSSKeyAndValue("--Bottom", Bottom) 195 196 @RenderCSSKeyAndValue("--Color", Color) 197 @RenderCSSKeyAndValue("--FontSize", FontConfiguration.FontSize) 198 @RenderCSSKeyAndValue("--FontStyle", FontConfiguration.FontStyle) 199 200 @RenderCSSKeyAndValue("--FontWeight", FontConfiguration.FontWeight) 201 @RenderCSSKeyAndValue("--FontFamily", FontConfiguration.FontConfiguration.FontFamily) 202 @RenderCSSKeyAndValue("--LineHeight", FontConfiguration.LineHeight) 203 204 @RenderCSSKeyAndValue("--BackgroundColor", BackgroundColor) 205 @RenderCSSKeyAndValue("--BorderColor", BorderColor) 206 @RenderCSSKeyAndValue("--BorderSize", BorderSize) 207 208 </text> 209 210 } 211 212 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 213 @using System; 214 @using System.Web; 215 @using System.Linq; 216 @using System.Globalization; 217 218 @using Dynamicweb; 219 @using Dynamicweb.Content.Items; 220 @using Dynamicweb.Environment; 221 @using Dynamicweb.Frontend; 222 @using Dynamicweb.Frontend.Navigation; 223 224 @using Bluedesk.Tools.Generic; 225 226 @using Bluedesk.DynamicWeb.ItemTypes; 227 @using Bluedesk.DynamicWeb.ItemTypes.Settings; 228 229 @using Bluedesk.DynamicWeb.ItemTypes.Configuration; 230 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution; 231 @using Bluedesk.DynamicWeb.ItemTypes.Extensions; 232 @using Bluedesk.DynamicWeb.ItemTypes.Settings.Configuration; 233 234 </section> 235 236 @if (isVisualEditor) 237 { 238 <link href="@appcss" rel="stylesheet" /> 239 240 <header style="padding: 25px;"> 241 <h1>Theme</h1> 242 <h2 style="font-weight: normal;">@Model.Title</h2> 243 </header> 244 } 245 246 @Model.Grid("Breakpoint", "Breakpoint", "default:true;sort:1", "Configuration/Theme") 247 248 @if (isVisualEditor) 249 { 250 if (font_configuration != null) 251 { 252 foreach (var item in font_configuration.Item.ToCodeFirstItem<Bluedesk.DynamicWeb.ItemTypes.Pages.ConfigurationPagesParent>().GetChildConfigs<FontConfiguration>()) 253 { 254 <link href="@item["FontLink"]" rel="stylesheet"> 255 } 256 } 257 258 <link rel="stylesheet" href="https://pro.fontawesome.com/releases/v5.15.4/css/all.css" integrity="sha384-rqn26AG5Pj86AF4SO72RK5fyefcQ/x32DNQfChxWvbXIyXFePlEktwD18fEz+kQU" crossorigin="anonymous"> 259 } 260 </body> 261 </html> 262