Error compiling template "Designs/kyner/eCom/Productlist/espresso.cshtml"
Line 56: The name 'jsonSrcGetParameters' does not exist in the current context
Line 82: The name 'jsonSrcGetParameters' does not exist in the current context

1 //------------------------------------------------------------------------------ 2 // <auto-generated> 3 // This code was generated by a tool. 4 // Runtime Version:4.0.30319.42000 5 // 6 // Changes to this file may cause incorrect behavior and will be lost if 7 // the code is regenerated. 8 // </auto-generated> 9 //------------------------------------------------------------------------------ 10 11 namespace CompiledRazorTemplates.Dynamic { 12 using System; 13 using System.Collections.Generic; 14 using System.Linq; 15 16 #line 2 "E:\Dynamicweb.NET\Solutions\kyner-espresso-4\Files\Templates\Designs\kyner\eCom\Productlist\espresso.cshtml" 17 using Co3.Espresso.Website.Services; 18 19 #line default 20 #line hidden 21 22 #line 3 "E:\Dynamicweb.NET\Solutions\kyner-espresso-4\Files\Templates\Designs\kyner\eCom\Productlist\espresso.cshtml" 23 using Co3.Espresso.Website.Models.FrontEnd.Ecommerce; 24 25 #line default 26 #line hidden 27 28 #line 4 "E:\Dynamicweb.NET\Solutions\kyner-espresso-4\Files\Templates\Designs\kyner\eCom\Productlist\espresso.cshtml" 29 using System.Web; 30 31 #line default 32 #line hidden 33 34 35 public class RazorEngine_37f21930b93542dca531ebfc59316453 : Co3.Espresso.Website.TemplateBases.Paragraphs.Module { 36 37 #line hidden 38 39 public RazorEngine_37f21930b93542dca531ebfc59316453() { 40 } 41 42 public override void Execute() { 43 WriteLiteral("\r\n"); 44 45 46 #line 6 "E:\Dynamicweb.NET\Solutions\kyner-espresso-4\Files\Templates\Designs\kyner\eCom\Productlist\espresso.cshtml" 47 48 const string jsonSrc = "/system/data/products"; 49 string handlebarsTemplateName = string.Format( "jsonPublisher-pid{0}", Espresso.Id ); 50 51 52 foreach ( LoopItem parameter in GetLoop( "Query.Parameters" ) ) 53 { 54 if ( !string.IsNullOrEmpty( parameter.GetString( "Parameter.Value" ) ) && !parameter.GetBoolean( "Parameter.IsHandledAsFacet" ) && parameter.GetString( "Parameter.Name" ) != "q" ) 55 { 56 jsonSrcGetParameters.Add( parameter.GetString( "Parameter.Name" ), parameter.GetString( "Parameter.Value" ) ); 57 } 58 } 59 60 61 #line default 62 #line hidden 63 WriteLiteral("\r\n<div"); 64 65 WriteLiteral(" class=\"e-productlist js-e-jsonpublisher\""); 66 67 WriteLiteral(" data-json-src=\""); 68 69 70 #line 19 "E:\Dynamicweb.NET\Solutions\kyner-espresso-4\Files\Templates\Designs\kyner\eCom\Productlist\espresso.cshtml" 71 Write(jsonSrc); 72 73 74 #line default 75 #line hidden 76 WriteLiteral("\""); 77 78 WriteLiteral(" data-json-src-get-params=\""); 79 80 81 #line 19 "E:\Dynamicweb.NET\Solutions\kyner-espresso-4\Files\Templates\Designs\kyner\eCom\Productlist\espresso.cshtml" 82 Write(HttpUtility.HtmlAttributeEncode( JsonService.Instance.ToJson( jsonSrcGetParameters ) )); 83 84 85 #line default 86 #line hidden 87 WriteLiteral("\""); 88 89 WriteLiteral(" data-json-src-prop=\"products\""); 90 91 WriteLiteral(" data-json-template-prop=\"products\""); 92 93 WriteLiteral(" data-target=\".js-e-jsonpublisher-target\""); 94 95 WriteLiteral(" data-template=\".js-e-handlebars-tmpl-"); 96 97 98 #line 19 "E:\Dynamicweb.NET\Solutions\kyner-espresso-4\Files\Templates\Designs\kyner\eCom\Productlist\espresso.cshtml" 99 Write(handlebarsTemplateName); 100101102 #line default 103 #line hidden 104 WriteLiteral("\""); 105106 WriteLiteral(">\r\n\r\n <div"); 107108 WriteLiteral(" class=\"e-productlist-main\""); 109110 WriteLiteral(">\r\n <div"); 111112 WriteLiteral(" class=\"row\""); 113114 WriteLiteral(">\r\n <div"); 115116 WriteLiteral(" class=\"col-12\""); 117118 WriteLiteral(">\r\n <div"); 119120 WriteLiteral(" class=\"js-e-jsonpublisher-target\""); 121122 WriteLiteral(">\r\n\r\n <script"); 123124 WriteAttribute("class", Tuple.Create(" class=\"", 1236), Tuple.Create("\"", 1288) 125 , Tuple.Create(Tuple.Create("", 1244), Tuple.Create("js-e-handlebars-tmpl-", 1244), true) 126127 #line 26 "E:\Dynamicweb.NET\Solutions\kyner-espresso-4\Files\Templates\Designs\kyner\eCom\Productlist\espresso.cshtml" 128 , Tuple.Create(Tuple.Create("", 1265), Tuple.Create<System.Object, System.Int32>(handlebarsTemplateName 129130 #line default 131 #line hidden 132 , 1265), false) 133 ); 134135 WriteLiteral(" type=\"text/x-handlebars-template\""); 136137 WriteLiteral(">\r\n {{#if products}}\r\n <div class=\"row\">\r\n " + 138 " {{#each products}}\r\n <div class=\""); 139140141 #line 30 "E:\Dynamicweb.NET\Solutions\kyner-espresso-4\Files\Templates\Designs\kyner\eCom\Productlist\espresso.cshtml" 142 Write(ProductListService.Instance.GetItemClasses()); 143144145 #line default 146 #line hidden 147 WriteLiteral("\">\r\n {{{listItemHtml}}}\r\n </div>\r\n " + 148 " {{/each}}\r\n </div>\r\n {{else}}\r\n <p c" + 149 "lass=\"my-2\">"); 150151152 #line 36 "E:\Dynamicweb.NET\Solutions\kyner-espresso-4\Files\Templates\Designs\kyner\eCom\Productlist\espresso.cshtml" 153 Write(Translate( "eCom Productlist - No Products - Text", "No products match your choices." )); 154155156 #line default 157 #line hidden 158 WriteLiteral("</p>\r\n {{/if}}\r\n </script>\r\n\r\n </div>\r\n </div>\r\n " + 159 " </div>\r\n </div>\r\n\r\n</div>\r\n\r\n\r\n"); 160161 } 162 } 163 } 164

