| Name |
Error compiling template "Designs/Swift/Components/Specifications/Shared/FieldValue.cshtml"
Line 48: The name 'total' does not exist in the current context
1 // <auto-generated/>
2 #pragma warning disable 1591
3 namespace CompiledRazorTemplates.Dynamic
4 {
5 #line hidden
6 using System.Threading.Tasks;
7 using System;
8 using System.Collections.Generic;
9 using System.Linq;
10 using Dynamicweb.Frontend;
11 using Dynamicweb.Ecommerce.ProductCatalog;
12 internal class RazorEngine_9b7949e5288b496a852d2952e0d41f8c : Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Ecommerce.ProductCatalog.FieldValueViewModel>
13 {
14 #pragma warning disable 1998
15 public async override global::System.Threading.Tasks.Task ExecuteAsync()
16 {
17 WriteLiteral("\r\n");
18
19 var hideUnitsOfMeasure = false;
20 var index = 0;
21 var isProductDetail = Pageview.CurrentParagraph.Page.NavigationTag == "ProductDetailPage";
22
23 if (Model.Value is List<FieldOptionValueViewModel> listValues)
24 {
25 WriteLiteral("\t<span>\r\n");
26 foreach (var field in listValues)
27 {
28 if (field.IsColor() && field.GetColor() is ColorViewModel colorModel)
29 {
30 string hexColor = colorModel.Hex;
31
32 WriteLiteral(" <span class=\"colorbox-sm\"");
33 BeginWriteAttribute("style", " style=\"", 632, "\"", 667, 2);
34 WriteAttributeValue("", 640, "background-color:", 640, 17, true);
35 WriteAttributeValue(" ", 657, hexColor, 658, 9, false);
36 EndWriteAttribute();
37 BeginWriteAttribute("title", " title=\"", 668, "\"", 685, 1);
38 WriteAttributeValue("", 676, hexColor, 676, 9, false);
39 EndWriteAttribute();
40 WriteLiteral("></span>\r\n");
41 }
42 else
43 {
44 Write(field.Name.Trim());
45
46 }
47
48 if (isProductDetail && index < total - 1)
49 {
50 Write(", ");
51
52 }
53
54 index++;
55 }
56 WriteLiteral(" </span>\r\n");
57 }
58 else
59 {
60 if (Model.IsLink() && Model.GetLink() is LinkViewModel linkModel)
61 {
62 WriteLiteral("\t\t\t<span>\r\n\t\t\t\t<a");
63 BeginWriteAttribute("href", " href=\"", 1017, "\"", 1038, 1);
64 WriteAttributeValue("", 1024, linkModel.Url, 1024, 14, false);
65 EndWriteAttribute();
66 WriteLiteral(">");
67 Write(linkModel.Url);
68 WriteLiteral("</a>\r\n\t\t\t</span>\r\n");
69 }
70 else if (Model.IsColor() && Model.GetColor() is ColorViewModel colorModel)
71 {
72 string hexColor = colorModel.Hex;
73
74 WriteLiteral("\t\t\t<span class=\"colorbox-sm\"");
75 BeginWriteAttribute("style", " style=\"", 1228, "\"", 1263, 2);
76 WriteAttributeValue("", 1236, "background-color:", 1236, 17, true);
77 WriteAttributeValue(" ", 1253, hexColor, 1254, 9, false);
78 EndWriteAttribute();
79 BeginWriteAttribute("title", " title=\"", 1264, "\"", 1281, 1);
80 WriteAttributeValue("", 1272, hexColor, 1272, 9, false);
81 EndWriteAttribute();
82 WriteLiteral("></span>\r\n");
83 }
84 else if (Model.IsFile() && Model.GetFile() is FileViewModel fileModel)
85 {
86 var file = fileModel;
87
88 WriteLiteral("\t\t\t<a");
89 BeginWriteAttribute("href", " href=\"", 1409, "\"", 1426, 1);
90 WriteAttributeValue("", 1416, file.Path, 1416, 10, false);
91 EndWriteAttribute();
92 WriteLiteral(" download>");
93 Write(file.Name);
94 WriteLiteral("</a>\r\n");
95 }
96 else
97 {
98 var value = hideUnitsOfMeasure ? Model.Value : Model.GetValueWithUnits();
99 value = value.ToString().ToLower() == "true" ? Translate("Yes") : value;
100 value = value.ToString().ToLower() == "false" ? Translate("No") : value;
101
102 WriteLiteral("\t\t\t<span>");
103 Write(value);
104 WriteLiteral("</span>\r\n");
105 }
106 }
107 }
108 #pragma warning restore 1998
109 }
110 }
111 #pragma warning restore 1591
112
1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Ecommerce.ProductCatalog.FieldValueViewModel>
2 @using Dynamicweb.Frontend
3 @using Dynamicweb.Ecommerce.ProductCatalog
4
5 @{
6 var hideUnitsOfMeasure = false;
7 var index = 0;
8 var isProductDetail = Pageview.CurrentParagraph.Page.NavigationTag == "ProductDetailPage";
9
10 if (Model.Value is List<FieldOptionValueViewModel> listValues)
11 {
12 <span>
13 @foreach (var field in listValues)
14 {
15 if (field.IsColor() && field.GetColor() is ColorViewModel colorModel)
16 {
17 string hexColor = colorModel.Hex;
18
19 <span class="colorbox-sm" style="background-color: @hexColor" title="@hexColor"></span>
20 }
21 else
22 {
23 @field.Name.Trim()
24 }
25
26 if (isProductDetail && index < total - 1)
27 {
28 @(", ")
29 }
30
31 index++;
32 }
33 </span>
34 }
35 else
36 {
37 if (Model.IsLink() && Model.GetLink() is LinkViewModel linkModel)
38 {
39 <span>
40 <a href="@linkModel.Url">@linkModel.Url</a>
41 </span>
42 }
43 else if (Model.IsColor() && Model.GetColor() is ColorViewModel colorModel)
44 {
45 string hexColor = colorModel.Hex;
46
47 <span class="colorbox-sm" style="background-color: @hexColor" title="@hexColor"></span>
48 }
49 else if (Model.IsFile() && Model.GetFile() is FileViewModel fileModel)
50 {
51 var file = fileModel;
52
53 <a href="@file.Path" download>@file.Name</a>
54 }
55 else
56 {
57 var value = hideUnitsOfMeasure ? Model.Value : Model.GetValueWithUnits();
58 value = value.ToString().ToLower() == "true" ? Translate("Yes") : value;
59 value = value.ToString().ToLower() == "false" ? Translate("No") : value;
60
61 <span>@value</span>
62 }
63 }
64 }
65
|
| Grade |
Error compiling template "Designs/Swift/Components/Specifications/Shared/FieldValue.cshtml"
Line 48: The name 'total' does not exist in the current context
1 // <auto-generated/>
2 #pragma warning disable 1591
3 namespace CompiledRazorTemplates.Dynamic
4 {
5 #line hidden
6 using System.Threading.Tasks;
7 using System;
8 using System.Collections.Generic;
9 using System.Linq;
10 using Dynamicweb.Frontend;
11 using Dynamicweb.Ecommerce.ProductCatalog;
12 internal class RazorEngine_3a382d31606e40c681d791ad5cb74e4c : Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Ecommerce.ProductCatalog.FieldValueViewModel>
13 {
14 #pragma warning disable 1998
15 public async override global::System.Threading.Tasks.Task ExecuteAsync()
16 {
17 WriteLiteral("\r\n");
18
19 var hideUnitsOfMeasure = false;
20 var index = 0;
21 var isProductDetail = Pageview.CurrentParagraph.Page.NavigationTag == "ProductDetailPage";
22
23 if (Model.Value is List<FieldOptionValueViewModel> listValues)
24 {
25 WriteLiteral("\t<span>\r\n");
26 foreach (var field in listValues)
27 {
28 if (field.IsColor() && field.GetColor() is ColorViewModel colorModel)
29 {
30 string hexColor = colorModel.Hex;
31
32 WriteLiteral(" <span class=\"colorbox-sm\"");
33 BeginWriteAttribute("style", " style=\"", 632, "\"", 667, 2);
34 WriteAttributeValue("", 640, "background-color:", 640, 17, true);
35 WriteAttributeValue(" ", 657, hexColor, 658, 9, false);
36 EndWriteAttribute();
37 BeginWriteAttribute("title", " title=\"", 668, "\"", 685, 1);
38 WriteAttributeValue("", 676, hexColor, 676, 9, false);
39 EndWriteAttribute();
40 WriteLiteral("></span>\r\n");
41 }
42 else
43 {
44 Write(field.Name.Trim());
45
46 }
47
48 if (isProductDetail && index < total - 1)
49 {
50 Write(", ");
51
52 }
53
54 index++;
55 }
56 WriteLiteral(" </span>\r\n");
57 }
58 else
59 {
60 if (Model.IsLink() && Model.GetLink() is LinkViewModel linkModel)
61 {
62 WriteLiteral("\t\t\t<span>\r\n\t\t\t\t<a");
63 BeginWriteAttribute("href", " href=\"", 1017, "\"", 1038, 1);
64 WriteAttributeValue("", 1024, linkModel.Url, 1024, 14, false);
65 EndWriteAttribute();
66 WriteLiteral(">");
67 Write(linkModel.Url);
68 WriteLiteral("</a>\r\n\t\t\t</span>\r\n");
69 }
70 else if (Model.IsColor() && Model.GetColor() is ColorViewModel colorModel)
71 {
72 string hexColor = colorModel.Hex;
73
74 WriteLiteral("\t\t\t<span class=\"colorbox-sm\"");
75 BeginWriteAttribute("style", " style=\"", 1228, "\"", 1263, 2);
76 WriteAttributeValue("", 1236, "background-color:", 1236, 17, true);
77 WriteAttributeValue(" ", 1253, hexColor, 1254, 9, false);
78 EndWriteAttribute();
79 BeginWriteAttribute("title", " title=\"", 1264, "\"", 1281, 1);
80 WriteAttributeValue("", 1272, hexColor, 1272, 9, false);
81 EndWriteAttribute();
82 WriteLiteral("></span>\r\n");
83 }
84 else if (Model.IsFile() && Model.GetFile() is FileViewModel fileModel)
85 {
86 var file = fileModel;
87
88 WriteLiteral("\t\t\t<a");
89 BeginWriteAttribute("href", " href=\"", 1409, "\"", 1426, 1);
90 WriteAttributeValue("", 1416, file.Path, 1416, 10, false);
91 EndWriteAttribute();
92 WriteLiteral(" download>");
93 Write(file.Name);
94 WriteLiteral("</a>\r\n");
95 }
96 else
97 {
98 var value = hideUnitsOfMeasure ? Model.Value : Model.GetValueWithUnits();
99 value = value.ToString().ToLower() == "true" ? Translate("Yes") : value;
100 value = value.ToString().ToLower() == "false" ? Translate("No") : value;
101
102 WriteLiteral("\t\t\t<span>");
103 Write(value);
104 WriteLiteral("</span>\r\n");
105 }
106 }
107 }
108 #pragma warning restore 1998
109 }
110 }
111 #pragma warning restore 1591
112
1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Ecommerce.ProductCatalog.FieldValueViewModel>
2 @using Dynamicweb.Frontend
3 @using Dynamicweb.Ecommerce.ProductCatalog
4
5 @{
6 var hideUnitsOfMeasure = false;
7 var index = 0;
8 var isProductDetail = Pageview.CurrentParagraph.Page.NavigationTag == "ProductDetailPage";
9
10 if (Model.Value is List<FieldOptionValueViewModel> listValues)
11 {
12 <span>
13 @foreach (var field in listValues)
14 {
15 if (field.IsColor() && field.GetColor() is ColorViewModel colorModel)
16 {
17 string hexColor = colorModel.Hex;
18
19 <span class="colorbox-sm" style="background-color: @hexColor" title="@hexColor"></span>
20 }
21 else
22 {
23 @field.Name.Trim()
24 }
25
26 if (isProductDetail && index < total - 1)
27 {
28 @(", ")
29 }
30
31 index++;
32 }
33 </span>
34 }
35 else
36 {
37 if (Model.IsLink() && Model.GetLink() is LinkViewModel linkModel)
38 {
39 <span>
40 <a href="@linkModel.Url">@linkModel.Url</a>
41 </span>
42 }
43 else if (Model.IsColor() && Model.GetColor() is ColorViewModel colorModel)
44 {
45 string hexColor = colorModel.Hex;
46
47 <span class="colorbox-sm" style="background-color: @hexColor" title="@hexColor"></span>
48 }
49 else if (Model.IsFile() && Model.GetFile() is FileViewModel fileModel)
50 {
51 var file = fileModel;
52
53 <a href="@file.Path" download>@file.Name</a>
54 }
55 else
56 {
57 var value = hideUnitsOfMeasure ? Model.Value : Model.GetValueWithUnits();
58 value = value.ToString().ToLower() == "true" ? Translate("Yes") : value;
59 value = value.ToString().ToLower() == "false" ? Translate("No") : value;
60
61 <span>@value</span>
62 }
63 }
64 }
65
|
| CAS Number |
Error compiling template "Designs/Swift/Components/Specifications/Shared/FieldValue.cshtml"
Line 48: The name 'total' does not exist in the current context
1 // <auto-generated/>
2 #pragma warning disable 1591
3 namespace CompiledRazorTemplates.Dynamic
4 {
5 #line hidden
6 using System.Threading.Tasks;
7 using System;
8 using System.Collections.Generic;
9 using System.Linq;
10 using Dynamicweb.Frontend;
11 using Dynamicweb.Ecommerce.ProductCatalog;
12 internal class RazorEngine_73efa6d0ceb548fdb4e8617a702e32fe : Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Ecommerce.ProductCatalog.FieldValueViewModel>
13 {
14 #pragma warning disable 1998
15 public async override global::System.Threading.Tasks.Task ExecuteAsync()
16 {
17 WriteLiteral("\r\n");
18
19 var hideUnitsOfMeasure = false;
20 var index = 0;
21 var isProductDetail = Pageview.CurrentParagraph.Page.NavigationTag == "ProductDetailPage";
22
23 if (Model.Value is List<FieldOptionValueViewModel> listValues)
24 {
25 WriteLiteral("\t<span>\r\n");
26 foreach (var field in listValues)
27 {
28 if (field.IsColor() && field.GetColor() is ColorViewModel colorModel)
29 {
30 string hexColor = colorModel.Hex;
31
32 WriteLiteral(" <span class=\"colorbox-sm\"");
33 BeginWriteAttribute("style", " style=\"", 632, "\"", 667, 2);
34 WriteAttributeValue("", 640, "background-color:", 640, 17, true);
35 WriteAttributeValue(" ", 657, hexColor, 658, 9, false);
36 EndWriteAttribute();
37 BeginWriteAttribute("title", " title=\"", 668, "\"", 685, 1);
38 WriteAttributeValue("", 676, hexColor, 676, 9, false);
39 EndWriteAttribute();
40 WriteLiteral("></span>\r\n");
41 }
42 else
43 {
44 Write(field.Name.Trim());
45
46 }
47
48 if (isProductDetail && index < total - 1)
49 {
50 Write(", ");
51
52 }
53
54 index++;
55 }
56 WriteLiteral(" </span>\r\n");
57 }
58 else
59 {
60 if (Model.IsLink() && Model.GetLink() is LinkViewModel linkModel)
61 {
62 WriteLiteral("\t\t\t<span>\r\n\t\t\t\t<a");
63 BeginWriteAttribute("href", " href=\"", 1017, "\"", 1038, 1);
64 WriteAttributeValue("", 1024, linkModel.Url, 1024, 14, false);
65 EndWriteAttribute();
66 WriteLiteral(">");
67 Write(linkModel.Url);
68 WriteLiteral("</a>\r\n\t\t\t</span>\r\n");
69 }
70 else if (Model.IsColor() && Model.GetColor() is ColorViewModel colorModel)
71 {
72 string hexColor = colorModel.Hex;
73
74 WriteLiteral("\t\t\t<span class=\"colorbox-sm\"");
75 BeginWriteAttribute("style", " style=\"", 1228, "\"", 1263, 2);
76 WriteAttributeValue("", 1236, "background-color:", 1236, 17, true);
77 WriteAttributeValue(" ", 1253, hexColor, 1254, 9, false);
78 EndWriteAttribute();
79 BeginWriteAttribute("title", " title=\"", 1264, "\"", 1281, 1);
80 WriteAttributeValue("", 1272, hexColor, 1272, 9, false);
81 EndWriteAttribute();
82 WriteLiteral("></span>\r\n");
83 }
84 else if (Model.IsFile() && Model.GetFile() is FileViewModel fileModel)
85 {
86 var file = fileModel;
87
88 WriteLiteral("\t\t\t<a");
89 BeginWriteAttribute("href", " href=\"", 1409, "\"", 1426, 1);
90 WriteAttributeValue("", 1416, file.Path, 1416, 10, false);
91 EndWriteAttribute();
92 WriteLiteral(" download>");
93 Write(file.Name);
94 WriteLiteral("</a>\r\n");
95 }
96 else
97 {
98 var value = hideUnitsOfMeasure ? Model.Value : Model.GetValueWithUnits();
99 value = value.ToString().ToLower() == "true" ? Translate("Yes") : value;
100 value = value.ToString().ToLower() == "false" ? Translate("No") : value;
101
102 WriteLiteral("\t\t\t<span>");
103 Write(value);
104 WriteLiteral("</span>\r\n");
105 }
106 }
107 }
108 #pragma warning restore 1998
109 }
110 }
111 #pragma warning restore 1591
112
1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Ecommerce.ProductCatalog.FieldValueViewModel>
2 @using Dynamicweb.Frontend
3 @using Dynamicweb.Ecommerce.ProductCatalog
4
5 @{
6 var hideUnitsOfMeasure = false;
7 var index = 0;
8 var isProductDetail = Pageview.CurrentParagraph.Page.NavigationTag == "ProductDetailPage";
9
10 if (Model.Value is List<FieldOptionValueViewModel> listValues)
11 {
12 <span>
13 @foreach (var field in listValues)
14 {
15 if (field.IsColor() && field.GetColor() is ColorViewModel colorModel)
16 {
17 string hexColor = colorModel.Hex;
18
19 <span class="colorbox-sm" style="background-color: @hexColor" title="@hexColor"></span>
20 }
21 else
22 {
23 @field.Name.Trim()
24 }
25
26 if (isProductDetail && index < total - 1)
27 {
28 @(", ")
29 }
30
31 index++;
32 }
33 </span>
34 }
35 else
36 {
37 if (Model.IsLink() && Model.GetLink() is LinkViewModel linkModel)
38 {
39 <span>
40 <a href="@linkModel.Url">@linkModel.Url</a>
41 </span>
42 }
43 else if (Model.IsColor() && Model.GetColor() is ColorViewModel colorModel)
44 {
45 string hexColor = colorModel.Hex;
46
47 <span class="colorbox-sm" style="background-color: @hexColor" title="@hexColor"></span>
48 }
49 else if (Model.IsFile() && Model.GetFile() is FileViewModel fileModel)
50 {
51 var file = fileModel;
52
53 <a href="@file.Path" download>@file.Name</a>
54 }
55 else
56 {
57 var value = hideUnitsOfMeasure ? Model.Value : Model.GetValueWithUnits();
58 value = value.ToString().ToLower() == "true" ? Translate("Yes") : value;
59 value = value.ToString().ToLower() == "false" ? Translate("No") : value;
60
61 <span>@value</span>
62 }
63 }
64 }
65
|
| Certification |
Error compiling template "Designs/Swift/Components/Specifications/Shared/FieldValue.cshtml"
Line 48: The name 'total' does not exist in the current context
1 // <auto-generated/>
2 #pragma warning disable 1591
3 namespace CompiledRazorTemplates.Dynamic
4 {
5 #line hidden
6 using System.Threading.Tasks;
7 using System;
8 using System.Collections.Generic;
9 using System.Linq;
10 using Dynamicweb.Frontend;
11 using Dynamicweb.Ecommerce.ProductCatalog;
12 internal class RazorEngine_dad95c167f514679a82cba51452166b4 : Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Ecommerce.ProductCatalog.FieldValueViewModel>
13 {
14 #pragma warning disable 1998
15 public async override global::System.Threading.Tasks.Task ExecuteAsync()
16 {
17 WriteLiteral("\r\n");
18
19 var hideUnitsOfMeasure = false;
20 var index = 0;
21 var isProductDetail = Pageview.CurrentParagraph.Page.NavigationTag == "ProductDetailPage";
22
23 if (Model.Value is List<FieldOptionValueViewModel> listValues)
24 {
25 WriteLiteral("\t<span>\r\n");
26 foreach (var field in listValues)
27 {
28 if (field.IsColor() && field.GetColor() is ColorViewModel colorModel)
29 {
30 string hexColor = colorModel.Hex;
31
32 WriteLiteral(" <span class=\"colorbox-sm\"");
33 BeginWriteAttribute("style", " style=\"", 632, "\"", 667, 2);
34 WriteAttributeValue("", 640, "background-color:", 640, 17, true);
35 WriteAttributeValue(" ", 657, hexColor, 658, 9, false);
36 EndWriteAttribute();
37 BeginWriteAttribute("title", " title=\"", 668, "\"", 685, 1);
38 WriteAttributeValue("", 676, hexColor, 676, 9, false);
39 EndWriteAttribute();
40 WriteLiteral("></span>\r\n");
41 }
42 else
43 {
44 Write(field.Name.Trim());
45
46 }
47
48 if (isProductDetail && index < total - 1)
49 {
50 Write(", ");
51
52 }
53
54 index++;
55 }
56 WriteLiteral(" </span>\r\n");
57 }
58 else
59 {
60 if (Model.IsLink() && Model.GetLink() is LinkViewModel linkModel)
61 {
62 WriteLiteral("\t\t\t<span>\r\n\t\t\t\t<a");
63 BeginWriteAttribute("href", " href=\"", 1017, "\"", 1038, 1);
64 WriteAttributeValue("", 1024, linkModel.Url, 1024, 14, false);
65 EndWriteAttribute();
66 WriteLiteral(">");
67 Write(linkModel.Url);
68 WriteLiteral("</a>\r\n\t\t\t</span>\r\n");
69 }
70 else if (Model.IsColor() && Model.GetColor() is ColorViewModel colorModel)
71 {
72 string hexColor = colorModel.Hex;
73
74 WriteLiteral("\t\t\t<span class=\"colorbox-sm\"");
75 BeginWriteAttribute("style", " style=\"", 1228, "\"", 1263, 2);
76 WriteAttributeValue("", 1236, "background-color:", 1236, 17, true);
77 WriteAttributeValue(" ", 1253, hexColor, 1254, 9, false);
78 EndWriteAttribute();
79 BeginWriteAttribute("title", " title=\"", 1264, "\"", 1281, 1);
80 WriteAttributeValue("", 1272, hexColor, 1272, 9, false);
81 EndWriteAttribute();
82 WriteLiteral("></span>\r\n");
83 }
84 else if (Model.IsFile() && Model.GetFile() is FileViewModel fileModel)
85 {
86 var file = fileModel;
87
88 WriteLiteral("\t\t\t<a");
89 BeginWriteAttribute("href", " href=\"", 1409, "\"", 1426, 1);
90 WriteAttributeValue("", 1416, file.Path, 1416, 10, false);
91 EndWriteAttribute();
92 WriteLiteral(" download>");
93 Write(file.Name);
94 WriteLiteral("</a>\r\n");
95 }
96 else
97 {
98 var value = hideUnitsOfMeasure ? Model.Value : Model.GetValueWithUnits();
99 value = value.ToString().ToLower() == "true" ? Translate("Yes") : value;
100 value = value.ToString().ToLower() == "false" ? Translate("No") : value;
101
102 WriteLiteral("\t\t\t<span>");
103 Write(value);
104 WriteLiteral("</span>\r\n");
105 }
106 }
107 }
108 #pragma warning restore 1998
109 }
110 }
111 #pragma warning restore 1591
112
1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Ecommerce.ProductCatalog.FieldValueViewModel>
2 @using Dynamicweb.Frontend
3 @using Dynamicweb.Ecommerce.ProductCatalog
4
5 @{
6 var hideUnitsOfMeasure = false;
7 var index = 0;
8 var isProductDetail = Pageview.CurrentParagraph.Page.NavigationTag == "ProductDetailPage";
9
10 if (Model.Value is List<FieldOptionValueViewModel> listValues)
11 {
12 <span>
13 @foreach (var field in listValues)
14 {
15 if (field.IsColor() && field.GetColor() is ColorViewModel colorModel)
16 {
17 string hexColor = colorModel.Hex;
18
19 <span class="colorbox-sm" style="background-color: @hexColor" title="@hexColor"></span>
20 }
21 else
22 {
23 @field.Name.Trim()
24 }
25
26 if (isProductDetail && index < total - 1)
27 {
28 @(", ")
29 }
30
31 index++;
32 }
33 </span>
34 }
35 else
36 {
37 if (Model.IsLink() && Model.GetLink() is LinkViewModel linkModel)
38 {
39 <span>
40 <a href="@linkModel.Url">@linkModel.Url</a>
41 </span>
42 }
43 else if (Model.IsColor() && Model.GetColor() is ColorViewModel colorModel)
44 {
45 string hexColor = colorModel.Hex;
46
47 <span class="colorbox-sm" style="background-color: @hexColor" title="@hexColor"></span>
48 }
49 else if (Model.IsFile() && Model.GetFile() is FileViewModel fileModel)
50 {
51 var file = fileModel;
52
53 <a href="@file.Path" download>@file.Name</a>
54 }
55 else
56 {
57 var value = hideUnitsOfMeasure ? Model.Value : Model.GetValueWithUnits();
58 value = value.ToString().ToLower() == "true" ? Translate("Yes") : value;
59 value = value.ToString().ToLower() == "false" ? Translate("No") : value;
60
61 <span>@value</span>
62 }
63 }
64 }
65
|
| Chemical Formula |
Error compiling template "Designs/Swift/Components/Specifications/Shared/FieldValue.cshtml"
Line 48: The name 'total' does not exist in the current context
1 // <auto-generated/>
2 #pragma warning disable 1591
3 namespace CompiledRazorTemplates.Dynamic
4 {
5 #line hidden
6 using System.Threading.Tasks;
7 using System;
8 using System.Collections.Generic;
9 using System.Linq;
10 using Dynamicweb.Frontend;
11 using Dynamicweb.Ecommerce.ProductCatalog;
12 internal class RazorEngine_0e14fc57d02e42fbbd521620e50d974d : Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Ecommerce.ProductCatalog.FieldValueViewModel>
13 {
14 #pragma warning disable 1998
15 public async override global::System.Threading.Tasks.Task ExecuteAsync()
16 {
17 WriteLiteral("\r\n");
18
19 var hideUnitsOfMeasure = false;
20 var index = 0;
21 var isProductDetail = Pageview.CurrentParagraph.Page.NavigationTag == "ProductDetailPage";
22
23 if (Model.Value is List<FieldOptionValueViewModel> listValues)
24 {
25 WriteLiteral("\t<span>\r\n");
26 foreach (var field in listValues)
27 {
28 if (field.IsColor() && field.GetColor() is ColorViewModel colorModel)
29 {
30 string hexColor = colorModel.Hex;
31
32 WriteLiteral(" <span class=\"colorbox-sm\"");
33 BeginWriteAttribute("style", " style=\"", 632, "\"", 667, 2);
34 WriteAttributeValue("", 640, "background-color:", 640, 17, true);
35 WriteAttributeValue(" ", 657, hexColor, 658, 9, false);
36 EndWriteAttribute();
37 BeginWriteAttribute("title", " title=\"", 668, "\"", 685, 1);
38 WriteAttributeValue("", 676, hexColor, 676, 9, false);
39 EndWriteAttribute();
40 WriteLiteral("></span>\r\n");
41 }
42 else
43 {
44 Write(field.Name.Trim());
45
46 }
47
48 if (isProductDetail && index < total - 1)
49 {
50 Write(", ");
51
52 }
53
54 index++;
55 }
56 WriteLiteral(" </span>\r\n");
57 }
58 else
59 {
60 if (Model.IsLink() && Model.GetLink() is LinkViewModel linkModel)
61 {
62 WriteLiteral("\t\t\t<span>\r\n\t\t\t\t<a");
63 BeginWriteAttribute("href", " href=\"", 1017, "\"", 1038, 1);
64 WriteAttributeValue("", 1024, linkModel.Url, 1024, 14, false);
65 EndWriteAttribute();
66 WriteLiteral(">");
67 Write(linkModel.Url);
68 WriteLiteral("</a>\r\n\t\t\t</span>\r\n");
69 }
70 else if (Model.IsColor() && Model.GetColor() is ColorViewModel colorModel)
71 {
72 string hexColor = colorModel.Hex;
73
74 WriteLiteral("\t\t\t<span class=\"colorbox-sm\"");
75 BeginWriteAttribute("style", " style=\"", 1228, "\"", 1263, 2);
76 WriteAttributeValue("", 1236, "background-color:", 1236, 17, true);
77 WriteAttributeValue(" ", 1253, hexColor, 1254, 9, false);
78 EndWriteAttribute();
79 BeginWriteAttribute("title", " title=\"", 1264, "\"", 1281, 1);
80 WriteAttributeValue("", 1272, hexColor, 1272, 9, false);
81 EndWriteAttribute();
82 WriteLiteral("></span>\r\n");
83 }
84 else if (Model.IsFile() && Model.GetFile() is FileViewModel fileModel)
85 {
86 var file = fileModel;
87
88 WriteLiteral("\t\t\t<a");
89 BeginWriteAttribute("href", " href=\"", 1409, "\"", 1426, 1);
90 WriteAttributeValue("", 1416, file.Path, 1416, 10, false);
91 EndWriteAttribute();
92 WriteLiteral(" download>");
93 Write(file.Name);
94 WriteLiteral("</a>\r\n");
95 }
96 else
97 {
98 var value = hideUnitsOfMeasure ? Model.Value : Model.GetValueWithUnits();
99 value = value.ToString().ToLower() == "true" ? Translate("Yes") : value;
100 value = value.ToString().ToLower() == "false" ? Translate("No") : value;
101
102 WriteLiteral("\t\t\t<span>");
103 Write(value);
104 WriteLiteral("</span>\r\n");
105 }
106 }
107 }
108 #pragma warning restore 1998
109 }
110 }
111 #pragma warning restore 1591
112
1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Ecommerce.ProductCatalog.FieldValueViewModel>
2 @using Dynamicweb.Frontend
3 @using Dynamicweb.Ecommerce.ProductCatalog
4
5 @{
6 var hideUnitsOfMeasure = false;
7 var index = 0;
8 var isProductDetail = Pageview.CurrentParagraph.Page.NavigationTag == "ProductDetailPage";
9
10 if (Model.Value is List<FieldOptionValueViewModel> listValues)
11 {
12 <span>
13 @foreach (var field in listValues)
14 {
15 if (field.IsColor() && field.GetColor() is ColorViewModel colorModel)
16 {
17 string hexColor = colorModel.Hex;
18
19 <span class="colorbox-sm" style="background-color: @hexColor" title="@hexColor"></span>
20 }
21 else
22 {
23 @field.Name.Trim()
24 }
25
26 if (isProductDetail && index < total - 1)
27 {
28 @(", ")
29 }
30
31 index++;
32 }
33 </span>
34 }
35 else
36 {
37 if (Model.IsLink() && Model.GetLink() is LinkViewModel linkModel)
38 {
39 <span>
40 <a href="@linkModel.Url">@linkModel.Url</a>
41 </span>
42 }
43 else if (Model.IsColor() && Model.GetColor() is ColorViewModel colorModel)
44 {
45 string hexColor = colorModel.Hex;
46
47 <span class="colorbox-sm" style="background-color: @hexColor" title="@hexColor"></span>
48 }
49 else if (Model.IsFile() && Model.GetFile() is FileViewModel fileModel)
50 {
51 var file = fileModel;
52
53 <a href="@file.Path" download>@file.Name</a>
54 }
55 else
56 {
57 var value = hideUnitsOfMeasure ? Model.Value : Model.GetValueWithUnits();
58 value = value.ToString().ToLower() == "true" ? Translate("Yes") : value;
59 value = value.ToString().ToLower() == "false" ? Translate("No") : value;
60
61 <span>@value</span>
62 }
63 }
64 }
65
|
| Physical Form |
Error compiling template "Designs/Swift/Components/Specifications/Shared/FieldValue.cshtml"
Line 48: The name 'total' does not exist in the current context
1 // <auto-generated/>
2 #pragma warning disable 1591
3 namespace CompiledRazorTemplates.Dynamic
4 {
5 #line hidden
6 using System.Threading.Tasks;
7 using System;
8 using System.Collections.Generic;
9 using System.Linq;
10 using Dynamicweb.Frontend;
11 using Dynamicweb.Ecommerce.ProductCatalog;
12 internal class RazorEngine_2959859813f14d4496264ae8f2da0d72 : Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Ecommerce.ProductCatalog.FieldValueViewModel>
13 {
14 #pragma warning disable 1998
15 public async override global::System.Threading.Tasks.Task ExecuteAsync()
16 {
17 WriteLiteral("\r\n");
18
19 var hideUnitsOfMeasure = false;
20 var index = 0;
21 var isProductDetail = Pageview.CurrentParagraph.Page.NavigationTag == "ProductDetailPage";
22
23 if (Model.Value is List<FieldOptionValueViewModel> listValues)
24 {
25 WriteLiteral("\t<span>\r\n");
26 foreach (var field in listValues)
27 {
28 if (field.IsColor() && field.GetColor() is ColorViewModel colorModel)
29 {
30 string hexColor = colorModel.Hex;
31
32 WriteLiteral(" <span class=\"colorbox-sm\"");
33 BeginWriteAttribute("style", " style=\"", 632, "\"", 667, 2);
34 WriteAttributeValue("", 640, "background-color:", 640, 17, true);
35 WriteAttributeValue(" ", 657, hexColor, 658, 9, false);
36 EndWriteAttribute();
37 BeginWriteAttribute("title", " title=\"", 668, "\"", 685, 1);
38 WriteAttributeValue("", 676, hexColor, 676, 9, false);
39 EndWriteAttribute();
40 WriteLiteral("></span>\r\n");
41 }
42 else
43 {
44 Write(field.Name.Trim());
45
46 }
47
48 if (isProductDetail && index < total - 1)
49 {
50 Write(", ");
51
52 }
53
54 index++;
55 }
56 WriteLiteral(" </span>\r\n");
57 }
58 else
59 {
60 if (Model.IsLink() && Model.GetLink() is LinkViewModel linkModel)
61 {
62 WriteLiteral("\t\t\t<span>\r\n\t\t\t\t<a");
63 BeginWriteAttribute("href", " href=\"", 1017, "\"", 1038, 1);
64 WriteAttributeValue("", 1024, linkModel.Url, 1024, 14, false);
65 EndWriteAttribute();
66 WriteLiteral(">");
67 Write(linkModel.Url);
68 WriteLiteral("</a>\r\n\t\t\t</span>\r\n");
69 }
70 else if (Model.IsColor() && Model.GetColor() is ColorViewModel colorModel)
71 {
72 string hexColor = colorModel.Hex;
73
74 WriteLiteral("\t\t\t<span class=\"colorbox-sm\"");
75 BeginWriteAttribute("style", " style=\"", 1228, "\"", 1263, 2);
76 WriteAttributeValue("", 1236, "background-color:", 1236, 17, true);
77 WriteAttributeValue(" ", 1253, hexColor, 1254, 9, false);
78 EndWriteAttribute();
79 BeginWriteAttribute("title", " title=\"", 1264, "\"", 1281, 1);
80 WriteAttributeValue("", 1272, hexColor, 1272, 9, false);
81 EndWriteAttribute();
82 WriteLiteral("></span>\r\n");
83 }
84 else if (Model.IsFile() && Model.GetFile() is FileViewModel fileModel)
85 {
86 var file = fileModel;
87
88 WriteLiteral("\t\t\t<a");
89 BeginWriteAttribute("href", " href=\"", 1409, "\"", 1426, 1);
90 WriteAttributeValue("", 1416, file.Path, 1416, 10, false);
91 EndWriteAttribute();
92 WriteLiteral(" download>");
93 Write(file.Name);
94 WriteLiteral("</a>\r\n");
95 }
96 else
97 {
98 var value = hideUnitsOfMeasure ? Model.Value : Model.GetValueWithUnits();
99 value = value.ToString().ToLower() == "true" ? Translate("Yes") : value;
100 value = value.ToString().ToLower() == "false" ? Translate("No") : value;
101
102 WriteLiteral("\t\t\t<span>");
103 Write(value);
104 WriteLiteral("</span>\r\n");
105 }
106 }
107 }
108 #pragma warning restore 1998
109 }
110 }
111 #pragma warning restore 1591
112
1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Ecommerce.ProductCatalog.FieldValueViewModel>
2 @using Dynamicweb.Frontend
3 @using Dynamicweb.Ecommerce.ProductCatalog
4
5 @{
6 var hideUnitsOfMeasure = false;
7 var index = 0;
8 var isProductDetail = Pageview.CurrentParagraph.Page.NavigationTag == "ProductDetailPage";
9
10 if (Model.Value is List<FieldOptionValueViewModel> listValues)
11 {
12 <span>
13 @foreach (var field in listValues)
14 {
15 if (field.IsColor() && field.GetColor() is ColorViewModel colorModel)
16 {
17 string hexColor = colorModel.Hex;
18
19 <span class="colorbox-sm" style="background-color: @hexColor" title="@hexColor"></span>
20 }
21 else
22 {
23 @field.Name.Trim()
24 }
25
26 if (isProductDetail && index < total - 1)
27 {
28 @(", ")
29 }
30
31 index++;
32 }
33 </span>
34 }
35 else
36 {
37 if (Model.IsLink() && Model.GetLink() is LinkViewModel linkModel)
38 {
39 <span>
40 <a href="@linkModel.Url">@linkModel.Url</a>
41 </span>
42 }
43 else if (Model.IsColor() && Model.GetColor() is ColorViewModel colorModel)
44 {
45 string hexColor = colorModel.Hex;
46
47 <span class="colorbox-sm" style="background-color: @hexColor" title="@hexColor"></span>
48 }
49 else if (Model.IsFile() && Model.GetFile() is FileViewModel fileModel)
50 {
51 var file = fileModel;
52
53 <a href="@file.Path" download>@file.Name</a>
54 }
55 else
56 {
57 var value = hideUnitsOfMeasure ? Model.Value : Model.GetValueWithUnits();
58 value = value.ToString().ToLower() == "true" ? Translate("Yes") : value;
59 value = value.ToString().ToLower() == "false" ? Translate("No") : value;
60
61 <span>@value</span>
62 }
63 }
64 }
65
|
| UN Number |
Error compiling template "Designs/Swift/Components/Specifications/Shared/FieldValue.cshtml"
Line 48: The name 'total' does not exist in the current context
1 // <auto-generated/>
2 #pragma warning disable 1591
3 namespace CompiledRazorTemplates.Dynamic
4 {
5 #line hidden
6 using System.Threading.Tasks;
7 using System;
8 using System.Collections.Generic;
9 using System.Linq;
10 using Dynamicweb.Frontend;
11 using Dynamicweb.Ecommerce.ProductCatalog;
12 internal class RazorEngine_78d1f637202e4d0f8e45d0f0b261742c : Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Ecommerce.ProductCatalog.FieldValueViewModel>
13 {
14 #pragma warning disable 1998
15 public async override global::System.Threading.Tasks.Task ExecuteAsync()
16 {
17 WriteLiteral("\r\n");
18
19 var hideUnitsOfMeasure = false;
20 var index = 0;
21 var isProductDetail = Pageview.CurrentParagraph.Page.NavigationTag == "ProductDetailPage";
22
23 if (Model.Value is List<FieldOptionValueViewModel> listValues)
24 {
25 WriteLiteral("\t<span>\r\n");
26 foreach (var field in listValues)
27 {
28 if (field.IsColor() && field.GetColor() is ColorViewModel colorModel)
29 {
30 string hexColor = colorModel.Hex;
31
32 WriteLiteral(" <span class=\"colorbox-sm\"");
33 BeginWriteAttribute("style", " style=\"", 632, "\"", 667, 2);
34 WriteAttributeValue("", 640, "background-color:", 640, 17, true);
35 WriteAttributeValue(" ", 657, hexColor, 658, 9, false);
36 EndWriteAttribute();
37 BeginWriteAttribute("title", " title=\"", 668, "\"", 685, 1);
38 WriteAttributeValue("", 676, hexColor, 676, 9, false);
39 EndWriteAttribute();
40 WriteLiteral("></span>\r\n");
41 }
42 else
43 {
44 Write(field.Name.Trim());
45
46 }
47
48 if (isProductDetail && index < total - 1)
49 {
50 Write(", ");
51
52 }
53
54 index++;
55 }
56 WriteLiteral(" </span>\r\n");
57 }
58 else
59 {
60 if (Model.IsLink() && Model.GetLink() is LinkViewModel linkModel)
61 {
62 WriteLiteral("\t\t\t<span>\r\n\t\t\t\t<a");
63 BeginWriteAttribute("href", " href=\"", 1017, "\"", 1038, 1);
64 WriteAttributeValue("", 1024, linkModel.Url, 1024, 14, false);
65 EndWriteAttribute();
66 WriteLiteral(">");
67 Write(linkModel.Url);
68 WriteLiteral("</a>\r\n\t\t\t</span>\r\n");
69 }
70 else if (Model.IsColor() && Model.GetColor() is ColorViewModel colorModel)
71 {
72 string hexColor = colorModel.Hex;
73
74 WriteLiteral("\t\t\t<span class=\"colorbox-sm\"");
75 BeginWriteAttribute("style", " style=\"", 1228, "\"", 1263, 2);
76 WriteAttributeValue("", 1236, "background-color:", 1236, 17, true);
77 WriteAttributeValue(" ", 1253, hexColor, 1254, 9, false);
78 EndWriteAttribute();
79 BeginWriteAttribute("title", " title=\"", 1264, "\"", 1281, 1);
80 WriteAttributeValue("", 1272, hexColor, 1272, 9, false);
81 EndWriteAttribute();
82 WriteLiteral("></span>\r\n");
83 }
84 else if (Model.IsFile() && Model.GetFile() is FileViewModel fileModel)
85 {
86 var file = fileModel;
87
88 WriteLiteral("\t\t\t<a");
89 BeginWriteAttribute("href", " href=\"", 1409, "\"", 1426, 1);
90 WriteAttributeValue("", 1416, file.Path, 1416, 10, false);
91 EndWriteAttribute();
92 WriteLiteral(" download>");
93 Write(file.Name);
94 WriteLiteral("</a>\r\n");
95 }
96 else
97 {
98 var value = hideUnitsOfMeasure ? Model.Value : Model.GetValueWithUnits();
99 value = value.ToString().ToLower() == "true" ? Translate("Yes") : value;
100 value = value.ToString().ToLower() == "false" ? Translate("No") : value;
101
102 WriteLiteral("\t\t\t<span>");
103 Write(value);
104 WriteLiteral("</span>\r\n");
105 }
106 }
107 }
108 #pragma warning restore 1998
109 }
110 }
111 #pragma warning restore 1591
112
1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Ecommerce.ProductCatalog.FieldValueViewModel>
2 @using Dynamicweb.Frontend
3 @using Dynamicweb.Ecommerce.ProductCatalog
4
5 @{
6 var hideUnitsOfMeasure = false;
7 var index = 0;
8 var isProductDetail = Pageview.CurrentParagraph.Page.NavigationTag == "ProductDetailPage";
9
10 if (Model.Value is List<FieldOptionValueViewModel> listValues)
11 {
12 <span>
13 @foreach (var field in listValues)
14 {
15 if (field.IsColor() && field.GetColor() is ColorViewModel colorModel)
16 {
17 string hexColor = colorModel.Hex;
18
19 <span class="colorbox-sm" style="background-color: @hexColor" title="@hexColor"></span>
20 }
21 else
22 {
23 @field.Name.Trim()
24 }
25
26 if (isProductDetail && index < total - 1)
27 {
28 @(", ")
29 }
30
31 index++;
32 }
33 </span>
34 }
35 else
36 {
37 if (Model.IsLink() && Model.GetLink() is LinkViewModel linkModel)
38 {
39 <span>
40 <a href="@linkModel.Url">@linkModel.Url</a>
41 </span>
42 }
43 else if (Model.IsColor() && Model.GetColor() is ColorViewModel colorModel)
44 {
45 string hexColor = colorModel.Hex;
46
47 <span class="colorbox-sm" style="background-color: @hexColor" title="@hexColor"></span>
48 }
49 else if (Model.IsFile() && Model.GetFile() is FileViewModel fileModel)
50 {
51 var file = fileModel;
52
53 <a href="@file.Path" download>@file.Name</a>
54 }
55 else
56 {
57 var value = hideUnitsOfMeasure ? Model.Value : Model.GetValueWithUnits();
58 value = value.ToString().ToLower() == "true" ? Translate("Yes") : value;
59 value = value.ToString().ToLower() == "false" ? Translate("No") : value;
60
61 <span>@value</span>
62 }
63 }
64 }
65
|
| Number |
Error compiling template "Designs/Swift/Components/Specifications/Shared/FieldValue.cshtml"
Line 48: The name 'total' does not exist in the current context
1 // <auto-generated/>
2 #pragma warning disable 1591
3 namespace CompiledRazorTemplates.Dynamic
4 {
5 #line hidden
6 using System.Threading.Tasks;
7 using System;
8 using System.Collections.Generic;
9 using System.Linq;
10 using Dynamicweb.Frontend;
11 using Dynamicweb.Ecommerce.ProductCatalog;
12 internal class RazorEngine_b3e2b2b74f7e4114b0cd5f8ad595689c : Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Ecommerce.ProductCatalog.FieldValueViewModel>
13 {
14 #pragma warning disable 1998
15 public async override global::System.Threading.Tasks.Task ExecuteAsync()
16 {
17 WriteLiteral("\r\n");
18
19 var hideUnitsOfMeasure = false;
20 var index = 0;
21 var isProductDetail = Pageview.CurrentParagraph.Page.NavigationTag == "ProductDetailPage";
22
23 if (Model.Value is List<FieldOptionValueViewModel> listValues)
24 {
25 WriteLiteral("\t<span>\r\n");
26 foreach (var field in listValues)
27 {
28 if (field.IsColor() && field.GetColor() is ColorViewModel colorModel)
29 {
30 string hexColor = colorModel.Hex;
31
32 WriteLiteral(" <span class=\"colorbox-sm\"");
33 BeginWriteAttribute("style", " style=\"", 632, "\"", 667, 2);
34 WriteAttributeValue("", 640, "background-color:", 640, 17, true);
35 WriteAttributeValue(" ", 657, hexColor, 658, 9, false);
36 EndWriteAttribute();
37 BeginWriteAttribute("title", " title=\"", 668, "\"", 685, 1);
38 WriteAttributeValue("", 676, hexColor, 676, 9, false);
39 EndWriteAttribute();
40 WriteLiteral("></span>\r\n");
41 }
42 else
43 {
44 Write(field.Name.Trim());
45
46 }
47
48 if (isProductDetail && index < total - 1)
49 {
50 Write(", ");
51
52 }
53
54 index++;
55 }
56 WriteLiteral(" </span>\r\n");
57 }
58 else
59 {
60 if (Model.IsLink() && Model.GetLink() is LinkViewModel linkModel)
61 {
62 WriteLiteral("\t\t\t<span>\r\n\t\t\t\t<a");
63 BeginWriteAttribute("href", " href=\"", 1017, "\"", 1038, 1);
64 WriteAttributeValue("", 1024, linkModel.Url, 1024, 14, false);
65 EndWriteAttribute();
66 WriteLiteral(">");
67 Write(linkModel.Url);
68 WriteLiteral("</a>\r\n\t\t\t</span>\r\n");
69 }
70 else if (Model.IsColor() && Model.GetColor() is ColorViewModel colorModel)
71 {
72 string hexColor = colorModel.Hex;
73
74 WriteLiteral("\t\t\t<span class=\"colorbox-sm\"");
75 BeginWriteAttribute("style", " style=\"", 1228, "\"", 1263, 2);
76 WriteAttributeValue("", 1236, "background-color:", 1236, 17, true);
77 WriteAttributeValue(" ", 1253, hexColor, 1254, 9, false);
78 EndWriteAttribute();
79 BeginWriteAttribute("title", " title=\"", 1264, "\"", 1281, 1);
80 WriteAttributeValue("", 1272, hexColor, 1272, 9, false);
81 EndWriteAttribute();
82 WriteLiteral("></span>\r\n");
83 }
84 else if (Model.IsFile() && Model.GetFile() is FileViewModel fileModel)
85 {
86 var file = fileModel;
87
88 WriteLiteral("\t\t\t<a");
89 BeginWriteAttribute("href", " href=\"", 1409, "\"", 1426, 1);
90 WriteAttributeValue("", 1416, file.Path, 1416, 10, false);
91 EndWriteAttribute();
92 WriteLiteral(" download>");
93 Write(file.Name);
94 WriteLiteral("</a>\r\n");
95 }
96 else
97 {
98 var value = hideUnitsOfMeasure ? Model.Value : Model.GetValueWithUnits();
99 value = value.ToString().ToLower() == "true" ? Translate("Yes") : value;
100 value = value.ToString().ToLower() == "false" ? Translate("No") : value;
101
102 WriteLiteral("\t\t\t<span>");
103 Write(value);
104 WriteLiteral("</span>\r\n");
105 }
106 }
107 }
108 #pragma warning restore 1998
109 }
110 }
111 #pragma warning restore 1591
112
1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Ecommerce.ProductCatalog.FieldValueViewModel>
2 @using Dynamicweb.Frontend
3 @using Dynamicweb.Ecommerce.ProductCatalog
4
5 @{
6 var hideUnitsOfMeasure = false;
7 var index = 0;
8 var isProductDetail = Pageview.CurrentParagraph.Page.NavigationTag == "ProductDetailPage";
9
10 if (Model.Value is List<FieldOptionValueViewModel> listValues)
11 {
12 <span>
13 @foreach (var field in listValues)
14 {
15 if (field.IsColor() && field.GetColor() is ColorViewModel colorModel)
16 {
17 string hexColor = colorModel.Hex;
18
19 <span class="colorbox-sm" style="background-color: @hexColor" title="@hexColor"></span>
20 }
21 else
22 {
23 @field.Name.Trim()
24 }
25
26 if (isProductDetail && index < total - 1)
27 {
28 @(", ")
29 }
30
31 index++;
32 }
33 </span>
34 }
35 else
36 {
37 if (Model.IsLink() && Model.GetLink() is LinkViewModel linkModel)
38 {
39 <span>
40 <a href="@linkModel.Url">@linkModel.Url</a>
41 </span>
42 }
43 else if (Model.IsColor() && Model.GetColor() is ColorViewModel colorModel)
44 {
45 string hexColor = colorModel.Hex;
46
47 <span class="colorbox-sm" style="background-color: @hexColor" title="@hexColor"></span>
48 }
49 else if (Model.IsFile() && Model.GetFile() is FileViewModel fileModel)
50 {
51 var file = fileModel;
52
53 <a href="@file.Path" download>@file.Name</a>
54 }
55 else
56 {
57 var value = hideUnitsOfMeasure ? Model.Value : Model.GetValueWithUnits();
58 value = value.ToString().ToLower() == "true" ? Translate("Yes") : value;
59 value = value.ToString().ToLower() == "false" ? Translate("No") : value;
60
61 <span>@value</span>
62 }
63 }
64 }
65
|
| Catalog Number |
Error compiling template "Designs/Swift/Components/Specifications/Shared/FieldValue.cshtml"
Line 48: The name 'total' does not exist in the current context
1 // <auto-generated/>
2 #pragma warning disable 1591
3 namespace CompiledRazorTemplates.Dynamic
4 {
5 #line hidden
6 using System.Threading.Tasks;
7 using System;
8 using System.Collections.Generic;
9 using System.Linq;
10 using Dynamicweb.Frontend;
11 using Dynamicweb.Ecommerce.ProductCatalog;
12 internal class RazorEngine_9e04609fef87492888f8e09d64db5b64 : Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Ecommerce.ProductCatalog.FieldValueViewModel>
13 {
14 #pragma warning disable 1998
15 public async override global::System.Threading.Tasks.Task ExecuteAsync()
16 {
17 WriteLiteral("\r\n");
18
19 var hideUnitsOfMeasure = false;
20 var index = 0;
21 var isProductDetail = Pageview.CurrentParagraph.Page.NavigationTag == "ProductDetailPage";
22
23 if (Model.Value is List<FieldOptionValueViewModel> listValues)
24 {
25 WriteLiteral("\t<span>\r\n");
26 foreach (var field in listValues)
27 {
28 if (field.IsColor() && field.GetColor() is ColorViewModel colorModel)
29 {
30 string hexColor = colorModel.Hex;
31
32 WriteLiteral(" <span class=\"colorbox-sm\"");
33 BeginWriteAttribute("style", " style=\"", 632, "\"", 667, 2);
34 WriteAttributeValue("", 640, "background-color:", 640, 17, true);
35 WriteAttributeValue(" ", 657, hexColor, 658, 9, false);
36 EndWriteAttribute();
37 BeginWriteAttribute("title", " title=\"", 668, "\"", 685, 1);
38 WriteAttributeValue("", 676, hexColor, 676, 9, false);
39 EndWriteAttribute();
40 WriteLiteral("></span>\r\n");
41 }
42 else
43 {
44 Write(field.Name.Trim());
45
46 }
47
48 if (isProductDetail && index < total - 1)
49 {
50 Write(", ");
51
52 }
53
54 index++;
55 }
56 WriteLiteral(" </span>\r\n");
57 }
58 else
59 {
60 if (Model.IsLink() && Model.GetLink() is LinkViewModel linkModel)
61 {
62 WriteLiteral("\t\t\t<span>\r\n\t\t\t\t<a");
63 BeginWriteAttribute("href", " href=\"", 1017, "\"", 1038, 1);
64 WriteAttributeValue("", 1024, linkModel.Url, 1024, 14, false);
65 EndWriteAttribute();
66 WriteLiteral(">");
67 Write(linkModel.Url);
68 WriteLiteral("</a>\r\n\t\t\t</span>\r\n");
69 }
70 else if (Model.IsColor() && Model.GetColor() is ColorViewModel colorModel)
71 {
72 string hexColor = colorModel.Hex;
73
74 WriteLiteral("\t\t\t<span class=\"colorbox-sm\"");
75 BeginWriteAttribute("style", " style=\"", 1228, "\"", 1263, 2);
76 WriteAttributeValue("", 1236, "background-color:", 1236, 17, true);
77 WriteAttributeValue(" ", 1253, hexColor, 1254, 9, false);
78 EndWriteAttribute();
79 BeginWriteAttribute("title", " title=\"", 1264, "\"", 1281, 1);
80 WriteAttributeValue("", 1272, hexColor, 1272, 9, false);
81 EndWriteAttribute();
82 WriteLiteral("></span>\r\n");
83 }
84 else if (Model.IsFile() && Model.GetFile() is FileViewModel fileModel)
85 {
86 var file = fileModel;
87
88 WriteLiteral("\t\t\t<a");
89 BeginWriteAttribute("href", " href=\"", 1409, "\"", 1426, 1);
90 WriteAttributeValue("", 1416, file.Path, 1416, 10, false);
91 EndWriteAttribute();
92 WriteLiteral(" download>");
93 Write(file.Name);
94 WriteLiteral("</a>\r\n");
95 }
96 else
97 {
98 var value = hideUnitsOfMeasure ? Model.Value : Model.GetValueWithUnits();
99 value = value.ToString().ToLower() == "true" ? Translate("Yes") : value;
100 value = value.ToString().ToLower() == "false" ? Translate("No") : value;
101
102 WriteLiteral("\t\t\t<span>");
103 Write(value);
104 WriteLiteral("</span>\r\n");
105 }
106 }
107 }
108 #pragma warning restore 1998
109 }
110 }
111 #pragma warning restore 1591
112
1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Ecommerce.ProductCatalog.FieldValueViewModel>
2 @using Dynamicweb.Frontend
3 @using Dynamicweb.Ecommerce.ProductCatalog
4
5 @{
6 var hideUnitsOfMeasure = false;
7 var index = 0;
8 var isProductDetail = Pageview.CurrentParagraph.Page.NavigationTag == "ProductDetailPage";
9
10 if (Model.Value is List<FieldOptionValueViewModel> listValues)
11 {
12 <span>
13 @foreach (var field in listValues)
14 {
15 if (field.IsColor() && field.GetColor() is ColorViewModel colorModel)
16 {
17 string hexColor = colorModel.Hex;
18
19 <span class="colorbox-sm" style="background-color: @hexColor" title="@hexColor"></span>
20 }
21 else
22 {
23 @field.Name.Trim()
24 }
25
26 if (isProductDetail && index < total - 1)
27 {
28 @(", ")
29 }
30
31 index++;
32 }
33 </span>
34 }
35 else
36 {
37 if (Model.IsLink() && Model.GetLink() is LinkViewModel linkModel)
38 {
39 <span>
40 <a href="@linkModel.Url">@linkModel.Url</a>
41 </span>
42 }
43 else if (Model.IsColor() && Model.GetColor() is ColorViewModel colorModel)
44 {
45 string hexColor = colorModel.Hex;
46
47 <span class="colorbox-sm" style="background-color: @hexColor" title="@hexColor"></span>
48 }
49 else if (Model.IsFile() && Model.GetFile() is FileViewModel fileModel)
50 {
51 var file = fileModel;
52
53 <a href="@file.Path" download>@file.Name</a>
54 }
55 else
56 {
57 var value = hideUnitsOfMeasure ? Model.Value : Model.GetValueWithUnits();
58 value = value.ToString().ToLower() == "true" ? Translate("Yes") : value;
59 value = value.ToString().ToLower() == "false" ? Translate("No") : value;
60
61 <span>@value</span>
62 }
63 }
64 }
65
|