| Name |
Error compiling template "Designs/Swift/Components/Specifications/Shared/FieldValue.cshtml"
Line 47: ; expected
Line 47: Keyword, identifier, or string expected after verbatim specifier: @
Line 47: ) expected
Line 47: ; expected
Line 89: } expected
Line 89: } expected
Line 89: } expected
Line 45: A local or parameter named 'field' cannot be declared in this scope because that name is used in an enclosing local scope to define a local or parameter
Line 47: Operator '&&' cannot be applied to operands of type 'bool' and 'int'
Line 57: The name 'linkModel' does not exist in the current context
Line 60: The name 'linkModel' does not exist in the current context
Line 64: The name 'hexColor' does not exist in the current context
Line 67: The name 'hexColor' does not exist in the current context
Line 71: The name 'file' does not exist in the current context
Line 74: The name 'file' does not exist in the current context
Line 84: The name 'value' does not exist in the current context
Line 19: The variable 'hideUnitsOfMeasure' is assigned but its value is never used
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_a1e1a9a06a7e482e9158299fdbdf808f : 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 foreach (var field in listValues)
26 {
27 var total = listValues.Count;
28 if (field.IsColor() && field.GetColor() is ColorViewModel colorModel)
29 {
30 string hexColor = colorModel.Hex;
31
32 WriteLiteral("\t\t\t\t<span class=\"colorbox-sm\"");
33 BeginWriteAttribute("style", " style=\"", 626, "\"", 661, 2);
34 WriteAttributeValue("", 634, "background-color:", 634, 17, true);
35 WriteAttributeValue(" ", 651, hexColor, 652, 9, false);
36 EndWriteAttribute();
37 BeginWriteAttribute("title", " title=\"", 662, "\"", 679, 1);
38 WriteAttributeValue("", 670, hexColor, 670, 9, false);
39 EndWriteAttribute();
40 WriteLiteral("></span>\r\n");
41 }
42 else
43 {
44 WriteLiteral("\t\t\t\t<span>\r\n");
45 foreach (var field in listValues)
46 {
47 field.Name.Trim()@(isProductDetail && index WriteLiteral("< total - 1 ? \", \" : \"\")\r\n index++;\r\n}\r\n</span>\r\n");
48 WriteLiteral("<!-- <span>\r\n ");
49 Write(string.Join(", ", field.Name.Trim()));
50 WriteLiteral("\r\n</span> -->\r\n");
51 WriteLiteral("\t\t\t\t<!-- <span>");
52 Write(field.Name.ToString().Trim());
53 WriteLiteral("</span>\r\n\r\n\t\t\t\tif (isProductDetail && index < total - 1)\r\n\t\t\t\t{\r\n\t\t\t\t\t<span>, </span>\r\n\t\t\t\t} -->\r\n");
54 }
55 WriteLiteral("\t\t\t<!-- index++; -->\r\n\t\t}\r\n\t}\r\n\telse\r\n\t{\r\n\t\tif (Model.IsLink() && Model.GetLink() is LinkViewModel linkModel)\r\n\t\t{\r\n\t\t\t<span>\r\n\t\t\t\t<a");
56 BeginWriteAttribute("href", " href=\"", 1216, "\"", 1237, 1);
57 WriteAttributeValue("", 1223, linkModel.Url, 1223, 14, false);
58 EndWriteAttribute();
59 WriteLiteral(">");
60 Write(linkModel.Url);
61 WriteLiteral("</a>\r\n\t\t\t</span>\r\n\t\t}\r\n\t\telse if (Model.IsColor() && Model.GetColor() is ColorViewModel colorModel)\r\n\t\t{\r\n\t\t\tstring hexColor = colorModel.Hex;\r\n\r\n\t\t\t<span class=\"colorbox-sm\"");
62 BeginWriteAttribute("style", " style=\"", 1427, "\"", 1462, 2);
63 WriteAttributeValue("", 1435, "background-color:", 1435, 17, true);
64 WriteAttributeValue(" ", 1452, hexColor, 1453, 9, false);
65 EndWriteAttribute();
66 BeginWriteAttribute("title", " title=\"", 1463, "\"", 1480, 1);
67 WriteAttributeValue("", 1471, hexColor, 1471, 9, false);
68 EndWriteAttribute();
69 WriteLiteral("></span>\r\n\t\t}\r\n\t\telse if (Model.IsFile() && Model.GetFile() is FileViewModel fileModel)\r\n\t\t{\r\n\t\t\tvar file = fileModel;\r\n\r\n\t\t\t<a");
70 BeginWriteAttribute("href", " href=\"", 1608, "\"", 1625, 1);
71 WriteAttributeValue("", 1615, file.Path, 1615, 10, false);
72 EndWriteAttribute();
73 WriteLiteral(" download>");
74 Write(file.Name);
75 WriteLiteral(@"</a>
76 }
77 else
78 {
79 var value = hideUnitsOfMeasure ? Model.Value : Model.GetValueWithUnits();
80 value = value.ToString().ToLower() == ""true"" ? Translate(""Yes"") : value;
81 value = value.ToString().ToLower() == ""false"" ? Translate(""No"") : value;
82
83 <span>");
84 Write(value);
85 WriteLiteral("</span>\r\n\t\t}\r\n\t}\r\n}\r\n");
86 }
87 #pragma warning restore 1998
88 }
89 }
90 #pragma warning restore 1591
91
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 foreach (var field in listValues)
13 {
14 var total = listValues.Count;
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 <span>
24 @foreach (var field in listValues)
25 {
26 field.Name.Trim()@(isProductDetail && index < total - 1 ? ", " : "")
27 index++;
28 }
29 </span>
30
31 <!-- <span>
32 @string.Join(", ", field.Name.Trim())
33 </span> -->
34
35 <!-- <span>@field.Name.ToString().Trim()</span>
36
37 if (isProductDetail && index < total - 1)
38 {
39 <span>, </span>
40 } -->
41 }
42 <!-- index++; -->
43 }
44 }
45 else
46 {
47 if (Model.IsLink() && Model.GetLink() is LinkViewModel linkModel)
48 {
49 <span>
50 <a href="@linkModel.Url">@linkModel.Url</a>
51 </span>
52 }
53 else if (Model.IsColor() && Model.GetColor() is ColorViewModel colorModel)
54 {
55 string hexColor = colorModel.Hex;
56
57 <span class="colorbox-sm" style="background-color: @hexColor" title="@hexColor"></span>
58 }
59 else if (Model.IsFile() && Model.GetFile() is FileViewModel fileModel)
60 {
61 var file = fileModel;
62
63 <a href="@file.Path" download>@file.Name</a>
64 }
65 else
66 {
67 var value = hideUnitsOfMeasure ? Model.Value : Model.GetValueWithUnits();
68 value = value.ToString().ToLower() == "true" ? Translate("Yes") : value;
69 value = value.ToString().ToLower() == "false" ? Translate("No") : value;
70
71 <span>@value</span>
72 }
73 }
74 }
75
|
| Beverage Base |
Error compiling template "Designs/Swift/Components/Specifications/Shared/FieldValue.cshtml"
Line 47: ; expected
Line 47: Keyword, identifier, or string expected after verbatim specifier: @
Line 47: ) expected
Line 47: ; expected
Line 89: } expected
Line 89: } expected
Line 89: } expected
Line 45: A local or parameter named 'field' cannot be declared in this scope because that name is used in an enclosing local scope to define a local or parameter
Line 47: Operator '&&' cannot be applied to operands of type 'bool' and 'int'
Line 57: The name 'linkModel' does not exist in the current context
Line 60: The name 'linkModel' does not exist in the current context
Line 64: The name 'hexColor' does not exist in the current context
Line 67: The name 'hexColor' does not exist in the current context
Line 71: The name 'file' does not exist in the current context
Line 74: The name 'file' does not exist in the current context
Line 84: The name 'value' does not exist in the current context
Line 19: The variable 'hideUnitsOfMeasure' is assigned but its value is never used
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_a39fc178b7b44cdfaf8ec4cbff34a1e3 : 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 foreach (var field in listValues)
26 {
27 var total = listValues.Count;
28 if (field.IsColor() && field.GetColor() is ColorViewModel colorModel)
29 {
30 string hexColor = colorModel.Hex;
31
32 WriteLiteral("\t\t\t\t<span class=\"colorbox-sm\"");
33 BeginWriteAttribute("style", " style=\"", 626, "\"", 661, 2);
34 WriteAttributeValue("", 634, "background-color:", 634, 17, true);
35 WriteAttributeValue(" ", 651, hexColor, 652, 9, false);
36 EndWriteAttribute();
37 BeginWriteAttribute("title", " title=\"", 662, "\"", 679, 1);
38 WriteAttributeValue("", 670, hexColor, 670, 9, false);
39 EndWriteAttribute();
40 WriteLiteral("></span>\r\n");
41 }
42 else
43 {
44 WriteLiteral("\t\t\t\t<span>\r\n");
45 foreach (var field in listValues)
46 {
47 field.Name.Trim()@(isProductDetail && index WriteLiteral("< total - 1 ? \", \" : \"\")\r\n index++;\r\n}\r\n</span>\r\n");
48 WriteLiteral("<!-- <span>\r\n ");
49 Write(string.Join(", ", field.Name.Trim()));
50 WriteLiteral("\r\n</span> -->\r\n");
51 WriteLiteral("\t\t\t\t<!-- <span>");
52 Write(field.Name.ToString().Trim());
53 WriteLiteral("</span>\r\n\r\n\t\t\t\tif (isProductDetail && index < total - 1)\r\n\t\t\t\t{\r\n\t\t\t\t\t<span>, </span>\r\n\t\t\t\t} -->\r\n");
54 }
55 WriteLiteral("\t\t\t<!-- index++; -->\r\n\t\t}\r\n\t}\r\n\telse\r\n\t{\r\n\t\tif (Model.IsLink() && Model.GetLink() is LinkViewModel linkModel)\r\n\t\t{\r\n\t\t\t<span>\r\n\t\t\t\t<a");
56 BeginWriteAttribute("href", " href=\"", 1216, "\"", 1237, 1);
57 WriteAttributeValue("", 1223, linkModel.Url, 1223, 14, false);
58 EndWriteAttribute();
59 WriteLiteral(">");
60 Write(linkModel.Url);
61 WriteLiteral("</a>\r\n\t\t\t</span>\r\n\t\t}\r\n\t\telse if (Model.IsColor() && Model.GetColor() is ColorViewModel colorModel)\r\n\t\t{\r\n\t\t\tstring hexColor = colorModel.Hex;\r\n\r\n\t\t\t<span class=\"colorbox-sm\"");
62 BeginWriteAttribute("style", " style=\"", 1427, "\"", 1462, 2);
63 WriteAttributeValue("", 1435, "background-color:", 1435, 17, true);
64 WriteAttributeValue(" ", 1452, hexColor, 1453, 9, false);
65 EndWriteAttribute();
66 BeginWriteAttribute("title", " title=\"", 1463, "\"", 1480, 1);
67 WriteAttributeValue("", 1471, hexColor, 1471, 9, false);
68 EndWriteAttribute();
69 WriteLiteral("></span>\r\n\t\t}\r\n\t\telse if (Model.IsFile() && Model.GetFile() is FileViewModel fileModel)\r\n\t\t{\r\n\t\t\tvar file = fileModel;\r\n\r\n\t\t\t<a");
70 BeginWriteAttribute("href", " href=\"", 1608, "\"", 1625, 1);
71 WriteAttributeValue("", 1615, file.Path, 1615, 10, false);
72 EndWriteAttribute();
73 WriteLiteral(" download>");
74 Write(file.Name);
75 WriteLiteral(@"</a>
76 }
77 else
78 {
79 var value = hideUnitsOfMeasure ? Model.Value : Model.GetValueWithUnits();
80 value = value.ToString().ToLower() == ""true"" ? Translate(""Yes"") : value;
81 value = value.ToString().ToLower() == ""false"" ? Translate(""No"") : value;
82
83 <span>");
84 Write(value);
85 WriteLiteral("</span>\r\n\t\t}\r\n\t}\r\n}\r\n");
86 }
87 #pragma warning restore 1998
88 }
89 }
90 #pragma warning restore 1591
91
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 foreach (var field in listValues)
13 {
14 var total = listValues.Count;
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 <span>
24 @foreach (var field in listValues)
25 {
26 field.Name.Trim()@(isProductDetail && index < total - 1 ? ", " : "")
27 index++;
28 }
29 </span>
30
31 <!-- <span>
32 @string.Join(", ", field.Name.Trim())
33 </span> -->
34
35 <!-- <span>@field.Name.ToString().Trim()</span>
36
37 if (isProductDetail && index < total - 1)
38 {
39 <span>, </span>
40 } -->
41 }
42 <!-- index++; -->
43 }
44 }
45 else
46 {
47 if (Model.IsLink() && Model.GetLink() is LinkViewModel linkModel)
48 {
49 <span>
50 <a href="@linkModel.Url">@linkModel.Url</a>
51 </span>
52 }
53 else if (Model.IsColor() && Model.GetColor() is ColorViewModel colorModel)
54 {
55 string hexColor = colorModel.Hex;
56
57 <span class="colorbox-sm" style="background-color: @hexColor" title="@hexColor"></span>
58 }
59 else if (Model.IsFile() && Model.GetFile() is FileViewModel fileModel)
60 {
61 var file = fileModel;
62
63 <a href="@file.Path" download>@file.Name</a>
64 }
65 else
66 {
67 var value = hideUnitsOfMeasure ? Model.Value : Model.GetValueWithUnits();
68 value = value.ToString().ToLower() == "true" ? Translate("Yes") : value;
69 value = value.ToString().ToLower() == "false" ? Translate("No") : value;
70
71 <span>@value</span>
72 }
73 }
74 }
75
|
| Ingredient Type |
Error compiling template "Designs/Swift/Components/Specifications/Shared/FieldValue.cshtml"
Line 47: ; expected
Line 47: Keyword, identifier, or string expected after verbatim specifier: @
Line 47: ) expected
Line 47: ; expected
Line 89: } expected
Line 89: } expected
Line 89: } expected
Line 45: A local or parameter named 'field' cannot be declared in this scope because that name is used in an enclosing local scope to define a local or parameter
Line 47: Operator '&&' cannot be applied to operands of type 'bool' and 'int'
Line 57: The name 'linkModel' does not exist in the current context
Line 60: The name 'linkModel' does not exist in the current context
Line 64: The name 'hexColor' does not exist in the current context
Line 67: The name 'hexColor' does not exist in the current context
Line 71: The name 'file' does not exist in the current context
Line 74: The name 'file' does not exist in the current context
Line 84: The name 'value' does not exist in the current context
Line 19: The variable 'hideUnitsOfMeasure' is assigned but its value is never used
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_7dc4ceeccb9c4e15a077a087e1483e61 : 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 foreach (var field in listValues)
26 {
27 var total = listValues.Count;
28 if (field.IsColor() && field.GetColor() is ColorViewModel colorModel)
29 {
30 string hexColor = colorModel.Hex;
31
32 WriteLiteral("\t\t\t\t<span class=\"colorbox-sm\"");
33 BeginWriteAttribute("style", " style=\"", 626, "\"", 661, 2);
34 WriteAttributeValue("", 634, "background-color:", 634, 17, true);
35 WriteAttributeValue(" ", 651, hexColor, 652, 9, false);
36 EndWriteAttribute();
37 BeginWriteAttribute("title", " title=\"", 662, "\"", 679, 1);
38 WriteAttributeValue("", 670, hexColor, 670, 9, false);
39 EndWriteAttribute();
40 WriteLiteral("></span>\r\n");
41 }
42 else
43 {
44 WriteLiteral("\t\t\t\t<span>\r\n");
45 foreach (var field in listValues)
46 {
47 field.Name.Trim()@(isProductDetail && index WriteLiteral("< total - 1 ? \", \" : \"\")\r\n index++;\r\n}\r\n</span>\r\n");
48 WriteLiteral("<!-- <span>\r\n ");
49 Write(string.Join(", ", field.Name.Trim()));
50 WriteLiteral("\r\n</span> -->\r\n");
51 WriteLiteral("\t\t\t\t<!-- <span>");
52 Write(field.Name.ToString().Trim());
53 WriteLiteral("</span>\r\n\r\n\t\t\t\tif (isProductDetail && index < total - 1)\r\n\t\t\t\t{\r\n\t\t\t\t\t<span>, </span>\r\n\t\t\t\t} -->\r\n");
54 }
55 WriteLiteral("\t\t\t<!-- index++; -->\r\n\t\t}\r\n\t}\r\n\telse\r\n\t{\r\n\t\tif (Model.IsLink() && Model.GetLink() is LinkViewModel linkModel)\r\n\t\t{\r\n\t\t\t<span>\r\n\t\t\t\t<a");
56 BeginWriteAttribute("href", " href=\"", 1216, "\"", 1237, 1);
57 WriteAttributeValue("", 1223, linkModel.Url, 1223, 14, false);
58 EndWriteAttribute();
59 WriteLiteral(">");
60 Write(linkModel.Url);
61 WriteLiteral("</a>\r\n\t\t\t</span>\r\n\t\t}\r\n\t\telse if (Model.IsColor() && Model.GetColor() is ColorViewModel colorModel)\r\n\t\t{\r\n\t\t\tstring hexColor = colorModel.Hex;\r\n\r\n\t\t\t<span class=\"colorbox-sm\"");
62 BeginWriteAttribute("style", " style=\"", 1427, "\"", 1462, 2);
63 WriteAttributeValue("", 1435, "background-color:", 1435, 17, true);
64 WriteAttributeValue(" ", 1452, hexColor, 1453, 9, false);
65 EndWriteAttribute();
66 BeginWriteAttribute("title", " title=\"", 1463, "\"", 1480, 1);
67 WriteAttributeValue("", 1471, hexColor, 1471, 9, false);
68 EndWriteAttribute();
69 WriteLiteral("></span>\r\n\t\t}\r\n\t\telse if (Model.IsFile() && Model.GetFile() is FileViewModel fileModel)\r\n\t\t{\r\n\t\t\tvar file = fileModel;\r\n\r\n\t\t\t<a");
70 BeginWriteAttribute("href", " href=\"", 1608, "\"", 1625, 1);
71 WriteAttributeValue("", 1615, file.Path, 1615, 10, false);
72 EndWriteAttribute();
73 WriteLiteral(" download>");
74 Write(file.Name);
75 WriteLiteral(@"</a>
76 }
77 else
78 {
79 var value = hideUnitsOfMeasure ? Model.Value : Model.GetValueWithUnits();
80 value = value.ToString().ToLower() == ""true"" ? Translate(""Yes"") : value;
81 value = value.ToString().ToLower() == ""false"" ? Translate(""No"") : value;
82
83 <span>");
84 Write(value);
85 WriteLiteral("</span>\r\n\t\t}\r\n\t}\r\n}\r\n");
86 }
87 #pragma warning restore 1998
88 }
89 }
90 #pragma warning restore 1591
91
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 foreach (var field in listValues)
13 {
14 var total = listValues.Count;
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 <span>
24 @foreach (var field in listValues)
25 {
26 field.Name.Trim()@(isProductDetail && index < total - 1 ? ", " : "")
27 index++;
28 }
29 </span>
30
31 <!-- <span>
32 @string.Join(", ", field.Name.Trim())
33 </span> -->
34
35 <!-- <span>@field.Name.ToString().Trim()</span>
36
37 if (isProductDetail && index < total - 1)
38 {
39 <span>, </span>
40 } -->
41 }
42 <!-- index++; -->
43 }
44 }
45 else
46 {
47 if (Model.IsLink() && Model.GetLink() is LinkViewModel linkModel)
48 {
49 <span>
50 <a href="@linkModel.Url">@linkModel.Url</a>
51 </span>
52 }
53 else if (Model.IsColor() && Model.GetColor() is ColorViewModel colorModel)
54 {
55 string hexColor = colorModel.Hex;
56
57 <span class="colorbox-sm" style="background-color: @hexColor" title="@hexColor"></span>
58 }
59 else if (Model.IsFile() && Model.GetFile() is FileViewModel fileModel)
60 {
61 var file = fileModel;
62
63 <a href="@file.Path" download>@file.Name</a>
64 }
65 else
66 {
67 var value = hideUnitsOfMeasure ? Model.Value : Model.GetValueWithUnits();
68 value = value.ToString().ToLower() == "true" ? Translate("Yes") : value;
69 value = value.ToString().ToLower() == "false" ? Translate("No") : value;
70
71 <span>@value</span>
72 }
73 }
74 }
75
|
| Alcohol Type |
Error compiling template "Designs/Swift/Components/Specifications/Shared/FieldValue.cshtml"
Line 47: ; expected
Line 47: Keyword, identifier, or string expected after verbatim specifier: @
Line 47: ) expected
Line 47: ; expected
Line 89: } expected
Line 89: } expected
Line 89: } expected
Line 45: A local or parameter named 'field' cannot be declared in this scope because that name is used in an enclosing local scope to define a local or parameter
Line 47: Operator '&&' cannot be applied to operands of type 'bool' and 'int'
Line 57: The name 'linkModel' does not exist in the current context
Line 60: The name 'linkModel' does not exist in the current context
Line 64: The name 'hexColor' does not exist in the current context
Line 67: The name 'hexColor' does not exist in the current context
Line 71: The name 'file' does not exist in the current context
Line 74: The name 'file' does not exist in the current context
Line 84: The name 'value' does not exist in the current context
Line 19: The variable 'hideUnitsOfMeasure' is assigned but its value is never used
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_90b92fe9ffa8420799f4bb65f696ae42 : 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 foreach (var field in listValues)
26 {
27 var total = listValues.Count;
28 if (field.IsColor() && field.GetColor() is ColorViewModel colorModel)
29 {
30 string hexColor = colorModel.Hex;
31
32 WriteLiteral("\t\t\t\t<span class=\"colorbox-sm\"");
33 BeginWriteAttribute("style", " style=\"", 626, "\"", 661, 2);
34 WriteAttributeValue("", 634, "background-color:", 634, 17, true);
35 WriteAttributeValue(" ", 651, hexColor, 652, 9, false);
36 EndWriteAttribute();
37 BeginWriteAttribute("title", " title=\"", 662, "\"", 679, 1);
38 WriteAttributeValue("", 670, hexColor, 670, 9, false);
39 EndWriteAttribute();
40 WriteLiteral("></span>\r\n");
41 }
42 else
43 {
44 WriteLiteral("\t\t\t\t<span>\r\n");
45 foreach (var field in listValues)
46 {
47 field.Name.Trim()@(isProductDetail && index WriteLiteral("< total - 1 ? \", \" : \"\")\r\n index++;\r\n}\r\n</span>\r\n");
48 WriteLiteral("<!-- <span>\r\n ");
49 Write(string.Join(", ", field.Name.Trim()));
50 WriteLiteral("\r\n</span> -->\r\n");
51 WriteLiteral("\t\t\t\t<!-- <span>");
52 Write(field.Name.ToString().Trim());
53 WriteLiteral("</span>\r\n\r\n\t\t\t\tif (isProductDetail && index < total - 1)\r\n\t\t\t\t{\r\n\t\t\t\t\t<span>, </span>\r\n\t\t\t\t} -->\r\n");
54 }
55 WriteLiteral("\t\t\t<!-- index++; -->\r\n\t\t}\r\n\t}\r\n\telse\r\n\t{\r\n\t\tif (Model.IsLink() && Model.GetLink() is LinkViewModel linkModel)\r\n\t\t{\r\n\t\t\t<span>\r\n\t\t\t\t<a");
56 BeginWriteAttribute("href", " href=\"", 1216, "\"", 1237, 1);
57 WriteAttributeValue("", 1223, linkModel.Url, 1223, 14, false);
58 EndWriteAttribute();
59 WriteLiteral(">");
60 Write(linkModel.Url);
61 WriteLiteral("</a>\r\n\t\t\t</span>\r\n\t\t}\r\n\t\telse if (Model.IsColor() && Model.GetColor() is ColorViewModel colorModel)\r\n\t\t{\r\n\t\t\tstring hexColor = colorModel.Hex;\r\n\r\n\t\t\t<span class=\"colorbox-sm\"");
62 BeginWriteAttribute("style", " style=\"", 1427, "\"", 1462, 2);
63 WriteAttributeValue("", 1435, "background-color:", 1435, 17, true);
64 WriteAttributeValue(" ", 1452, hexColor, 1453, 9, false);
65 EndWriteAttribute();
66 BeginWriteAttribute("title", " title=\"", 1463, "\"", 1480, 1);
67 WriteAttributeValue("", 1471, hexColor, 1471, 9, false);
68 EndWriteAttribute();
69 WriteLiteral("></span>\r\n\t\t}\r\n\t\telse if (Model.IsFile() && Model.GetFile() is FileViewModel fileModel)\r\n\t\t{\r\n\t\t\tvar file = fileModel;\r\n\r\n\t\t\t<a");
70 BeginWriteAttribute("href", " href=\"", 1608, "\"", 1625, 1);
71 WriteAttributeValue("", 1615, file.Path, 1615, 10, false);
72 EndWriteAttribute();
73 WriteLiteral(" download>");
74 Write(file.Name);
75 WriteLiteral(@"</a>
76 }
77 else
78 {
79 var value = hideUnitsOfMeasure ? Model.Value : Model.GetValueWithUnits();
80 value = value.ToString().ToLower() == ""true"" ? Translate(""Yes"") : value;
81 value = value.ToString().ToLower() == ""false"" ? Translate(""No"") : value;
82
83 <span>");
84 Write(value);
85 WriteLiteral("</span>\r\n\t\t}\r\n\t}\r\n}\r\n");
86 }
87 #pragma warning restore 1998
88 }
89 }
90 #pragma warning restore 1591
91
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 foreach (var field in listValues)
13 {
14 var total = listValues.Count;
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 <span>
24 @foreach (var field in listValues)
25 {
26 field.Name.Trim()@(isProductDetail && index < total - 1 ? ", " : "")
27 index++;
28 }
29 </span>
30
31 <!-- <span>
32 @string.Join(", ", field.Name.Trim())
33 </span> -->
34
35 <!-- <span>@field.Name.ToString().Trim()</span>
36
37 if (isProductDetail && index < total - 1)
38 {
39 <span>, </span>
40 } -->
41 }
42 <!-- index++; -->
43 }
44 }
45 else
46 {
47 if (Model.IsLink() && Model.GetLink() is LinkViewModel linkModel)
48 {
49 <span>
50 <a href="@linkModel.Url">@linkModel.Url</a>
51 </span>
52 }
53 else if (Model.IsColor() && Model.GetColor() is ColorViewModel colorModel)
54 {
55 string hexColor = colorModel.Hex;
56
57 <span class="colorbox-sm" style="background-color: @hexColor" title="@hexColor"></span>
58 }
59 else if (Model.IsFile() && Model.GetFile() is FileViewModel fileModel)
60 {
61 var file = fileModel;
62
63 <a href="@file.Path" download>@file.Name</a>
64 }
65 else
66 {
67 var value = hideUnitsOfMeasure ? Model.Value : Model.GetValueWithUnits();
68 value = value.ToString().ToLower() == "true" ? Translate("Yes") : value;
69 value = value.ToString().ToLower() == "false" ? Translate("No") : value;
70
71 <span>@value</span>
72 }
73 }
74 }
75
|
| Certification |
Error compiling template "Designs/Swift/Components/Specifications/Shared/FieldValue.cshtml"
Line 47: ; expected
Line 47: Keyword, identifier, or string expected after verbatim specifier: @
Line 47: ) expected
Line 47: ; expected
Line 89: } expected
Line 89: } expected
Line 89: } expected
Line 45: A local or parameter named 'field' cannot be declared in this scope because that name is used in an enclosing local scope to define a local or parameter
Line 47: Operator '&&' cannot be applied to operands of type 'bool' and 'int'
Line 57: The name 'linkModel' does not exist in the current context
Line 60: The name 'linkModel' does not exist in the current context
Line 64: The name 'hexColor' does not exist in the current context
Line 67: The name 'hexColor' does not exist in the current context
Line 71: The name 'file' does not exist in the current context
Line 74: The name 'file' does not exist in the current context
Line 84: The name 'value' does not exist in the current context
Line 19: The variable 'hideUnitsOfMeasure' is assigned but its value is never used
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_2c09dcdb99684f47828823dbb602cbb7 : 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 foreach (var field in listValues)
26 {
27 var total = listValues.Count;
28 if (field.IsColor() && field.GetColor() is ColorViewModel colorModel)
29 {
30 string hexColor = colorModel.Hex;
31
32 WriteLiteral("\t\t\t\t<span class=\"colorbox-sm\"");
33 BeginWriteAttribute("style", " style=\"", 626, "\"", 661, 2);
34 WriteAttributeValue("", 634, "background-color:", 634, 17, true);
35 WriteAttributeValue(" ", 651, hexColor, 652, 9, false);
36 EndWriteAttribute();
37 BeginWriteAttribute("title", " title=\"", 662, "\"", 679, 1);
38 WriteAttributeValue("", 670, hexColor, 670, 9, false);
39 EndWriteAttribute();
40 WriteLiteral("></span>\r\n");
41 }
42 else
43 {
44 WriteLiteral("\t\t\t\t<span>\r\n");
45 foreach (var field in listValues)
46 {
47 field.Name.Trim()@(isProductDetail && index WriteLiteral("< total - 1 ? \", \" : \"\")\r\n index++;\r\n}\r\n</span>\r\n");
48 WriteLiteral("<!-- <span>\r\n ");
49 Write(string.Join(", ", field.Name.Trim()));
50 WriteLiteral("\r\n</span> -->\r\n");
51 WriteLiteral("\t\t\t\t<!-- <span>");
52 Write(field.Name.ToString().Trim());
53 WriteLiteral("</span>\r\n\r\n\t\t\t\tif (isProductDetail && index < total - 1)\r\n\t\t\t\t{\r\n\t\t\t\t\t<span>, </span>\r\n\t\t\t\t} -->\r\n");
54 }
55 WriteLiteral("\t\t\t<!-- index++; -->\r\n\t\t}\r\n\t}\r\n\telse\r\n\t{\r\n\t\tif (Model.IsLink() && Model.GetLink() is LinkViewModel linkModel)\r\n\t\t{\r\n\t\t\t<span>\r\n\t\t\t\t<a");
56 BeginWriteAttribute("href", " href=\"", 1216, "\"", 1237, 1);
57 WriteAttributeValue("", 1223, linkModel.Url, 1223, 14, false);
58 EndWriteAttribute();
59 WriteLiteral(">");
60 Write(linkModel.Url);
61 WriteLiteral("</a>\r\n\t\t\t</span>\r\n\t\t}\r\n\t\telse if (Model.IsColor() && Model.GetColor() is ColorViewModel colorModel)\r\n\t\t{\r\n\t\t\tstring hexColor = colorModel.Hex;\r\n\r\n\t\t\t<span class=\"colorbox-sm\"");
62 BeginWriteAttribute("style", " style=\"", 1427, "\"", 1462, 2);
63 WriteAttributeValue("", 1435, "background-color:", 1435, 17, true);
64 WriteAttributeValue(" ", 1452, hexColor, 1453, 9, false);
65 EndWriteAttribute();
66 BeginWriteAttribute("title", " title=\"", 1463, "\"", 1480, 1);
67 WriteAttributeValue("", 1471, hexColor, 1471, 9, false);
68 EndWriteAttribute();
69 WriteLiteral("></span>\r\n\t\t}\r\n\t\telse if (Model.IsFile() && Model.GetFile() is FileViewModel fileModel)\r\n\t\t{\r\n\t\t\tvar file = fileModel;\r\n\r\n\t\t\t<a");
70 BeginWriteAttribute("href", " href=\"", 1608, "\"", 1625, 1);
71 WriteAttributeValue("", 1615, file.Path, 1615, 10, false);
72 EndWriteAttribute();
73 WriteLiteral(" download>");
74 Write(file.Name);
75 WriteLiteral(@"</a>
76 }
77 else
78 {
79 var value = hideUnitsOfMeasure ? Model.Value : Model.GetValueWithUnits();
80 value = value.ToString().ToLower() == ""true"" ? Translate(""Yes"") : value;
81 value = value.ToString().ToLower() == ""false"" ? Translate(""No"") : value;
82
83 <span>");
84 Write(value);
85 WriteLiteral("</span>\r\n\t\t}\r\n\t}\r\n}\r\n");
86 }
87 #pragma warning restore 1998
88 }
89 }
90 #pragma warning restore 1591
91
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 foreach (var field in listValues)
13 {
14 var total = listValues.Count;
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 <span>
24 @foreach (var field in listValues)
25 {
26 field.Name.Trim()@(isProductDetail && index < total - 1 ? ", " : "")
27 index++;
28 }
29 </span>
30
31 <!-- <span>
32 @string.Join(", ", field.Name.Trim())
33 </span> -->
34
35 <!-- <span>@field.Name.ToString().Trim()</span>
36
37 if (isProductDetail && index < total - 1)
38 {
39 <span>, </span>
40 } -->
41 }
42 <!-- index++; -->
43 }
44 }
45 else
46 {
47 if (Model.IsLink() && Model.GetLink() is LinkViewModel linkModel)
48 {
49 <span>
50 <a href="@linkModel.Url">@linkModel.Url</a>
51 </span>
52 }
53 else if (Model.IsColor() && Model.GetColor() is ColorViewModel colorModel)
54 {
55 string hexColor = colorModel.Hex;
56
57 <span class="colorbox-sm" style="background-color: @hexColor" title="@hexColor"></span>
58 }
59 else if (Model.IsFile() && Model.GetFile() is FileViewModel fileModel)
60 {
61 var file = fileModel;
62
63 <a href="@file.Path" download>@file.Name</a>
64 }
65 else
66 {
67 var value = hideUnitsOfMeasure ? Model.Value : Model.GetValueWithUnits();
68 value = value.ToString().ToLower() == "true" ? Translate("Yes") : value;
69 value = value.ToString().ToLower() == "false" ? Translate("No") : value;
70
71 <span>@value</span>
72 }
73 }
74 }
75
|
| Proof |
Error compiling template "Designs/Swift/Components/Specifications/Shared/FieldValue.cshtml"
Line 47: ; expected
Line 47: Keyword, identifier, or string expected after verbatim specifier: @
Line 47: ) expected
Line 47: ; expected
Line 89: } expected
Line 89: } expected
Line 89: } expected
Line 45: A local or parameter named 'field' cannot be declared in this scope because that name is used in an enclosing local scope to define a local or parameter
Line 47: Operator '&&' cannot be applied to operands of type 'bool' and 'int'
Line 57: The name 'linkModel' does not exist in the current context
Line 60: The name 'linkModel' does not exist in the current context
Line 64: The name 'hexColor' does not exist in the current context
Line 67: The name 'hexColor' does not exist in the current context
Line 71: The name 'file' does not exist in the current context
Line 74: The name 'file' does not exist in the current context
Line 84: The name 'value' does not exist in the current context
Line 19: The variable 'hideUnitsOfMeasure' is assigned but its value is never used
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_8651221e11a244aa8a90d05bbe5c5c47 : 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 foreach (var field in listValues)
26 {
27 var total = listValues.Count;
28 if (field.IsColor() && field.GetColor() is ColorViewModel colorModel)
29 {
30 string hexColor = colorModel.Hex;
31
32 WriteLiteral("\t\t\t\t<span class=\"colorbox-sm\"");
33 BeginWriteAttribute("style", " style=\"", 626, "\"", 661, 2);
34 WriteAttributeValue("", 634, "background-color:", 634, 17, true);
35 WriteAttributeValue(" ", 651, hexColor, 652, 9, false);
36 EndWriteAttribute();
37 BeginWriteAttribute("title", " title=\"", 662, "\"", 679, 1);
38 WriteAttributeValue("", 670, hexColor, 670, 9, false);
39 EndWriteAttribute();
40 WriteLiteral("></span>\r\n");
41 }
42 else
43 {
44 WriteLiteral("\t\t\t\t<span>\r\n");
45 foreach (var field in listValues)
46 {
47 field.Name.Trim()@(isProductDetail && index WriteLiteral("< total - 1 ? \", \" : \"\")\r\n index++;\r\n}\r\n</span>\r\n");
48 WriteLiteral("<!-- <span>\r\n ");
49 Write(string.Join(", ", field.Name.Trim()));
50 WriteLiteral("\r\n</span> -->\r\n");
51 WriteLiteral("\t\t\t\t<!-- <span>");
52 Write(field.Name.ToString().Trim());
53 WriteLiteral("</span>\r\n\r\n\t\t\t\tif (isProductDetail && index < total - 1)\r\n\t\t\t\t{\r\n\t\t\t\t\t<span>, </span>\r\n\t\t\t\t} -->\r\n");
54 }
55 WriteLiteral("\t\t\t<!-- index++; -->\r\n\t\t}\r\n\t}\r\n\telse\r\n\t{\r\n\t\tif (Model.IsLink() && Model.GetLink() is LinkViewModel linkModel)\r\n\t\t{\r\n\t\t\t<span>\r\n\t\t\t\t<a");
56 BeginWriteAttribute("href", " href=\"", 1216, "\"", 1237, 1);
57 WriteAttributeValue("", 1223, linkModel.Url, 1223, 14, false);
58 EndWriteAttribute();
59 WriteLiteral(">");
60 Write(linkModel.Url);
61 WriteLiteral("</a>\r\n\t\t\t</span>\r\n\t\t}\r\n\t\telse if (Model.IsColor() && Model.GetColor() is ColorViewModel colorModel)\r\n\t\t{\r\n\t\t\tstring hexColor = colorModel.Hex;\r\n\r\n\t\t\t<span class=\"colorbox-sm\"");
62 BeginWriteAttribute("style", " style=\"", 1427, "\"", 1462, 2);
63 WriteAttributeValue("", 1435, "background-color:", 1435, 17, true);
64 WriteAttributeValue(" ", 1452, hexColor, 1453, 9, false);
65 EndWriteAttribute();
66 BeginWriteAttribute("title", " title=\"", 1463, "\"", 1480, 1);
67 WriteAttributeValue("", 1471, hexColor, 1471, 9, false);
68 EndWriteAttribute();
69 WriteLiteral("></span>\r\n\t\t}\r\n\t\telse if (Model.IsFile() && Model.GetFile() is FileViewModel fileModel)\r\n\t\t{\r\n\t\t\tvar file = fileModel;\r\n\r\n\t\t\t<a");
70 BeginWriteAttribute("href", " href=\"", 1608, "\"", 1625, 1);
71 WriteAttributeValue("", 1615, file.Path, 1615, 10, false);
72 EndWriteAttribute();
73 WriteLiteral(" download>");
74 Write(file.Name);
75 WriteLiteral(@"</a>
76 }
77 else
78 {
79 var value = hideUnitsOfMeasure ? Model.Value : Model.GetValueWithUnits();
80 value = value.ToString().ToLower() == ""true"" ? Translate(""Yes"") : value;
81 value = value.ToString().ToLower() == ""false"" ? Translate(""No"") : value;
82
83 <span>");
84 Write(value);
85 WriteLiteral("</span>\r\n\t\t}\r\n\t}\r\n}\r\n");
86 }
87 #pragma warning restore 1998
88 }
89 }
90 #pragma warning restore 1591
91
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 foreach (var field in listValues)
13 {
14 var total = listValues.Count;
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 <span>
24 @foreach (var field in listValues)
25 {
26 field.Name.Trim()@(isProductDetail && index < total - 1 ? ", " : "")
27 index++;
28 }
29 </span>
30
31 <!-- <span>
32 @string.Join(", ", field.Name.Trim())
33 </span> -->
34
35 <!-- <span>@field.Name.ToString().Trim()</span>
36
37 if (isProductDetail && index < total - 1)
38 {
39 <span>, </span>
40 } -->
41 }
42 <!-- index++; -->
43 }
44 }
45 else
46 {
47 if (Model.IsLink() && Model.GetLink() is LinkViewModel linkModel)
48 {
49 <span>
50 <a href="@linkModel.Url">@linkModel.Url</a>
51 </span>
52 }
53 else if (Model.IsColor() && Model.GetColor() is ColorViewModel colorModel)
54 {
55 string hexColor = colorModel.Hex;
56
57 <span class="colorbox-sm" style="background-color: @hexColor" title="@hexColor"></span>
58 }
59 else if (Model.IsFile() && Model.GetFile() is FileViewModel fileModel)
60 {
61 var file = fileModel;
62
63 <a href="@file.Path" download>@file.Name</a>
64 }
65 else
66 {
67 var value = hideUnitsOfMeasure ? Model.Value : Model.GetValueWithUnits();
68 value = value.ToString().ToLower() == "true" ? Translate("Yes") : value;
69 value = value.ToString().ToLower() == "false" ? Translate("No") : value;
70
71 <span>@value</span>
72 }
73 }
74 }
75
|
| Catalog Number |
Error compiling template "Designs/Swift/Components/Specifications/Shared/FieldValue.cshtml"
Line 47: ; expected
Line 47: Keyword, identifier, or string expected after verbatim specifier: @
Line 47: ) expected
Line 47: ; expected
Line 89: } expected
Line 89: } expected
Line 89: } expected
Line 45: A local or parameter named 'field' cannot be declared in this scope because that name is used in an enclosing local scope to define a local or parameter
Line 47: Operator '&&' cannot be applied to operands of type 'bool' and 'int'
Line 57: The name 'linkModel' does not exist in the current context
Line 60: The name 'linkModel' does not exist in the current context
Line 64: The name 'hexColor' does not exist in the current context
Line 67: The name 'hexColor' does not exist in the current context
Line 71: The name 'file' does not exist in the current context
Line 74: The name 'file' does not exist in the current context
Line 84: The name 'value' does not exist in the current context
Line 19: The variable 'hideUnitsOfMeasure' is assigned but its value is never used
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_5f7bb111b2dd45f48c6192e0dcda24cf : 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 foreach (var field in listValues)
26 {
27 var total = listValues.Count;
28 if (field.IsColor() && field.GetColor() is ColorViewModel colorModel)
29 {
30 string hexColor = colorModel.Hex;
31
32 WriteLiteral("\t\t\t\t<span class=\"colorbox-sm\"");
33 BeginWriteAttribute("style", " style=\"", 626, "\"", 661, 2);
34 WriteAttributeValue("", 634, "background-color:", 634, 17, true);
35 WriteAttributeValue(" ", 651, hexColor, 652, 9, false);
36 EndWriteAttribute();
37 BeginWriteAttribute("title", " title=\"", 662, "\"", 679, 1);
38 WriteAttributeValue("", 670, hexColor, 670, 9, false);
39 EndWriteAttribute();
40 WriteLiteral("></span>\r\n");
41 }
42 else
43 {
44 WriteLiteral("\t\t\t\t<span>\r\n");
45 foreach (var field in listValues)
46 {
47 field.Name.Trim()@(isProductDetail && index WriteLiteral("< total - 1 ? \", \" : \"\")\r\n index++;\r\n}\r\n</span>\r\n");
48 WriteLiteral("<!-- <span>\r\n ");
49 Write(string.Join(", ", field.Name.Trim()));
50 WriteLiteral("\r\n</span> -->\r\n");
51 WriteLiteral("\t\t\t\t<!-- <span>");
52 Write(field.Name.ToString().Trim());
53 WriteLiteral("</span>\r\n\r\n\t\t\t\tif (isProductDetail && index < total - 1)\r\n\t\t\t\t{\r\n\t\t\t\t\t<span>, </span>\r\n\t\t\t\t} -->\r\n");
54 }
55 WriteLiteral("\t\t\t<!-- index++; -->\r\n\t\t}\r\n\t}\r\n\telse\r\n\t{\r\n\t\tif (Model.IsLink() && Model.GetLink() is LinkViewModel linkModel)\r\n\t\t{\r\n\t\t\t<span>\r\n\t\t\t\t<a");
56 BeginWriteAttribute("href", " href=\"", 1216, "\"", 1237, 1);
57 WriteAttributeValue("", 1223, linkModel.Url, 1223, 14, false);
58 EndWriteAttribute();
59 WriteLiteral(">");
60 Write(linkModel.Url);
61 WriteLiteral("</a>\r\n\t\t\t</span>\r\n\t\t}\r\n\t\telse if (Model.IsColor() && Model.GetColor() is ColorViewModel colorModel)\r\n\t\t{\r\n\t\t\tstring hexColor = colorModel.Hex;\r\n\r\n\t\t\t<span class=\"colorbox-sm\"");
62 BeginWriteAttribute("style", " style=\"", 1427, "\"", 1462, 2);
63 WriteAttributeValue("", 1435, "background-color:", 1435, 17, true);
64 WriteAttributeValue(" ", 1452, hexColor, 1453, 9, false);
65 EndWriteAttribute();
66 BeginWriteAttribute("title", " title=\"", 1463, "\"", 1480, 1);
67 WriteAttributeValue("", 1471, hexColor, 1471, 9, false);
68 EndWriteAttribute();
69 WriteLiteral("></span>\r\n\t\t}\r\n\t\telse if (Model.IsFile() && Model.GetFile() is FileViewModel fileModel)\r\n\t\t{\r\n\t\t\tvar file = fileModel;\r\n\r\n\t\t\t<a");
70 BeginWriteAttribute("href", " href=\"", 1608, "\"", 1625, 1);
71 WriteAttributeValue("", 1615, file.Path, 1615, 10, false);
72 EndWriteAttribute();
73 WriteLiteral(" download>");
74 Write(file.Name);
75 WriteLiteral(@"</a>
76 }
77 else
78 {
79 var value = hideUnitsOfMeasure ? Model.Value : Model.GetValueWithUnits();
80 value = value.ToString().ToLower() == ""true"" ? Translate(""Yes"") : value;
81 value = value.ToString().ToLower() == ""false"" ? Translate(""No"") : value;
82
83 <span>");
84 Write(value);
85 WriteLiteral("</span>\r\n\t\t}\r\n\t}\r\n}\r\n");
86 }
87 #pragma warning restore 1998
88 }
89 }
90 #pragma warning restore 1591
91
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 foreach (var field in listValues)
13 {
14 var total = listValues.Count;
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 <span>
24 @foreach (var field in listValues)
25 {
26 field.Name.Trim()@(isProductDetail && index < total - 1 ? ", " : "")
27 index++;
28 }
29 </span>
30
31 <!-- <span>
32 @string.Join(", ", field.Name.Trim())
33 </span> -->
34
35 <!-- <span>@field.Name.ToString().Trim()</span>
36
37 if (isProductDetail && index < total - 1)
38 {
39 <span>, </span>
40 } -->
41 }
42 <!-- index++; -->
43 }
44 }
45 else
46 {
47 if (Model.IsLink() && Model.GetLink() is LinkViewModel linkModel)
48 {
49 <span>
50 <a href="@linkModel.Url">@linkModel.Url</a>
51 </span>
52 }
53 else if (Model.IsColor() && Model.GetColor() is ColorViewModel colorModel)
54 {
55 string hexColor = colorModel.Hex;
56
57 <span class="colorbox-sm" style="background-color: @hexColor" title="@hexColor"></span>
58 }
59 else if (Model.IsFile() && Model.GetFile() is FileViewModel fileModel)
60 {
61 var file = fileModel;
62
63 <a href="@file.Path" download>@file.Name</a>
64 }
65 else
66 {
67 var value = hideUnitsOfMeasure ? Model.Value : Model.GetValueWithUnits();
68 value = value.ToString().ToLower() == "true" ? Translate("Yes") : value;
69 value = value.ToString().ToLower() == "false" ? Translate("No") : value;
70
71 <span>@value</span>
72 }
73 }
74 }
75
|