1 @inherits Co3.Espresso.Website.TemplateBases.Paragraphs.Module 2 @using Co3.Espresso.Website.Services 3 @using Co3.Espresso.Website.Models.FrontEnd.Ecommerce 4 @using System.Web 5 6 @{ 7 const string jsonSrc = "/system/data/products"; 8 string handlebarsTemplateName = string.Format( "jsonPublisher-pid{0}", Espresso.Id ); 9 10 11 foreach ( LoopItem parameter in GetLoop( "Query.Parameters" ) ) 12 { 13 if ( !string.IsNullOrEmpty( parameter.GetString( "Parameter.Value" ) ) && !parameter.GetBoolean( "Parameter.IsHandledAsFacet" ) && parameter.GetString( "Parameter.Name" ) != "q" ) 14 { 15 jsonSrcGetParameters.Add( parameter.GetString( "Parameter.Name" ), parameter.GetString( "Parameter.Value" ) ); 16 } 17 } 18 } 19 <div class="e-productlist js-e-jsonpublisher" data-json-src="@jsonSrc" data-json-src-get-params="@HttpUtility.HtmlAttributeEncode( JsonService.Instance.ToJson( jsonSrcGetParameters ) )" data-json-src-prop="products" data-json-template-prop="products" data-target=".js-e-jsonpublisher-target" data-template=".js-e-handlebars-tmpl-@handlebarsTemplateName"> 20 21 <div class="e-productlist-main"> 22 <div class="row"> 23 <div class="col-12"> 24 <div class="js-e-jsonpublisher-target"> 25 26 <script class="js-e-handlebars-tmpl-@handlebarsTemplateName" type="text/x-handlebars-template"> 27 {{#if products}} 28 <div class="row"> 29 {{#each products}} 30 <div class="@ProductListService.Instance.GetItemClasses()"> 31 {{{listItemHtml}}} 32 </div> 33 {{/each}} 34 </div> 35 {{else}} 36 <p class="my-2">@Translate( "eCom Productlist - No Products - Text", "No products match your choices." )</p> 37 {{/if}} 38 </script> 39 40 </div> 41 </div> 42 </div> 43 </div> 44 45 </div> 46 47 48
keyboard_arrow_up