Error compiling template "/Designs/Swift-v2/Grid/Page/RowTemplates/Scanvaegt_Row_LanguageSelector.cshtml" Line 10: The type or namespace name 'Core' could not be found (are you missing a using directive or an assembly reference?) Line 11: The type or namespace name 'Core' could not be found (are you missing a using directive or an assembly reference?) Line 12: The type or namespace name 'Core' could not be found (are you missing a using directive or an assembly reference?) Line 13: The type or namespace name 'Core' could not be found (are you missing a using directive or an assembly reference?) Line 25: The type or namespace name 'ImageViewModel' could not be found (are you missing a using directive or an assembly reference?) Line 25: 'ItemViewModel' does not contain a definition for 'GetImage' and no accessible extension method 'GetImage' accepting a first argument of type 'ItemViewModel' could be found (are you missing a using directive or an assembly reference?) Line 31: The type or namespace name 'ClassList' could not be found (are you missing a using directive or an assembly reference?) Line 31: The type or namespace name 'ClassList' could not be found (are you missing a using directive or an assembly reference?) Line 34: The type or namespace name 'ClassList' could not be found (are you missing a using directive or an assembly reference?) Line 34: The type or namespace name 'ClassList' could not be found (are you missing a using directive or an assembly reference?) Line 37: The type or namespace name 'ClassList' could not be found (are you missing a using directive or an assembly reference?) Line 37: The type or namespace name 'ClassList' could not be found (are you missing a using directive or an assembly reference?) Line 40: The type or namespace name 'ClassList' could not be found (are you missing a using directive or an assembly reference?) Line 40: The type or namespace name 'ClassList' could not be found (are you missing a using directive or an assembly reference?) Line 43: The type or namespace name 'ClassList' could not be found (are you missing a using directive or an assembly reference?) Line 43: The type or namespace name 'ClassList' could not be found (are you missing a using directive or an assembly reference?) Line 46: The type or namespace name 'ClassList' could not be found (are you missing a using directive or an assembly reference?) Line 46: The type or namespace name 'ClassList' could not be found (are you missing a using directive or an assembly reference?)
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 Core.Extensions; 11 using Core.ViewModels.Base; 12 using Core.ViewModels.Content; 13 using Core.ViewModels.UI; 14 using Dynamicweb.Content.Styles; 15 using Dynamicweb.Frontend; 16 using Dynamicweb.Rendering; 17 using System.IO; 18 internal class RazorEngine_4ff5bab33550407191c9e1d468869c9e : ViewModelTemplate<GridRowViewModel> 19 { 20 #pragma warning disable 1998 21 public async override global::System.Threading.Tasks.Task ExecuteAsync() 22 { 23 WriteLiteral("\r\n"); 24 25 ImageViewModel image = Model.Item.GetImage("100vw"); 26 27 var heading = Model.Item.GetString("Heading"); 28 var introduction = Model.Item.GetString("Introduction"); 29 30 // Section 31 ClassList sectionClasses = new ClassList("scanvaegt-section scanvaegt-section--countryselector js-section"); 32 33 // Container 34 ClassList containerClasses = new ClassList("container-xl align-items-center justify-content-center"); 35 36 // Row 37 ClassList rowClasses = new ClassList("row"); 38 39 // Col 40 ClassList colClasses = new ClassList("col-12 col-lg-8"); 41 42 // Paragraph row 43 ClassList paragraphRowClasses = new ClassList($"row scanvaegt-paragraph-row"); 44 45 // Text 46 ClassList textClasses = new ClassList("scanvaegt-countryselector__text scanvaegt-text"); 47 textClasses.Add("p-3 p-lg-5"); 48 49 var languages = Model.Item.GetItems("Languages"); 50 WriteLiteral("\r\n<div>\r\n"); 51 if (Model.Item.GetBoolean("ShowLogo")) 52 { 53 WriteLiteral(" <div class=\"position-fixed z-1 w-100 py-4 scanvaegt-section--countryselector-header\" data-dw-colorscheme=\"white\">\r\n <div class=\"container-xl\">\r\n <figure class=\"scanvaegt-logo\">\r\n <span>"); 54 Write(ReadFile("Files/Templates/Designs/Swift-v2/Assets/images/scanvaegt-logo.svg")); 55 WriteLiteral("</span>\r\n </figure>\r\n </div>\r\n </div>\r\n"); 56 } 57 WriteLiteral("\r\n <section"); 58 BeginWriteAttribute("class", " class=\"", 1630, "\"", 1653, 1); 59 WriteAttributeValue("", 1638, sectionClasses, 1638, 15, false); 60 EndWriteAttribute(); 61 BeginWriteAttribute("id", " id=\"", 1654, "\"", 1686, 2); 62 WriteAttributeValue("", 1659, "scanvaegt-section-", 1659, 18, true); 63 WriteAttributeValue("", 1677, Model.Id, 1677, 9, false); 64 EndWriteAttribute(); 65 WriteLiteral(" data-dw-colorscheme=\""); 66 Write(Model.ColorScheme?.Id); 67 WriteLiteral("\">\r\n\r\n <div class=\"position-relative h-100\">\r\n\r\n <div class=\"scanvaegt-countryselector__image scanvaegt-image\">\r\n <img"); 68 BeginWriteAttribute("class", " class=\"", 1884, "\"", 1912, 1); 69 WriteAttributeValue("", 1892, image.ImgTagClasses, 1892, 20, false); 70 EndWriteAttribute(); 71 BeginWriteAttribute("style", " style=\"", 1913, "\"", 1941, 1); 72 WriteAttributeValue("", 1921, image.FocalPointCss, 1921, 20, false); 73 EndWriteAttribute(); 74 BeginWriteAttribute("src", " src=\"", 1942, "\"", 1958, 1); 75 WriteAttributeValue("", 1948, image.Src, 1948, 10, false); 76 EndWriteAttribute(); 77 BeginWriteAttribute("srcset", " srcset=\"", 1959, "\"", 1981, 1); 78 WriteAttributeValue("", 1968, image.SrcSet, 1968, 13, false); 79 EndWriteAttribute(); 80 BeginWriteAttribute("sizes", "\r\n sizes=\"", 1982, "\"", 2024, 1); 81 WriteAttributeValue("", 2012, image.Sizes, 2012, 12, false); 82 EndWriteAttribute(); 83 BeginWriteAttribute("loading", "\r\n loading=\"", 2025, "\"", 2089, 1); 84 WriteAttributeValue("", 2057, image.Loading.ToHtmlAttribute(), 2057, 32, false); 85 EndWriteAttribute(); 86 BeginWriteAttribute("decoding", " decoding=\"", 2090, "\"", 2134, 1); 87 WriteAttributeValue("", 2101, image.Decoding.ToHtmlAttribute(), 2101, 33, false); 88 EndWriteAttribute(); 89 BeginWriteAttribute("alt", "\r\n alt=\"", 2135, "\"", 2173, 1); 90 WriteAttributeValue("", 2163, image.Alt, 2163, 10, false); 91 EndWriteAttribute(); 92 WriteLiteral(">\r\n </div>\r\n\r\n <div"); 93 BeginWriteAttribute("class", " class=\"", 2215, "\"", 2240, 1); 94 WriteAttributeValue("", 2223, containerClasses, 2223, 17, false); 95 EndWriteAttribute(); 96 WriteLiteral(">\r\n\r\n <div"); 97 BeginWriteAttribute("class", " class=\"", 2266, "\"", 2285, 1); 98 WriteAttributeValue("", 2274, colClasses, 2274, 11, false); 99 EndWriteAttribute(); 100 WriteLiteral(">\r\n <div"); 101 BeginWriteAttribute("class", " class=\"", 2313, "\"", 2341, 1); 102 WriteAttributeValue("", 2321, paragraphRowClasses, 2321, 20, false); 103 EndWriteAttribute(); 104 WriteLiteral(">\r\n <div class=\"col-11 mx-auto\">\r\n <div"); 105 BeginWriteAttribute("class", " class=\"", 2431, "\"", 2450, 1); 106 WriteAttributeValue("", 2439, rowClasses, 2439, 11, false); 107 EndWriteAttribute(); 108 WriteLiteral(">\r\n <div"); 109 BeginWriteAttribute("class", " class=\"", 2490, "\"", 2510, 1); 110 WriteAttributeValue("", 2498, textClasses, 2498, 12, false); 111 EndWriteAttribute(); 112 WriteLiteral(" data-dw-colorscheme=\"white\">\r\n"); 113 if (!string.IsNullOrEmpty(heading)) 114 { 115 WriteLiteral(" <h2>"); 116 Write(heading); 117 WriteLiteral("</h2>\r\n"); 118 } 119 if (!string.IsNullOrEmpty(introduction)) 120 { 121 WriteLiteral(" <p class=\"lead mb-4\">"); 122 Write(introduction); 123 WriteLiteral("</p>\r\n"); 124 } 125 WriteLiteral(" <div class=\"row g-3\">\r\n"); 126 foreach (var language in languages) 127 { 128 WriteLiteral(" <div class=\"col-6\">\r\n <a"); 129 BeginWriteAttribute("href", " href=\"", 3285, "\"", 3319, 1); 130 WriteAttributeValue("", 3292, language.GetString("Link"), 3292, 27, false); 131 EndWriteAttribute(); 132 WriteLiteral("\r\n class=\"d-flex gap-3 text-decoration-none scanvaegt-countryselector__link\">\r\n\r\n"); 133 if (!string.IsNullOrEmpty(language.GetString("Flag"))) 134 { 135 WriteLiteral(" <span class=\"icon-3\">\r\n "); 136 Write(ReadFile(language.GetString("Flag"))); 137 WriteLiteral("\r\n </span>\r\n"); 138 } 139 WriteLiteral(" <span>\r\n "); 140 Write(language.GetString("Text")); 141 WriteLiteral("\r\n </span>\r\n </a>\r\n </div>\r\n"); 142 } 143 WriteLiteral(@" </div> 144 </div> 145 </div> 146 </div> 147 </div> 148 </div> 149 150 </div> 151 </div> 152 </section> 153 </div> 154 155 "); 156 } 157 #pragma warning restore 1998 158 } 159 } 160 #pragma warning restore 1591 161
1 @inherits ViewModelTemplate<GridRowViewModel> 2 @using Core.Extensions 3 @using Core.ViewModels.Base 4 @using Core.ViewModels.Content 5 @using Core.ViewModels.UI 6 @using Dynamicweb.Content.Styles 7 @using Dynamicweb.Frontend 8 @using Dynamicweb.Rendering 9 @using System.IO 10 11 @{ 12 ImageViewModel image = Model.Item.GetImage("100vw"); 13 14 var heading = Model.Item.GetString("Heading"); 15 var introduction = Model.Item.GetString("Introduction"); 16 17 // Section 18 ClassList sectionClasses = new ClassList("scanvaegt-section scanvaegt-section--countryselector js-section"); 19 20 // Container 21 ClassList containerClasses = new ClassList("container-xl align-items-center justify-content-center"); 22 23 // Row 24 ClassList rowClasses = new ClassList("row"); 25 26 // Col 27 ClassList colClasses = new ClassList("col-12 col-lg-8"); 28 29 // Paragraph row 30 ClassList paragraphRowClasses = new ClassList($"row scanvaegt-paragraph-row"); 31 32 // Text 33 ClassList textClasses = new ClassList("scanvaegt-countryselector__text scanvaegt-text"); 34 textClasses.Add("p-3 p-lg-5"); 35 36 var languages = Model.Item.GetItems("Languages"); 37 } 38 39 <div> 40 @if (Model.Item.GetBoolean("ShowLogo")) 41 { 42 <div class="position-fixed z-1 w-100 py-4 scanvaegt-section--countryselector-header" data-dw-colorscheme="white"> 43 <div class="container-xl"> 44 <figure class="scanvaegt-logo"> 45 <span>@ReadFile("Files/Templates/Designs/Swift-v2/Assets/images/scanvaegt-logo.svg")</span> 46 </figure> 47 </div> 48 </div> 49 } 50 51 <section class="@sectionClasses" id="scanvaegt-section-@Model.Id" data-dw-colorscheme="@(Model.ColorScheme?.Id)"> 52 53 <div class="position-relative h-100"> 54 55 <div class="scanvaegt-countryselector__image scanvaegt-image"> 56 <img class="@image.ImgTagClasses" style="@image.FocalPointCss" src="@image.Src" srcset="@image.SrcSet" 57 sizes="@image.Sizes" 58 loading="@image.Loading.ToHtmlAttribute()" decoding="@image.Decoding.ToHtmlAttribute()" 59 alt="@image.Alt"> 60 </div> 61 62 <div class="@containerClasses"> 63 64 <div class="@colClasses"> 65 <div class="@paragraphRowClasses"> 66 <div class="col-11 mx-auto"> 67 <div class="@rowClasses"> 68 <div class="@textClasses" data-dw-colorscheme="white"> 69 @if (!string.IsNullOrEmpty(heading)) 70 { 71 <h2>@heading</h2> 72 } 73 @if (!string.IsNullOrEmpty(introduction)) 74 { 75 <p class="lead mb-4">@introduction</p> 76 } 77 <div class="row g-3"> 78 @foreach (var language in languages) 79 { 80 <div class="col-6"> 81 <a href="@language.GetString("Link")" 82 class="d-flex gap-3 text-decoration-none scanvaegt-countryselector__link"> 83 84 @if (!string.IsNullOrEmpty(language.GetString("Flag"))) 85 { 86 <span class="icon-3"> 87 @ReadFile(language.GetString("Flag")) 88 </span> 89 } 90 <span> 91 @language.GetString("Text") 92 </span> 93 </a> 94 </div> 95 } 96 </div> 97 </div> 98 </div> 99 </div> 100 </div> 101 </div> 102 103 </div> 104 </div> 105 </section> 106 </div> 107 108