Error compiling template "Designs/VanBuuren_generated/_parsed/DashboardConfigurationPage.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 461: 'Services' is obsolete: 'Use Dynamicweb.Content.Services instead.'
Line 461: 'Services.Pages' is obsolete: 'Use Dynamicweb.Content.Services.Pages instead.'
Line 492: 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 170 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
14 using System;
15
16 #line default
17 #line hidden
18 using System.Collections.Generic;
19
20 #line 172 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
21 using System.Linq;
22
23 #line default
24 #line hidden
25
26 #line 175 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
27 using Dynamicweb;
28
29 #line default
30 #line hidden
31
32 #line 181 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
33 using Bluedesk.Tools.Generic;
34
35 #line default
36 #line hidden
37
38 #line 173 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
39 using System.Globalization;
40
41 #line default
42 #line hidden
43
44 #line 176 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
45 using Dynamicweb.Content.Items;
46
47 #line default
48 #line hidden
49
50 #line 183 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
51 using Bluedesk.DynamicWeb.ItemTypes;
52
53 #line default
54 #line hidden
55
56 #line 184 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
57 using Bluedesk.DynamicWeb.ItemTypes.Settings;
58
59 #line default
60 #line hidden
61
62 #line 189 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
63 using Bluedesk.DynamicWeb.ItemTypes.Settings.Configuration;
64
65 #line default
66 #line hidden
67
68 #line 187 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
69 using Bluedesk.DynamicWeb.ItemTypes.BaseSolution;
70
71 #line default
72 #line hidden
73
74 #line 171 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
75 using System.Web;
76
77 #line default
78 #line hidden
79
80 #line 177 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
81 using Dynamicweb.Environment;
82
83 #line default
84 #line hidden
85
86 #line 178 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
87 using Dynamicweb.Frontend;
88
89 #line default
90 #line hidden
91
92 #line 179 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
93 using Dynamicweb.Frontend.Navigation;
94
95 #line default
96 #line hidden
97
98 #line 186 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
99 using Bluedesk.DynamicWeb.ItemTypes.Configuration;
100
101 #line default
102 #line hidden
103
104 #line 55 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
105 using Bluedesk.DynamicWeb.ItemTypes.BaseSolution.Frontend;
106
107 #line default
108 #line hidden
109
110 #line 188 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
111 using Bluedesk.DynamicWeb.ItemTypes.Extensions;
112
113 #line default
114 #line hidden
115
116
117 public class RazorEngine_21fe6cce5917466d8a732883413bcc9b : Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> {
118
119 #line hidden
120
121 #line 118 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\DashboardConfigurationPage.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 119 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\DashboardConfigurationPage.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 122 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\DashboardConfigurationPage.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 122 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\DashboardConfigurationPage.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 123 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
160 }
161
162
163 #line default
164 #line hidden
165 });
166
167 #line 124 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
168 }
169 #line default
170 #line hidden
171
172
173 #line 126 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\DashboardConfigurationPage.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 127 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\DashboardConfigurationPage.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 144 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\DashboardConfigurationPage.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 146 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\DashboardConfigurationPage.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 148 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\DashboardConfigurationPage.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 149 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\DashboardConfigurationPage.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 150 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\DashboardConfigurationPage.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 151 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\DashboardConfigurationPage.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 153 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\DashboardConfigurationPage.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 154 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\DashboardConfigurationPage.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 155 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\DashboardConfigurationPage.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 157 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\DashboardConfigurationPage.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 158 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\DashboardConfigurationPage.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 159 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\DashboardConfigurationPage.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 161 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\DashboardConfigurationPage.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 162 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\DashboardConfigurationPage.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 163 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\DashboardConfigurationPage.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 166 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
371
372
373
374 #line default
375 #line hidden
376 });
377
378 #line 167 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
379 }
380 #line default
381 #line hidden
382
383
384 public RazorEngine_21fe6cce5917466d8a732883413bcc9b() {
385 }
386
387 public override void Execute() {
388 WriteLiteral("\r\n");
389
390
391 #line 11 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\DashboardConfigurationPage.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 13 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\DashboardConfigurationPage.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
410 #line default
411 #line hidden
412 WriteLiteral("\r\n\r\n<!DOCTYPE html>\r\n<html");
413
414 WriteLiteral(" prefix=\"og: http://ogp.me/ns#\"");
415
416 WriteLiteral(">\r\n<head>\r\n\r\n</head>\r\n<body");
417
418 WriteLiteral(" style=\"background-color: #f1f1f1;\"");
419
420 WriteLiteral(">\r\n\r\n\t<link");
421
422 WriteAttribute("href", Tuple.Create(" href=\"", 948), Tuple.Create("\"", 962)
423
424 #line 29 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
425 , Tuple.Create(Tuple.Create("", 955), Tuple.Create<System.Object, System.Int32>(appcss
426
427 #line default
428 #line hidden
429 , 955), false)
430 );
431
432 WriteLiteral(" rel=\"stylesheet\"");
433
434 WriteLiteral(" />\r\n");
435
436
437 #line 30 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
438
439
440 #line default
441 #line hidden
442 WriteLiteral("\r\n");
443
444 WriteLiteral("\r\n");
445
446 WriteLiteral("\r\n");
447
448 WriteLiteral("\r\n");
449
450 WriteLiteral("\r\n");
451
452 WriteLiteral("\r\n");
453
454 WriteLiteral("\r\n");
455
456
457 #line 57 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
458
459
460 // Hydrated once per request: the product detail template (rendered before the master) reads the same MasterConfig.
461 MasterConfig mc = application._webapi.Helper.RenderCache.GetForRequest("MasterConfig_" + Pageview.AreaID, () => Dynamicweb.Services.Pages.GetPageByNavigationTag(Pageview.AreaID, "MasterConfiguration").Item.ToCodeFirstItem<MasterConfig>());
462
463 string MasterConfigCssClass = !string.IsNullOrWhiteSpace(mc.CssClass) ? mc.CssClass : "";
464
465 // GeneralConfig GeneralConfiguration = mc.GeneralConfiguration;
466 EcomConfig EcommerceConfiguration = mc.EcomConfiguration;
467
468 bool WithVATBool = Pageview.Area.EcomPricesWithVat == "True";
469 bool pricesWithoutVatForUsers = EcommerceConfiguration.ShowPricesWithoutVatForUsers;
470 bool pricesWithoutVatForValidVat = EcommerceConfiguration.ShowPricesWithoutVatWhenValidVatNumber;
471 if (pricesWithoutVatForUsers && !pricesWithoutVatForValidVat && Pageview.User != null)
472 {
473 WithVATBool = false;
474 }
475 if (pricesWithoutVatForValidVat && Pageview.User != null && !string.IsNullOrWhiteSpace(Pageview.User.VatRegNumber))
476 {
477 WithVATBool = false;
478 }
479 string ecomShowPricesWithVat = WithVATBool.ToString().ToLower();
480 string ecomPricesFormatted = (EcommerceConfiguration.FormattedPrices).ToString().ToLower();
481
482 bool IsNotContentManager = false;
483 bool isVisualEditor = Pageview.IsVisualEditorMode;
484
485 if (isVisualEditor)
486 {
487 System.Web.HttpContext.Current.Session["PreviousPage"] = Pageview.Page.ID;
488 IsNotContentManager = (Dynamicweb.Security.UserManagement.User.GetCurrentBackendUser()?.Groups?.All(g => g.Name != "Content managers") ?? true);
489 }
490
491 // Recaptcha configuration
492 var websitesettings = Dynamicweb.Content.Services.Items.GetItemById<WebsiteSettings>(Model.Area.Item.Id);
493 string recaptchaType = websitesettings.RecaptchaType;
494 string recaptchaKey = websitesettings.RecaptchaKey;
495
496
497 #line default
498 #line hidden
499 WriteLiteral("\r\n\r\n");
500
501
502 #line 96 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
503
504
505 #line default
506 #line hidden
507 WriteLiteral("\r\n");
508
509 WriteLiteral("\r\n");
510
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
522 #line 169 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
523
524
525 #line default
526 #line hidden
527 WriteLiteral("\r\n");
528
529 WriteLiteral("\r\n");
530
531 WriteLiteral("\r\n");
532
533 WriteLiteral("\r\n");
534
535 WriteLiteral("\r\n\r\n\t<header");
536
537 WriteLiteral(" style=\"padding: 25px; display: flex; flex-direction: Column;\"");
538
539 WriteLiteral(">\r\n\t\t<div>\r\n\t\t\t<h1>");
540
541
542 #line 194 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
543 Write(Model.Title);
544
545
546 #line default
547 #line hidden
548 WriteLiteral("</h1>\r\n\t\t\t<h2");
549
550 WriteLiteral(" style=\"font-weight: normal;\"");
551
552 WriteLiteral("></h2>\r\n\t\t</div>\r\n\t\t<nav");
553
554 WriteLiteral(" style=\"display: flex; flex-direction: row; margin-left: 50px\"");
555
556 WriteLiteral(">\r\n\t\t\t<a");
557
558 WriteLiteral(" href=\"/Default.aspx?ID=1598\"");
559
560 WriteLiteral(" class=\"ConfigurationButton\"");
561
562 WriteLiteral("><i");
563
564 WriteLiteral(" class=\"icon fa-light fa-grid-horizontal\"");
565
566 WriteLiteral("></i><label>Dashboard</label></a>\r\n\t\t\t<a");
567
568 WriteLiteral(" href=\"/Default.aspx?ID=1055\"");
569
570 WriteLiteral(" class=\"ConfigurationButton\"");
571
572 WriteLiteral("><i");
573
574 WriteLiteral(" class=\"icon fa-light fa-diagram-cells\"");
575
576 WriteLiteral("></i><label>Masters</label></a>\r\n\t\t\t<a");
577
578 WriteLiteral(" href=\"/Default.aspx?ID=1055\"");
579
580 WriteLiteral(" class=\"ConfigurationButton\"");
581
582 WriteLiteral("><i");
583
584 WriteLiteral(" class=\"icon fa-light fa-link\"");
585
586 WriteLiteral("></i><label>Buttons</label></a>\r\n\t\t\t<a");
587
588 WriteLiteral(" href=\"/Default.aspx?ID=1009\"");
589
590 WriteLiteral(" class=\"ConfigurationButton\"");
591
592 WriteLiteral("><i");
593
594 WriteLiteral(" class=\"icon fa-light fa-paintbrush\"");
595
596 WriteLiteral("></i><label>Backgrounds</label></a>\r\n\t\t\t<a");
597
598 WriteLiteral(" href=\"/Default.aspx?ID=1460\"");
599
600 WriteLiteral(" class=\"ConfigurationButton\"");
601
602 WriteLiteral("><i");
603
604 WriteLiteral(" class=\"icon fa-light fa-megaphone\"");
605
606 WriteLiteral("></i><label>Jumbotrons</label></a>\r\n\t\t\t<a");
607
608 WriteLiteral(" href=\"/Default.aspx?ID=1518\"");
609
610 WriteLiteral(" class=\"ConfigurationButton\"");
611
612 WriteLiteral("><i");
613
614 WriteLiteral(" class=\"icon fa-light fa-brush\"");
615
616 WriteLiteral("></i><label>Themes</label></a>\r\n\t\t\t<a");
617
618 WriteLiteral(" href=\"/Default.aspx?ID=1450\"");
619
620 WriteLiteral(" class=\"ConfigurationButton\"");
621
622 WriteLiteral("><i");
623
624 WriteLiteral(" class=\"icon fa-light fa-font\"");
625
626 WriteLiteral("></i><label>Fonts</label></a>\r\n\t\t\t<a");
627
628 WriteLiteral(" href=\"/Default.aspx?ID=1514\"");
629
630 WriteLiteral(" class=\"ConfigurationButton\"");
631
632 WriteLiteral("><i");
633
634 WriteLiteral(" class=\"icon fa-light fa-computer\"");
635
636 WriteLiteral(@"></i><label>Devices</label></a>
637 </nav>
638 </header>
639
640 <style>
641 .ConfigurationButton {
642 display: flex;
643 flex-direction: column;
644 height: 150px;
645 width: 150px;
646 margin-right: 25px;
647 padding: 25px;
648 background-color: #ffffff;
649 justify-content: center;
650 align-items: center;
651 box-sizing: border-box;
652 text-align: center;
653 font-size: 12px;
654 box-shadow: rgb(153 153 255 / 10%) 10px 10px 10px;
655 }
656
657 .ConfigurationButton .icon {
658 font-size: 35px;
659 }
660 </style>
661
662 ");
663
664 WriteLiteral("\t");
665
666
667 #line 231 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
668 Write(Model.Grid("Grid", "Configuration items", "default:true;sort:1", "Configuration"));
669
670
671 #line default
672 #line hidden
673 WriteLiteral("\r\n\r\n");
674
675
676 #line 233 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
677
678
679 #line default
680 #line hidden
681
682 #line 233 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
683 if (font_configuration != null)
684 {
685 foreach (var item in font_configuration.Item.ToCodeFirstItem<Bluedesk.DynamicWeb.ItemTypes.Pages.ConfigurationPagesParent>().GetChildConfigs<FontConfiguration>())
686 {
687
688
689 #line default
690 #line hidden
691 WriteLiteral("\t\t\t<link");
692
693 WriteAttribute("href", Tuple.Create(" href=\"", 9091), Tuple.Create("\"", 9115)
694
695 #line 237 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
696 , Tuple.Create(Tuple.Create("", 9098), Tuple.Create<System.Object, System.Int32>(item["FontLink"]
697
698 #line default
699 #line hidden
700 , 9098), false)
701 );
702
703 WriteLiteral(" rel=\"stylesheet\"");
704
705 WriteLiteral(">\r\n");
706
707
708 #line 238 "D:\Dynamicweb.NET\vanBuuren\Production\host\files\Templates\Designs\VanBuuren_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
709 }
710 }
711
712
713 #line default
714 #line hidden
715 WriteLiteral("\r\n\t<link");
716
717 WriteLiteral(" rel=\"stylesheet\"");
718
719 WriteLiteral(" href=\"https://pro.fontawesome.com/releases/v5.15.4/css/all.css\"");
720
721 WriteLiteral(" integrity=\"sha384-rqn26AG5Pj86AF4SO72RK5fyefcQ/x32DNQfChxWvbXIyXFePlEktwD18fEz+k" +
722 "QU\"");
723
724 WriteLiteral(" crossorigin=\"anonymous\"");
725
726 WriteLiteral(">\r\n\t<script");
727
728 WriteLiteral(" src=\"https://kit.fontawesome.com/a46eca85e2.js\"");
729
730 WriteLiteral(" crossorigin=\"anonymous\"");
731
732 WriteLiteral("></script>\r\n\r\n</body>\r\n</html>\r\n");
733
734 }
735 }
736 }
737
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 Bluedesk.DynamicWeb.ItemTypes.Settings.Configuration;
9 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution;
10
11 @Title("Configuration page template")
12
13 @{
14 var websitesettings = Dynamicweb.Services.Items.GetItemById<WebsiteSettings>(Model.Area.Item.Id);
15 var font_configuration = Dynamicweb.Services.Pages.GetPageByNavigationTag(Pageview.AreaID, "FontConfiguration");
16
17 var designRoot = "/Files/Templates/Designs/" + Pageview.Area.Layout.Design.Name;
18 var appcss = Cache.VersionedFile(designRoot + "/dist/app.css");
19
20 }
21
22 <!DOCTYPE html>
23 <html prefix="og: http://ogp.me/ns#">
24 <head>
25
26 </head>
27 <body style="background-color: #f1f1f1;">
28
29 <link href="@appcss" rel="stylesheet" />
30 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel>
31
32 @using System;
33 @using System.Web;
34 @using System.Linq;
35 @using System.Globalization;
36
37 @using Dynamicweb;
38 @using Dynamicweb.Content.Items;
39 @using Dynamicweb.Environment;
40 @using Dynamicweb.Frontend;
41 @using Dynamicweb.Frontend.Navigation;
42
43 @using Bluedesk.Tools.Generic;
44
45 @using Bluedesk.DynamicWeb.ItemTypes;
46 @using Bluedesk.DynamicWeb.ItemTypes.Settings;
47 @using Bluedesk.DynamicWeb.ItemTypes.Settings.Configuration;
48
49 @using Bluedesk.DynamicWeb.ItemTypes.Configuration;
50 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution;
51
52 @using Bluedesk.DynamicWeb.ItemTypes.Configuration;
53
54 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution;
55 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution.Frontend;
56
57 @{
58
59 // Hydrated once per request: the product detail template (rendered before the master) reads the same MasterConfig.
60 MasterConfig mc = application._webapi.Helper.RenderCache.GetForRequest("MasterConfig_" + Pageview.AreaID, () => Dynamicweb.Services.Pages.GetPageByNavigationTag(Pageview.AreaID, "MasterConfiguration").Item.ToCodeFirstItem<MasterConfig>());
61
62 string MasterConfigCssClass = !string.IsNullOrWhiteSpace(mc.CssClass) ? mc.CssClass : "";
63
64 // GeneralConfig GeneralConfiguration = mc.GeneralConfiguration;
65 EcomConfig EcommerceConfiguration = mc.EcomConfiguration;
66
67 bool WithVATBool = Pageview.Area.EcomPricesWithVat == "True";
68 bool pricesWithoutVatForUsers = EcommerceConfiguration.ShowPricesWithoutVatForUsers;
69 bool pricesWithoutVatForValidVat = EcommerceConfiguration.ShowPricesWithoutVatWhenValidVatNumber;
70 if (pricesWithoutVatForUsers && !pricesWithoutVatForValidVat && Pageview.User != null)
71 {
72 WithVATBool = false;
73 }
74 if (pricesWithoutVatForValidVat && Pageview.User != null && !string.IsNullOrWhiteSpace(Pageview.User.VatRegNumber))
75 {
76 WithVATBool = false;
77 }
78 string ecomShowPricesWithVat = WithVATBool.ToString().ToLower();
79 string ecomPricesFormatted = (EcommerceConfiguration.FormattedPrices).ToString().ToLower();
80
81 bool IsNotContentManager = false;
82 bool isVisualEditor = Pageview.IsVisualEditorMode;
83
84 if (isVisualEditor)
85 {
86 System.Web.HttpContext.Current.Session["PreviousPage"] = Pageview.Page.ID;
87 IsNotContentManager = (Dynamicweb.Security.UserManagement.User.GetCurrentBackendUser()?.Groups?.All(g => g.Name != "Content managers") ?? true);
88 }
89
90 // Recaptcha configuration
91 var websitesettings = Dynamicweb.Content.Services.Items.GetItemById<WebsiteSettings>(Model.Area.Item.Id);
92 string recaptchaType = websitesettings.RecaptchaType;
93 string recaptchaKey = websitesettings.RecaptchaKey;
94 }
95
96 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>>
97 @using System;
98 @using System.Web;
99 @using System.Linq;
100 @using System.Globalization;
101
102 @using Dynamicweb;
103 @using Dynamicweb.Content.Items;
104 @using Dynamicweb.Environment;
105 @using Dynamicweb.Frontend;
106 @using Dynamicweb.Frontend.Navigation;
107
108 @using Bluedesk.Tools.Generic;
109
110 @using Bluedesk.DynamicWeb.ItemTypes;
111 @using Bluedesk.DynamicWeb.ItemTypes.Settings;
112 @using Bluedesk.DynamicWeb.ItemTypes.Settings.Configuration;
113
114 @using Bluedesk.DynamicWeb.ItemTypes.Configuration;
115 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution;
116 @using Bluedesk.DynamicWeb.ItemTypes.Extensions;
117
118 @helper RenderCSSKeyAndValue(string Key, string Value)
119 {
120 if (!string.IsNullOrWhiteSpace(Value))
121 {
122 <text>@Key : @Value !important;</text>
123 }
124 }
125
126 @helper SetFontCSSVariables(FontConfigurationItemTab FontConfiguration)
127 {
128
129 string Top = FontConfiguration.top != 0 ? FontConfiguration.top.ToString() + "px" : "";
130 string Left = FontConfiguration.left != 0 ? FontConfiguration.left.ToString() + "px" : "";
131 string Right = FontConfiguration.right != 0 ? FontConfiguration.right.ToString() + "px" : "";
132 string Bottom = FontConfiguration.bottom != 0 ? FontConfiguration.bottom.ToString() + "px" : "";
133
134 string Position = FontConfiguration.PositionAbsolute ? "absolute" : "relative";
135
136 string Color = FontConfiguration.Color?.GetColorCode(Pageview.AreaID) ?? "";
137 string BackgroundColor = FontConfiguration.Backgroundcolor?.GetColorCode(Pageview.AreaID) ?? "";
138
139 string BorderColor = FontConfiguration.BorderColor?.GetColorCode(Pageview.AreaID) ?? "";
140 string BorderSize = FontConfiguration.BorderSize != 0 ? FontConfiguration.BorderSize.ToString() + "px" : "";
141
142 <text>
143
144 --Position: @Position;
145
146 @RenderCSSKeyAndValue("--Padding", FontConfiguration.Padding)
147
148 @RenderCSSKeyAndValue("--Top", Top)
149 @RenderCSSKeyAndValue("--Left", Left)
150 @RenderCSSKeyAndValue("--Right", Right)
151 @RenderCSSKeyAndValue("--Bottom", Bottom)
152
153 @RenderCSSKeyAndValue("--Color", Color)
154 @RenderCSSKeyAndValue("--FontSize", FontConfiguration.FontSize)
155 @RenderCSSKeyAndValue("--FontStyle", FontConfiguration.FontStyle)
156
157 @RenderCSSKeyAndValue("--FontWeight", FontConfiguration.FontWeight)
158 @RenderCSSKeyAndValue("--FontFamily", FontConfiguration.FontConfiguration.FontFamily)
159 @RenderCSSKeyAndValue("--LineHeight", FontConfiguration.LineHeight)
160
161 @RenderCSSKeyAndValue("--BackgroundColor", BackgroundColor)
162 @RenderCSSKeyAndValue("--BorderColor", BorderColor)
163 @RenderCSSKeyAndValue("--BorderSize", BorderSize)
164
165 </text>
166
167 }
168
169 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel>
170 @using System;
171 @using System.Web;
172 @using System.Linq;
173 @using System.Globalization;
174
175 @using Dynamicweb;
176 @using Dynamicweb.Content.Items;
177 @using Dynamicweb.Environment;
178 @using Dynamicweb.Frontend;
179 @using Dynamicweb.Frontend.Navigation;
180
181 @using Bluedesk.Tools.Generic;
182
183 @using Bluedesk.DynamicWeb.ItemTypes;
184 @using Bluedesk.DynamicWeb.ItemTypes.Settings;
185
186 @using Bluedesk.DynamicWeb.ItemTypes.Configuration;
187 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution;
188 @using Bluedesk.DynamicWeb.ItemTypes.Extensions;
189 @using Bluedesk.DynamicWeb.ItemTypes.Settings.Configuration;
190
191
192 <header style="padding: 25px; display: flex; flex-direction: Column;">
193 <div>
194 <h1>@Model.Title</h1>
195 <h2 style="font-weight: normal;"></h2>
196 </div>
197 <nav style="display: flex; flex-direction: row; margin-left: 50px">
198 <a href="/Default.aspx?ID=1598" class="ConfigurationButton"><i class="icon fa-light fa-grid-horizontal"></i><label>Dashboard</label></a>
199 <a href="/Default.aspx?ID=1055" class="ConfigurationButton"><i class="icon fa-light fa-diagram-cells"></i><label>Masters</label></a>
200 <a href="/Default.aspx?ID=1055" class="ConfigurationButton"><i class="icon fa-light fa-link"></i><label>Buttons</label></a>
201 <a href="/Default.aspx?ID=1009" class="ConfigurationButton"><i class="icon fa-light fa-paintbrush"></i><label>Backgrounds</label></a>
202 <a href="/Default.aspx?ID=1460" class="ConfigurationButton"><i class="icon fa-light fa-megaphone"></i><label>Jumbotrons</label></a>
203 <a href="/Default.aspx?ID=1518" class="ConfigurationButton"><i class="icon fa-light fa-brush"></i><label>Themes</label></a>
204 <a href="/Default.aspx?ID=1450" class="ConfigurationButton"><i class="icon fa-light fa-font"></i><label>Fonts</label></a>
205 <a href="/Default.aspx?ID=1514" class="ConfigurationButton"><i class="icon fa-light fa-computer"></i><label>Devices</label></a>
206 </nav>
207 </header>
208
209 <style>
210 .ConfigurationButton {
211 display: flex;
212 flex-direction: column;
213 height: 150px;
214 width: 150px;
215 margin-right: 25px;
216 padding: 25px;
217 background-color: #ffffff;
218 justify-content: center;
219 align-items: center;
220 box-sizing: border-box;
221 text-align: center;
222 font-size: 12px;
223 box-shadow: rgb(153 153 255 / 10%) 10px 10px 10px;
224 }
225
226 .ConfigurationButton .icon {
227 font-size: 35px;
228 }
229 </style>
230
231 @Model.Grid("Grid", "Configuration items", "default:true;sort:1", "Configuration")
232
233 @if (font_configuration != null)
234 {
235 foreach (var item in font_configuration.Item.ToCodeFirstItem<Bluedesk.DynamicWeb.ItemTypes.Pages.ConfigurationPagesParent>().GetChildConfigs<FontConfiguration>())
236 {
237 <link href="@item["FontLink"]" rel="stylesheet">
238 }
239 }
240
241 <link rel="stylesheet" href="https://pro.fontawesome.com/releases/v5.15.4/css/all.css" integrity="sha384-rqn26AG5Pj86AF4SO72RK5fyefcQ/x32DNQfChxWvbXIyXFePlEktwD18fEz+kQU" crossorigin="anonymous">
242 <script src="https://kit.fontawesome.com/a46eca85e2.js" crossorigin="anonymous"></script>
243
244 </body>
245 </html>
246