Rød havetegl

228 x 108 x 54 mm - Med kulbrændt spil 


Pris fra kr.6,79 pr. stk. Gå til produktside
RT 30 Rød havetegl
Sort havetegl med brunt spil

228 x 108 x 54 mm - Med kulbrændt spil 


Pris fra kr.12,59 pr. stk. Gå til produktside
RT 31 Sort havetegl med brunt spil
Rød belægningsklinke med spil

240 x 118 x 52 mm


Pris fra kr.7,83 pr. stk. Gå til produktside
RT 61 Rød belægningsklinke med spil
Sort belægningsklinke

240 x 118 x 52 mm


Pris fra kr.12,35 pr. stk. Gå til produktside
RT 64 Sort belægningsklinke
Gul havetegl med spil

228 x 108 x 54 mm - Med kulbrændt spil 


Pris fra kr.7,70 pr. stk. Gå til produktside
RT 32 Gul havetegl med spil

5 products found Page 1 of 1
Error executing template "/Designs/randers-tegl/Paragraph/rt-2.0.product-action.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
   at CompiledRazorTemplates.Dynamic.RazorEngine_7ec4d585d18c41c1b427a29cdb7973c6.Execute() in D:\dynamicweb.net\Solutions\Gotcha\randerstegl.cloud.dynamicweb-cms.com\files\Templates\Designs\randers-tegl\Paragraph\rt-2.0.product-action.cshtml:line 6
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader)
   at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<RunCompile>b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template)
   at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()

1 @{ 2 string productid = System.Web.HttpContext.Current.Request.QueryString.Get("ProductID"); 3 4 Dynamicweb.Ecommerce.Products.Product p = Dynamicweb.Ecommerce.Services.Products.GetProductById(productid, "", false); 5 6 string productname = p.Name; 7 string productnumber = p.Number; 8 string categoryName = p.Groups[0].Name.ToLower(); 9 } 10 11 @if (!GetString("Item.ExcludeProducts").Contains(productnumber)) { 12 <div class="column-xxs-12 column-md-8 column-xxs-top-1 column-xxs-bottom-1 column-sm-top-0 column-sm-bottom-0" id='@GetString("Item.ActionID")@("-action")'><div class="wrap-inner"> 13 @{ 14 bool islink = false; 15 string link = ""; 16 17 if (GetString("Item.Type") == "link") { 18 islink = true; 19 link = GetString("Item.Link"); 20 bool hasparameter = false; 21 22 if (GetBoolean("Item.IncludeRTNumberInURL")) { 23 link += (GetString("Item.Link").Contains("?") ? "&" : "?"); 24 25 if (!string.IsNullOrWhiteSpace(GetString("Item.URLParameterName"))) { 26 link += GetString("Item.URLParameterName") + "=" + productnumber.Replace(" ",""); 27 } else { 28 link += "ProductID=" + productid; 29 } 30 31 hasparameter = true; 32 } 33 34 if (GetBoolean("Item.IsVisualizationToolLink")) { 35 string brick = p.ProductFieldValues.GetProductFieldValue("VisualizationBrick").Value.ToString(); 36 string groove = p.ProductFieldValues.GetProductFieldValue("VisualizationGroove").Value.ToString(); 37 string linking = p.ProductFieldValues.GetProductFieldValue("VisualizationLinking").Value.ToString(); 38 string paving = p.ProductFieldValues.GetProductFieldValue("VisualizationPaving").Value.ToString(); 39 string roof = p.ProductFieldValues.GetProductFieldValue("VisualizationRoof").Value.ToString(); 40 string house = p.ProductFieldValues.GetProductFieldValue("VisualizationHouse").Value.ToString(); 41 string windows = p.ProductFieldValues.GetProductFieldValue("VisualizationWindows").Value.ToString(); 42 string rnd = p.ProductFieldValues.GetProductFieldValue("VisualizationRnd").Value.ToString(); 43 string viewmode = p.ProductFieldValues.GetProductFieldValue("VisualizationViewmode").Value.ToString(); 44 45 if (categoryName == "mursten") { 46 link += "#brick=" + productnumber.Replace(" ",""); 47 } else if (!string.IsNullOrWhiteSpace(brick)) { 48 link += "#brick=" + brick; 49 } else { 50 link += "#brick=RT522"; 51 } 52 53 if (!string.IsNullOrWhiteSpace(groove)) { 54 link += "&groove=" + groove; 55 } 56 57 if (!string.IsNullOrWhiteSpace(linking)) { 58 link += "&linking=" + linking; 59 } 60 61 if (!string.IsNullOrWhiteSpace(paving)) { 62 link += "&paving=" + paving; 63 } 64 65 if (categoryName == "tagsten") { 66 link += "&roof=" + productnumber.Replace(" ","_"); 67 } else if (!string.IsNullOrWhiteSpace(roof)) { 68 link += "&roof=" + roof; 69 } 70 71 if (!string.IsNullOrWhiteSpace(house)) { 72 link += "&house=" + house; 73 } else if (categoryName == "tagsten") { 74 link += "&house=05"; 75 } 76 77 if (!string.IsNullOrWhiteSpace(windows)) { 78 link += "&windows=" + windows; 79 } 80 81 if (!string.IsNullOrWhiteSpace(rnd)) { 82 link += "&rnd=" + rnd; 83 } 84 85 if (!string.IsNullOrWhiteSpace(viewmode)) { 86 link += "&viewmode=" + viewmode; 87 } else { 88 link += "&viewmode=house"; 89 } 90 } 91 if (GetBoolean("Item.IsTextureToolLink")) { 92 string groove = p.ProductFieldValues.GetProductFieldValue("VisualizationGroove").Value.ToString(); 93 string linking = p.ProductFieldValues.GetProductFieldValue("VisualizationLinking").Value.ToString(); 94 string viewmode = p.ProductFieldValues.GetProductFieldValue("VisualizationViewmode").Value.ToString(); 95 96 if (categoryName == "mursten") { 97 link += "#brick=" + productnumber.Replace(" ",""); 98 } else { 99 link += "#brick=RT522"; 100 } 101 102 if (!string.IsNullOrWhiteSpace(groove)) { 103 link += "&groove=" + groove; 104 } 105 106 if (!string.IsNullOrWhiteSpace(linking)) { 107 link += "&linking=" + linking; 108 } 109 110 if (!string.IsNullOrWhiteSpace(viewmode)) { 111 link += "&viewmode=" + viewmode; 112 } else { 113 link += "&viewmode=wall"; 114 } 115 } 116 } 117 118 string iconClass = GetString("Item.Icon"); 119 iconClass = iconClass.Substring(iconClass.LastIndexOf("/") + 1); 120 iconClass = iconClass.Replace(".svg",""); 121 } 122 @if (GetString("Item.Type") == "inline-form" || GetString("Item.Type") == "custom") { 123 if (GetString("Item.Type") == "inline-form") { 124 <a class="tablet-desktop-link" @if(!string.IsNullOrWhiteSpace(GetString("Item.LinkTitle"))) {<text>title='@GetString("Item.LinkTitle")'</text>} @if (GetBoolean("Item.IsReferenceForm") && p.ProductFieldValues.GetProductFieldValue("ShowNewReferenceTool").Value.ToString() == "False") {<text>href="mailto:@Translate("RT-2.0_Reference_mail_modtager")?subject=@productnumber - @Translate("RT-2.0_Forespørgsel_på_referenceadresse_mail_emne")&body=@Translate("RT-2.0_Forespørgsel_på_referenceadresse_mail_body")"</text>}><span class='icon @iconClass'> 125 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) 126 </span><h2> 127 @GetString("Item.Header").Replace("[RTXXX]",@productnumber) 128 <span>@GetString("Item.Subheader").Replace("[RTXXX]",@productnumber)</span></h2> 129 @if (GetBoolean("Item.IsReferenceForm")) { 130 if (p.ProductFieldValues.GetProductFieldValue("ShowNewReferenceTool").Value.ToString() == "True") { 131 <text>@RenderParagraphContent(GetInteger("Item.FormParagraph"))</text> 132 } else { 133 <span><span class="arrow-link"> 134 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { 135 <span> 136 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 137 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 138 </span> 139 } 140 </span> 141 @Translate("RT-2.0_Spørg_på_referenceadresser") 142 </span> 143 } 144 145 } else { 146 <text>@RenderParagraphContent(GetInteger("Item.FormParagraph"))</text> 147 } 148 </a><a class="mobile-link" 149 150 @if (GetBoolean("Item.IsReferenceForm") && p.ProductFieldValues.GetProductFieldValue("ShowNewReferenceTool").Value.ToString() == "True") {<text>data-target='product-modal-@GetString("Item.Id")'</text>} @if (GetBoolean("Item.IsReferenceForm") && p.ProductFieldValues.GetProductFieldValue("ShowNewReferenceTool").Value.ToString() == "False") {<text>href="mailto:@Translate("RT-2.0_Reference_mail_modtager")?subject=@productnumber - @Translate("RT-2.0_Forespørgsel_på_referenceadresse_mail_emne")&body=@Translate("RT-2.0_Forespørgsel_på_referenceadresse_mail_body")"</text>}><span class='icon @iconClass'> 151 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) 152 </span> 153 @if (GetBoolean("Item.IsReferenceForm")) { 154 if (p.ProductFieldValues.GetProductFieldValue("ShowNewReferenceTool").Value.ToString() == "True") { 155 <h2><span>@GetString("Item.MobileHeader").Replace("[RTXXX]",@productnumber)</span></h2> 156 } else { 157 <h2><span>@Translate("RT-2.0_Spørg_på_referenceadresser")</span></h2> 158 } 159 } else { 160 <h2><span>@GetString("Item.MobileHeader").Replace("[RTXXX]",@productnumber)</span></h2> 161 } 162 </a> 163 @SnippetStart("Modals") 164 <div id='product-modal-@GetString("Item.Id")' class="product-modal modal-light"><div class="column-xxs-22 column-lg-18 column-xl-14 column-xxs-left-1 column-lg-left-3 column-xl-left-5 column-xxs-top-6 column-xxs-bottom-2 column-md-top-2"><div class="wrap-inner"><div class="column-xxs-24"><span class="header"> 165 @GetString("Item.Header").Replace("[RTXXX]",@productnumber) 166 <span>@GetString("Item.Subheader").Replace("[RTXXX]",@productnumber)</span></span></div></div></div><div class="column-xxs-22 column-lg-18 column-xl-14 column-xxs-left-1 column-lg-left-3 column-xl-left-5"> 167 @RenderParagraphContent(GetInteger("Item.FormParagraph")) 168 </div><span class="icon-close"> 169 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))) { 170 <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))</text> 171 } 172 </span></div> 173 @SnippetEnd("Modals") 174 } else { 175 <a class="tablet-desktop-link" @if(!string.IsNullOrWhiteSpace(GetString("Item.LinkTitle"))) {<text>title='@GetString("Item.LinkTitle")'</text>}><span class='icon @iconClass'> 176 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) 177 </span><h2> 178 @GetString("Item.Header").Replace("[RTXXX]",@productnumber) 179 <span>@GetString("Item.Subheader").Replace("[RTXXX]",@productnumber)</span></h2><form action='/Default.aspx?Id=@GetString("Item.PostPage")' method="post" id='dw-form-@GetString("ParagraphID")'><div class="input-wrap"><input type="text" name='@GetString("Item.FieldName")' placeholder='@GetString("Item.FieldPlaceholder")' autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" /><button class="arrow-link"> 180 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { 181 <span> 182 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 183 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 184 </span> 185 } 186 </button></div></form></a><a class="mobile-link" data-target='product-modal-@GetString("Item.Id")'><span class='icon @iconClass'> 187 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) 188 </span><h2><span>@GetString("Item.MobileHeader").Replace("[RTXXX]",@productnumber)</span></h2></a> 189 @SnippetStart("Modals") 190 <div id='product-modal-@GetString("Item.Id")' class="product-modal modal-light"><div class="column-xxs-22 column-lg-18 column-xl-14 column-xxs-left-1 column-lg-left-3 column-xl-left-5 column-xxs-top-6 column-xxs-bottom-2 column-md-top-2"><div class="wrap-inner"><div class="column-xxs-24"><span class="header"> 191 @GetString("Item.Header").Replace("[RTXXX]",@productnumber) 192 <span>@GetString("Item.Subheader").Replace("[RTXXX]",@productnumber)</span></span></div></div></div><div class="column-xxs-22 column-lg-18 column-xl-14 column-xxs-left-1 column-lg-left-3 column-xl-left-5 column-xxs-top-6 column-xxs-bottom-2 column-md-top-2"><form action='/Default.aspx?Id=@GetString("Item.PostPage")' method="post" id='dw-form-@GetString("ParagraphID")'><div class="input-wrap"><input type="text" name='@GetString("Item.FieldName")' placeholder='@GetString("Item.FieldPlaceholder")' autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" /><button class="arrow-link"> 193 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { 194 <span> 195 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 196 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 197 </span> 198 } 199 </button></div></form></div><span class="icon-close"> 200 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))) { 201 <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))</text> 202 } 203 </span></div> 204 @SnippetEnd("Modals") 205 } 206 } else { 207 <a @if(GetString("Item.Type") == "link") {<text>href=@link</text>} 208 @if(!string.IsNullOrWhiteSpace(GetString("Item.LinkTitle"))) {<text>title='@GetString("Item.LinkTitle")'</text>} 209 @if(GetString("Item.Type") == "modal-form") {<text>data-target='modal-@GetString("Item.ModalFormParagraph")'</text>} 210 @(GetString("Item.ActionID") == "samples" ? "data-callback='hubspotLoad'" : null) 211 @if (GetBoolean("Item.IsVisualizationToolLink")) {<text>target="_blank"</text>} 212 @if (!string.IsNullOrWhiteSpace(GetString("Item.OpenTrackingCategory"))) {<text>data-open-tracking-category='@GetString("Item.OpenTrackingCategory")'</text>} 213 @if (!string.IsNullOrWhiteSpace(GetString("Item.OpenTrackingAction"))) {<text>data-open-tracking-action='@GetString("Item.OpenTrackingAction")'</text>}><span class='icon @iconClass'> 214 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) 215 </span><h2> 216 @GetString("Item.Header").Replace("[RTXXX]",@productnumber) 217 <span>@GetString("Item.Subheader").Replace("[RTXXX]",@productnumber)</span></h2><h2><span>@GetString("Item.MobileHeader").Replace("[RTXXX]",@productnumber)</span></h2> 218 @if (GetString("Item.Type") == "link") { 219 <span><span class="arrow-link"> 220 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { 221 <span> 222 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 223 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 224 </span> 225 } 226 </span> 227 @GetString("Item.LinkText") 228 </span> 229 } else if (GetString("Item.Type") == "modal-form") { 230 <span><span class="arrow-link"> 231 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { 232 <span> 233 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 234 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 235 </span> 236 } 237 </span> 238 @GetString("Item.FormLinkText") 239 </span> 240 } 241 </a> 242 } 243 </div></div> 244 } 245
Error executing template "/Designs/randers-tegl/Paragraph/rt-2.0.product-action.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
   at CompiledRazorTemplates.Dynamic.RazorEngine_7ec4d585d18c41c1b427a29cdb7973c6.Execute() in D:\dynamicweb.net\Solutions\Gotcha\randerstegl.cloud.dynamicweb-cms.com\files\Templates\Designs\randers-tegl\Paragraph\rt-2.0.product-action.cshtml:line 6
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader)
   at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<RunCompile>b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template)
   at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()

1 @{ 2 string productid = System.Web.HttpContext.Current.Request.QueryString.Get("ProductID"); 3 4 Dynamicweb.Ecommerce.Products.Product p = Dynamicweb.Ecommerce.Services.Products.GetProductById(productid, "", false); 5 6 string productname = p.Name; 7 string productnumber = p.Number; 8 string categoryName = p.Groups[0].Name.ToLower(); 9 } 10 11 @if (!GetString("Item.ExcludeProducts").Contains(productnumber)) { 12 <div class="column-xxs-12 column-md-8 column-xxs-top-1 column-xxs-bottom-1 column-sm-top-0 column-sm-bottom-0" id='@GetString("Item.ActionID")@("-action")'><div class="wrap-inner"> 13 @{ 14 bool islink = false; 15 string link = ""; 16 17 if (GetString("Item.Type") == "link") { 18 islink = true; 19 link = GetString("Item.Link"); 20 bool hasparameter = false; 21 22 if (GetBoolean("Item.IncludeRTNumberInURL")) { 23 link += (GetString("Item.Link").Contains("?") ? "&" : "?"); 24 25 if (!string.IsNullOrWhiteSpace(GetString("Item.URLParameterName"))) { 26 link += GetString("Item.URLParameterName") + "=" + productnumber.Replace(" ",""); 27 } else { 28 link += "ProductID=" + productid; 29 } 30 31 hasparameter = true; 32 } 33 34 if (GetBoolean("Item.IsVisualizationToolLink")) { 35 string brick = p.ProductFieldValues.GetProductFieldValue("VisualizationBrick").Value.ToString(); 36 string groove = p.ProductFieldValues.GetProductFieldValue("VisualizationGroove").Value.ToString(); 37 string linking = p.ProductFieldValues.GetProductFieldValue("VisualizationLinking").Value.ToString(); 38 string paving = p.ProductFieldValues.GetProductFieldValue("VisualizationPaving").Value.ToString(); 39 string roof = p.ProductFieldValues.GetProductFieldValue("VisualizationRoof").Value.ToString(); 40 string house = p.ProductFieldValues.GetProductFieldValue("VisualizationHouse").Value.ToString(); 41 string windows = p.ProductFieldValues.GetProductFieldValue("VisualizationWindows").Value.ToString(); 42 string rnd = p.ProductFieldValues.GetProductFieldValue("VisualizationRnd").Value.ToString(); 43 string viewmode = p.ProductFieldValues.GetProductFieldValue("VisualizationViewmode").Value.ToString(); 44 45 if (categoryName == "mursten") { 46 link += "#brick=" + productnumber.Replace(" ",""); 47 } else if (!string.IsNullOrWhiteSpace(brick)) { 48 link += "#brick=" + brick; 49 } else { 50 link += "#brick=RT522"; 51 } 52 53 if (!string.IsNullOrWhiteSpace(groove)) { 54 link += "&groove=" + groove; 55 } 56 57 if (!string.IsNullOrWhiteSpace(linking)) { 58 link += "&linking=" + linking; 59 } 60 61 if (!string.IsNullOrWhiteSpace(paving)) { 62 link += "&paving=" + paving; 63 } 64 65 if (categoryName == "tagsten") { 66 link += "&roof=" + productnumber.Replace(" ","_"); 67 } else if (!string.IsNullOrWhiteSpace(roof)) { 68 link += "&roof=" + roof; 69 } 70 71 if (!string.IsNullOrWhiteSpace(house)) { 72 link += "&house=" + house; 73 } else if (categoryName == "tagsten") { 74 link += "&house=05"; 75 } 76 77 if (!string.IsNullOrWhiteSpace(windows)) { 78 link += "&windows=" + windows; 79 } 80 81 if (!string.IsNullOrWhiteSpace(rnd)) { 82 link += "&rnd=" + rnd; 83 } 84 85 if (!string.IsNullOrWhiteSpace(viewmode)) { 86 link += "&viewmode=" + viewmode; 87 } else { 88 link += "&viewmode=house"; 89 } 90 } 91 if (GetBoolean("Item.IsTextureToolLink")) { 92 string groove = p.ProductFieldValues.GetProductFieldValue("VisualizationGroove").Value.ToString(); 93 string linking = p.ProductFieldValues.GetProductFieldValue("VisualizationLinking").Value.ToString(); 94 string viewmode = p.ProductFieldValues.GetProductFieldValue("VisualizationViewmode").Value.ToString(); 95 96 if (categoryName == "mursten") { 97 link += "#brick=" + productnumber.Replace(" ",""); 98 } else { 99 link += "#brick=RT522"; 100 } 101 102 if (!string.IsNullOrWhiteSpace(groove)) { 103 link += "&groove=" + groove; 104 } 105 106 if (!string.IsNullOrWhiteSpace(linking)) { 107 link += "&linking=" + linking; 108 } 109 110 if (!string.IsNullOrWhiteSpace(viewmode)) { 111 link += "&viewmode=" + viewmode; 112 } else { 113 link += "&viewmode=wall"; 114 } 115 } 116 } 117 118 string iconClass = GetString("Item.Icon"); 119 iconClass = iconClass.Substring(iconClass.LastIndexOf("/") + 1); 120 iconClass = iconClass.Replace(".svg",""); 121 } 122 @if (GetString("Item.Type") == "inline-form" || GetString("Item.Type") == "custom") { 123 if (GetString("Item.Type") == "inline-form") { 124 <a class="tablet-desktop-link" @if(!string.IsNullOrWhiteSpace(GetString("Item.LinkTitle"))) {<text>title='@GetString("Item.LinkTitle")'</text>} @if (GetBoolean("Item.IsReferenceForm") && p.ProductFieldValues.GetProductFieldValue("ShowNewReferenceTool").Value.ToString() == "False") {<text>href="mailto:@Translate("RT-2.0_Reference_mail_modtager")?subject=@productnumber - @Translate("RT-2.0_Forespørgsel_på_referenceadresse_mail_emne")&body=@Translate("RT-2.0_Forespørgsel_på_referenceadresse_mail_body")"</text>}><span class='icon @iconClass'> 125 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) 126 </span><h2> 127 @GetString("Item.Header").Replace("[RTXXX]",@productnumber) 128 <span>@GetString("Item.Subheader").Replace("[RTXXX]",@productnumber)</span></h2> 129 @if (GetBoolean("Item.IsReferenceForm")) { 130 if (p.ProductFieldValues.GetProductFieldValue("ShowNewReferenceTool").Value.ToString() == "True") { 131 <text>@RenderParagraphContent(GetInteger("Item.FormParagraph"))</text> 132 } else { 133 <span><span class="arrow-link"> 134 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { 135 <span> 136 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 137 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 138 </span> 139 } 140 </span> 141 @Translate("RT-2.0_Spørg_på_referenceadresser") 142 </span> 143 } 144 145 } else { 146 <text>@RenderParagraphContent(GetInteger("Item.FormParagraph"))</text> 147 } 148 </a><a class="mobile-link" 149 150 @if (GetBoolean("Item.IsReferenceForm") && p.ProductFieldValues.GetProductFieldValue("ShowNewReferenceTool").Value.ToString() == "True") {<text>data-target='product-modal-@GetString("Item.Id")'</text>} @if (GetBoolean("Item.IsReferenceForm") && p.ProductFieldValues.GetProductFieldValue("ShowNewReferenceTool").Value.ToString() == "False") {<text>href="mailto:@Translate("RT-2.0_Reference_mail_modtager")?subject=@productnumber - @Translate("RT-2.0_Forespørgsel_på_referenceadresse_mail_emne")&body=@Translate("RT-2.0_Forespørgsel_på_referenceadresse_mail_body")"</text>}><span class='icon @iconClass'> 151 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) 152 </span> 153 @if (GetBoolean("Item.IsReferenceForm")) { 154 if (p.ProductFieldValues.GetProductFieldValue("ShowNewReferenceTool").Value.ToString() == "True") { 155 <h2><span>@GetString("Item.MobileHeader").Replace("[RTXXX]",@productnumber)</span></h2> 156 } else { 157 <h2><span>@Translate("RT-2.0_Spørg_på_referenceadresser")</span></h2> 158 } 159 } else { 160 <h2><span>@GetString("Item.MobileHeader").Replace("[RTXXX]",@productnumber)</span></h2> 161 } 162 </a> 163 @SnippetStart("Modals") 164 <div id='product-modal-@GetString("Item.Id")' class="product-modal modal-light"><div class="column-xxs-22 column-lg-18 column-xl-14 column-xxs-left-1 column-lg-left-3 column-xl-left-5 column-xxs-top-6 column-xxs-bottom-2 column-md-top-2"><div class="wrap-inner"><div class="column-xxs-24"><span class="header"> 165 @GetString("Item.Header").Replace("[RTXXX]",@productnumber) 166 <span>@GetString("Item.Subheader").Replace("[RTXXX]",@productnumber)</span></span></div></div></div><div class="column-xxs-22 column-lg-18 column-xl-14 column-xxs-left-1 column-lg-left-3 column-xl-left-5"> 167 @RenderParagraphContent(GetInteger("Item.FormParagraph")) 168 </div><span class="icon-close"> 169 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))) { 170 <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))</text> 171 } 172 </span></div> 173 @SnippetEnd("Modals") 174 } else { 175 <a class="tablet-desktop-link" @if(!string.IsNullOrWhiteSpace(GetString("Item.LinkTitle"))) {<text>title='@GetString("Item.LinkTitle")'</text>}><span class='icon @iconClass'> 176 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) 177 </span><h2> 178 @GetString("Item.Header").Replace("[RTXXX]",@productnumber) 179 <span>@GetString("Item.Subheader").Replace("[RTXXX]",@productnumber)</span></h2><form action='/Default.aspx?Id=@GetString("Item.PostPage")' method="post" id='dw-form-@GetString("ParagraphID")'><div class="input-wrap"><input type="text" name='@GetString("Item.FieldName")' placeholder='@GetString("Item.FieldPlaceholder")' autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" /><button class="arrow-link"> 180 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { 181 <span> 182 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 183 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 184 </span> 185 } 186 </button></div></form></a><a class="mobile-link" data-target='product-modal-@GetString("Item.Id")'><span class='icon @iconClass'> 187 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) 188 </span><h2><span>@GetString("Item.MobileHeader").Replace("[RTXXX]",@productnumber)</span></h2></a> 189 @SnippetStart("Modals") 190 <div id='product-modal-@GetString("Item.Id")' class="product-modal modal-light"><div class="column-xxs-22 column-lg-18 column-xl-14 column-xxs-left-1 column-lg-left-3 column-xl-left-5 column-xxs-top-6 column-xxs-bottom-2 column-md-top-2"><div class="wrap-inner"><div class="column-xxs-24"><span class="header"> 191 @GetString("Item.Header").Replace("[RTXXX]",@productnumber) 192 <span>@GetString("Item.Subheader").Replace("[RTXXX]",@productnumber)</span></span></div></div></div><div class="column-xxs-22 column-lg-18 column-xl-14 column-xxs-left-1 column-lg-left-3 column-xl-left-5 column-xxs-top-6 column-xxs-bottom-2 column-md-top-2"><form action='/Default.aspx?Id=@GetString("Item.PostPage")' method="post" id='dw-form-@GetString("ParagraphID")'><div class="input-wrap"><input type="text" name='@GetString("Item.FieldName")' placeholder='@GetString("Item.FieldPlaceholder")' autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" /><button class="arrow-link"> 193 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { 194 <span> 195 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 196 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 197 </span> 198 } 199 </button></div></form></div><span class="icon-close"> 200 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))) { 201 <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))</text> 202 } 203 </span></div> 204 @SnippetEnd("Modals") 205 } 206 } else { 207 <a @if(GetString("Item.Type") == "link") {<text>href=@link</text>} 208 @if(!string.IsNullOrWhiteSpace(GetString("Item.LinkTitle"))) {<text>title='@GetString("Item.LinkTitle")'</text>} 209 @if(GetString("Item.Type") == "modal-form") {<text>data-target='modal-@GetString("Item.ModalFormParagraph")'</text>} 210 @(GetString("Item.ActionID") == "samples" ? "data-callback='hubspotLoad'" : null) 211 @if (GetBoolean("Item.IsVisualizationToolLink")) {<text>target="_blank"</text>} 212 @if (!string.IsNullOrWhiteSpace(GetString("Item.OpenTrackingCategory"))) {<text>data-open-tracking-category='@GetString("Item.OpenTrackingCategory")'</text>} 213 @if (!string.IsNullOrWhiteSpace(GetString("Item.OpenTrackingAction"))) {<text>data-open-tracking-action='@GetString("Item.OpenTrackingAction")'</text>}><span class='icon @iconClass'> 214 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) 215 </span><h2> 216 @GetString("Item.Header").Replace("[RTXXX]",@productnumber) 217 <span>@GetString("Item.Subheader").Replace("[RTXXX]",@productnumber)</span></h2><h2><span>@GetString("Item.MobileHeader").Replace("[RTXXX]",@productnumber)</span></h2> 218 @if (GetString("Item.Type") == "link") { 219 <span><span class="arrow-link"> 220 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { 221 <span> 222 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 223 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 224 </span> 225 } 226 </span> 227 @GetString("Item.LinkText") 228 </span> 229 } else if (GetString("Item.Type") == "modal-form") { 230 <span><span class="arrow-link"> 231 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { 232 <span> 233 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 234 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 235 </span> 236 } 237 </span> 238 @GetString("Item.FormLinkText") 239 </span> 240 } 241 </a> 242 } 243 </div></div> 244 } 245
Error executing template "/Designs/randers-tegl/Paragraph/rt-2.0.product-action.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
   at CompiledRazorTemplates.Dynamic.RazorEngine_7ec4d585d18c41c1b427a29cdb7973c6.Execute() in D:\dynamicweb.net\Solutions\Gotcha\randerstegl.cloud.dynamicweb-cms.com\files\Templates\Designs\randers-tegl\Paragraph\rt-2.0.product-action.cshtml:line 6
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader)
   at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<RunCompile>b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template)
   at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()

1 @{ 2 string productid = System.Web.HttpContext.Current.Request.QueryString.Get("ProductID"); 3 4 Dynamicweb.Ecommerce.Products.Product p = Dynamicweb.Ecommerce.Services.Products.GetProductById(productid, "", false); 5 6 string productname = p.Name; 7 string productnumber = p.Number; 8 string categoryName = p.Groups[0].Name.ToLower(); 9 } 10 11 @if (!GetString("Item.ExcludeProducts").Contains(productnumber)) { 12 <div class="column-xxs-12 column-md-8 column-xxs-top-1 column-xxs-bottom-1 column-sm-top-0 column-sm-bottom-0" id='@GetString("Item.ActionID")@("-action")'><div class="wrap-inner"> 13 @{ 14 bool islink = false; 15 string link = ""; 16 17 if (GetString("Item.Type") == "link") { 18 islink = true; 19 link = GetString("Item.Link"); 20 bool hasparameter = false; 21 22 if (GetBoolean("Item.IncludeRTNumberInURL")) { 23 link += (GetString("Item.Link").Contains("?") ? "&" : "?"); 24 25 if (!string.IsNullOrWhiteSpace(GetString("Item.URLParameterName"))) { 26 link += GetString("Item.URLParameterName") + "=" + productnumber.Replace(" ",""); 27 } else { 28 link += "ProductID=" + productid; 29 } 30 31 hasparameter = true; 32 } 33 34 if (GetBoolean("Item.IsVisualizationToolLink")) { 35 string brick = p.ProductFieldValues.GetProductFieldValue("VisualizationBrick").Value.ToString(); 36 string groove = p.ProductFieldValues.GetProductFieldValue("VisualizationGroove").Value.ToString(); 37 string linking = p.ProductFieldValues.GetProductFieldValue("VisualizationLinking").Value.ToString(); 38 string paving = p.ProductFieldValues.GetProductFieldValue("VisualizationPaving").Value.ToString(); 39 string roof = p.ProductFieldValues.GetProductFieldValue("VisualizationRoof").Value.ToString(); 40 string house = p.ProductFieldValues.GetProductFieldValue("VisualizationHouse").Value.ToString(); 41 string windows = p.ProductFieldValues.GetProductFieldValue("VisualizationWindows").Value.ToString(); 42 string rnd = p.ProductFieldValues.GetProductFieldValue("VisualizationRnd").Value.ToString(); 43 string viewmode = p.ProductFieldValues.GetProductFieldValue("VisualizationViewmode").Value.ToString(); 44 45 if (categoryName == "mursten") { 46 link += "#brick=" + productnumber.Replace(" ",""); 47 } else if (!string.IsNullOrWhiteSpace(brick)) { 48 link += "#brick=" + brick; 49 } else { 50 link += "#brick=RT522"; 51 } 52 53 if (!string.IsNullOrWhiteSpace(groove)) { 54 link += "&groove=" + groove; 55 } 56 57 if (!string.IsNullOrWhiteSpace(linking)) { 58 link += "&linking=" + linking; 59 } 60 61 if (!string.IsNullOrWhiteSpace(paving)) { 62 link += "&paving=" + paving; 63 } 64 65 if (categoryName == "tagsten") { 66 link += "&roof=" + productnumber.Replace(" ","_"); 67 } else if (!string.IsNullOrWhiteSpace(roof)) { 68 link += "&roof=" + roof; 69 } 70 71 if (!string.IsNullOrWhiteSpace(house)) { 72 link += "&house=" + house; 73 } else if (categoryName == "tagsten") { 74 link += "&house=05"; 75 } 76 77 if (!string.IsNullOrWhiteSpace(windows)) { 78 link += "&windows=" + windows; 79 } 80 81 if (!string.IsNullOrWhiteSpace(rnd)) { 82 link += "&rnd=" + rnd; 83 } 84 85 if (!string.IsNullOrWhiteSpace(viewmode)) { 86 link += "&viewmode=" + viewmode; 87 } else { 88 link += "&viewmode=house"; 89 } 90 } 91 if (GetBoolean("Item.IsTextureToolLink")) { 92 string groove = p.ProductFieldValues.GetProductFieldValue("VisualizationGroove").Value.ToString(); 93 string linking = p.ProductFieldValues.GetProductFieldValue("VisualizationLinking").Value.ToString(); 94 string viewmode = p.ProductFieldValues.GetProductFieldValue("VisualizationViewmode").Value.ToString(); 95 96 if (categoryName == "mursten") { 97 link += "#brick=" + productnumber.Replace(" ",""); 98 } else { 99 link += "#brick=RT522"; 100 } 101 102 if (!string.IsNullOrWhiteSpace(groove)) { 103 link += "&groove=" + groove; 104 } 105 106 if (!string.IsNullOrWhiteSpace(linking)) { 107 link += "&linking=" + linking; 108 } 109 110 if (!string.IsNullOrWhiteSpace(viewmode)) { 111 link += "&viewmode=" + viewmode; 112 } else { 113 link += "&viewmode=wall"; 114 } 115 } 116 } 117 118 string iconClass = GetString("Item.Icon"); 119 iconClass = iconClass.Substring(iconClass.LastIndexOf("/") + 1); 120 iconClass = iconClass.Replace(".svg",""); 121 } 122 @if (GetString("Item.Type") == "inline-form" || GetString("Item.Type") == "custom") { 123 if (GetString("Item.Type") == "inline-form") { 124 <a class="tablet-desktop-link" @if(!string.IsNullOrWhiteSpace(GetString("Item.LinkTitle"))) {<text>title='@GetString("Item.LinkTitle")'</text>} @if (GetBoolean("Item.IsReferenceForm") && p.ProductFieldValues.GetProductFieldValue("ShowNewReferenceTool").Value.ToString() == "False") {<text>href="mailto:@Translate("RT-2.0_Reference_mail_modtager")?subject=@productnumber - @Translate("RT-2.0_Forespørgsel_på_referenceadresse_mail_emne")&body=@Translate("RT-2.0_Forespørgsel_på_referenceadresse_mail_body")"</text>}><span class='icon @iconClass'> 125 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) 126 </span><h2> 127 @GetString("Item.Header").Replace("[RTXXX]",@productnumber) 128 <span>@GetString("Item.Subheader").Replace("[RTXXX]",@productnumber)</span></h2> 129 @if (GetBoolean("Item.IsReferenceForm")) { 130 if (p.ProductFieldValues.GetProductFieldValue("ShowNewReferenceTool").Value.ToString() == "True") { 131 <text>@RenderParagraphContent(GetInteger("Item.FormParagraph"))</text> 132 } else { 133 <span><span class="arrow-link"> 134 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { 135 <span> 136 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 137 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 138 </span> 139 } 140 </span> 141 @Translate("RT-2.0_Spørg_på_referenceadresser") 142 </span> 143 } 144 145 } else { 146 <text>@RenderParagraphContent(GetInteger("Item.FormParagraph"))</text> 147 } 148 </a><a class="mobile-link" 149 150 @if (GetBoolean("Item.IsReferenceForm") && p.ProductFieldValues.GetProductFieldValue("ShowNewReferenceTool").Value.ToString() == "True") {<text>data-target='product-modal-@GetString("Item.Id")'</text>} @if (GetBoolean("Item.IsReferenceForm") && p.ProductFieldValues.GetProductFieldValue("ShowNewReferenceTool").Value.ToString() == "False") {<text>href="mailto:@Translate("RT-2.0_Reference_mail_modtager")?subject=@productnumber - @Translate("RT-2.0_Forespørgsel_på_referenceadresse_mail_emne")&body=@Translate("RT-2.0_Forespørgsel_på_referenceadresse_mail_body")"</text>}><span class='icon @iconClass'> 151 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) 152 </span> 153 @if (GetBoolean("Item.IsReferenceForm")) { 154 if (p.ProductFieldValues.GetProductFieldValue("ShowNewReferenceTool").Value.ToString() == "True") { 155 <h2><span>@GetString("Item.MobileHeader").Replace("[RTXXX]",@productnumber)</span></h2> 156 } else { 157 <h2><span>@Translate("RT-2.0_Spørg_på_referenceadresser")</span></h2> 158 } 159 } else { 160 <h2><span>@GetString("Item.MobileHeader").Replace("[RTXXX]",@productnumber)</span></h2> 161 } 162 </a> 163 @SnippetStart("Modals") 164 <div id='product-modal-@GetString("Item.Id")' class="product-modal modal-light"><div class="column-xxs-22 column-lg-18 column-xl-14 column-xxs-left-1 column-lg-left-3 column-xl-left-5 column-xxs-top-6 column-xxs-bottom-2 column-md-top-2"><div class="wrap-inner"><div class="column-xxs-24"><span class="header"> 165 @GetString("Item.Header").Replace("[RTXXX]",@productnumber) 166 <span>@GetString("Item.Subheader").Replace("[RTXXX]",@productnumber)</span></span></div></div></div><div class="column-xxs-22 column-lg-18 column-xl-14 column-xxs-left-1 column-lg-left-3 column-xl-left-5"> 167 @RenderParagraphContent(GetInteger("Item.FormParagraph")) 168 </div><span class="icon-close"> 169 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))) { 170 <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))</text> 171 } 172 </span></div> 173 @SnippetEnd("Modals") 174 } else { 175 <a class="tablet-desktop-link" @if(!string.IsNullOrWhiteSpace(GetString("Item.LinkTitle"))) {<text>title='@GetString("Item.LinkTitle")'</text>}><span class='icon @iconClass'> 176 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) 177 </span><h2> 178 @GetString("Item.Header").Replace("[RTXXX]",@productnumber) 179 <span>@GetString("Item.Subheader").Replace("[RTXXX]",@productnumber)</span></h2><form action='/Default.aspx?Id=@GetString("Item.PostPage")' method="post" id='dw-form-@GetString("ParagraphID")'><div class="input-wrap"><input type="text" name='@GetString("Item.FieldName")' placeholder='@GetString("Item.FieldPlaceholder")' autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" /><button class="arrow-link"> 180 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { 181 <span> 182 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 183 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 184 </span> 185 } 186 </button></div></form></a><a class="mobile-link" data-target='product-modal-@GetString("Item.Id")'><span class='icon @iconClass'> 187 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) 188 </span><h2><span>@GetString("Item.MobileHeader").Replace("[RTXXX]",@productnumber)</span></h2></a> 189 @SnippetStart("Modals") 190 <div id='product-modal-@GetString("Item.Id")' class="product-modal modal-light"><div class="column-xxs-22 column-lg-18 column-xl-14 column-xxs-left-1 column-lg-left-3 column-xl-left-5 column-xxs-top-6 column-xxs-bottom-2 column-md-top-2"><div class="wrap-inner"><div class="column-xxs-24"><span class="header"> 191 @GetString("Item.Header").Replace("[RTXXX]",@productnumber) 192 <span>@GetString("Item.Subheader").Replace("[RTXXX]",@productnumber)</span></span></div></div></div><div class="column-xxs-22 column-lg-18 column-xl-14 column-xxs-left-1 column-lg-left-3 column-xl-left-5 column-xxs-top-6 column-xxs-bottom-2 column-md-top-2"><form action='/Default.aspx?Id=@GetString("Item.PostPage")' method="post" id='dw-form-@GetString("ParagraphID")'><div class="input-wrap"><input type="text" name='@GetString("Item.FieldName")' placeholder='@GetString("Item.FieldPlaceholder")' autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" /><button class="arrow-link"> 193 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { 194 <span> 195 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 196 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 197 </span> 198 } 199 </button></div></form></div><span class="icon-close"> 200 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))) { 201 <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))</text> 202 } 203 </span></div> 204 @SnippetEnd("Modals") 205 } 206 } else { 207 <a @if(GetString("Item.Type") == "link") {<text>href=@link</text>} 208 @if(!string.IsNullOrWhiteSpace(GetString("Item.LinkTitle"))) {<text>title='@GetString("Item.LinkTitle")'</text>} 209 @if(GetString("Item.Type") == "modal-form") {<text>data-target='modal-@GetString("Item.ModalFormParagraph")'</text>} 210 @(GetString("Item.ActionID") == "samples" ? "data-callback='hubspotLoad'" : null) 211 @if (GetBoolean("Item.IsVisualizationToolLink")) {<text>target="_blank"</text>} 212 @if (!string.IsNullOrWhiteSpace(GetString("Item.OpenTrackingCategory"))) {<text>data-open-tracking-category='@GetString("Item.OpenTrackingCategory")'</text>} 213 @if (!string.IsNullOrWhiteSpace(GetString("Item.OpenTrackingAction"))) {<text>data-open-tracking-action='@GetString("Item.OpenTrackingAction")'</text>}><span class='icon @iconClass'> 214 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) 215 </span><h2> 216 @GetString("Item.Header").Replace("[RTXXX]",@productnumber) 217 <span>@GetString("Item.Subheader").Replace("[RTXXX]",@productnumber)</span></h2><h2><span>@GetString("Item.MobileHeader").Replace("[RTXXX]",@productnumber)</span></h2> 218 @if (GetString("Item.Type") == "link") { 219 <span><span class="arrow-link"> 220 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { 221 <span> 222 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 223 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 224 </span> 225 } 226 </span> 227 @GetString("Item.LinkText") 228 </span> 229 } else if (GetString("Item.Type") == "modal-form") { 230 <span><span class="arrow-link"> 231 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { 232 <span> 233 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 234 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 235 </span> 236 } 237 </span> 238 @GetString("Item.FormLinkText") 239 </span> 240 } 241 </a> 242 } 243 </div></div> 244 } 245
Error executing template "/Designs/randers-tegl/Paragraph/rt-2.0.product-action.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
   at CompiledRazorTemplates.Dynamic.RazorEngine_7ec4d585d18c41c1b427a29cdb7973c6.Execute() in D:\dynamicweb.net\Solutions\Gotcha\randerstegl.cloud.dynamicweb-cms.com\files\Templates\Designs\randers-tegl\Paragraph\rt-2.0.product-action.cshtml:line 6
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader)
   at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<RunCompile>b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template)
   at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()

1 @{ 2 string productid = System.Web.HttpContext.Current.Request.QueryString.Get("ProductID"); 3 4 Dynamicweb.Ecommerce.Products.Product p = Dynamicweb.Ecommerce.Services.Products.GetProductById(productid, "", false); 5 6 string productname = p.Name; 7 string productnumber = p.Number; 8 string categoryName = p.Groups[0].Name.ToLower(); 9 } 10 11 @if (!GetString("Item.ExcludeProducts").Contains(productnumber)) { 12 <div class="column-xxs-12 column-md-8 column-xxs-top-1 column-xxs-bottom-1 column-sm-top-0 column-sm-bottom-0" id='@GetString("Item.ActionID")@("-action")'><div class="wrap-inner"> 13 @{ 14 bool islink = false; 15 string link = ""; 16 17 if (GetString("Item.Type") == "link") { 18 islink = true; 19 link = GetString("Item.Link"); 20 bool hasparameter = false; 21 22 if (GetBoolean("Item.IncludeRTNumberInURL")) { 23 link += (GetString("Item.Link").Contains("?") ? "&" : "?"); 24 25 if (!string.IsNullOrWhiteSpace(GetString("Item.URLParameterName"))) { 26 link += GetString("Item.URLParameterName") + "=" + productnumber.Replace(" ",""); 27 } else { 28 link += "ProductID=" + productid; 29 } 30 31 hasparameter = true; 32 } 33 34 if (GetBoolean("Item.IsVisualizationToolLink")) { 35 string brick = p.ProductFieldValues.GetProductFieldValue("VisualizationBrick").Value.ToString(); 36 string groove = p.ProductFieldValues.GetProductFieldValue("VisualizationGroove").Value.ToString(); 37 string linking = p.ProductFieldValues.GetProductFieldValue("VisualizationLinking").Value.ToString(); 38 string paving = p.ProductFieldValues.GetProductFieldValue("VisualizationPaving").Value.ToString(); 39 string roof = p.ProductFieldValues.GetProductFieldValue("VisualizationRoof").Value.ToString(); 40 string house = p.ProductFieldValues.GetProductFieldValue("VisualizationHouse").Value.ToString(); 41 string windows = p.ProductFieldValues.GetProductFieldValue("VisualizationWindows").Value.ToString(); 42 string rnd = p.ProductFieldValues.GetProductFieldValue("VisualizationRnd").Value.ToString(); 43 string viewmode = p.ProductFieldValues.GetProductFieldValue("VisualizationViewmode").Value.ToString(); 44 45 if (categoryName == "mursten") { 46 link += "#brick=" + productnumber.Replace(" ",""); 47 } else if (!string.IsNullOrWhiteSpace(brick)) { 48 link += "#brick=" + brick; 49 } else { 50 link += "#brick=RT522"; 51 } 52 53 if (!string.IsNullOrWhiteSpace(groove)) { 54 link += "&groove=" + groove; 55 } 56 57 if (!string.IsNullOrWhiteSpace(linking)) { 58 link += "&linking=" + linking; 59 } 60 61 if (!string.IsNullOrWhiteSpace(paving)) { 62 link += "&paving=" + paving; 63 } 64 65 if (categoryName == "tagsten") { 66 link += "&roof=" + productnumber.Replace(" ","_"); 67 } else if (!string.IsNullOrWhiteSpace(roof)) { 68 link += "&roof=" + roof; 69 } 70 71 if (!string.IsNullOrWhiteSpace(house)) { 72 link += "&house=" + house; 73 } else if (categoryName == "tagsten") { 74 link += "&house=05"; 75 } 76 77 if (!string.IsNullOrWhiteSpace(windows)) { 78 link += "&windows=" + windows; 79 } 80 81 if (!string.IsNullOrWhiteSpace(rnd)) { 82 link += "&rnd=" + rnd; 83 } 84 85 if (!string.IsNullOrWhiteSpace(viewmode)) { 86 link += "&viewmode=" + viewmode; 87 } else { 88 link += "&viewmode=house"; 89 } 90 } 91 if (GetBoolean("Item.IsTextureToolLink")) { 92 string groove = p.ProductFieldValues.GetProductFieldValue("VisualizationGroove").Value.ToString(); 93 string linking = p.ProductFieldValues.GetProductFieldValue("VisualizationLinking").Value.ToString(); 94 string viewmode = p.ProductFieldValues.GetProductFieldValue("VisualizationViewmode").Value.ToString(); 95 96 if (categoryName == "mursten") { 97 link += "#brick=" + productnumber.Replace(" ",""); 98 } else { 99 link += "#brick=RT522"; 100 } 101 102 if (!string.IsNullOrWhiteSpace(groove)) { 103 link += "&groove=" + groove; 104 } 105 106 if (!string.IsNullOrWhiteSpace(linking)) { 107 link += "&linking=" + linking; 108 } 109 110 if (!string.IsNullOrWhiteSpace(viewmode)) { 111 link += "&viewmode=" + viewmode; 112 } else { 113 link += "&viewmode=wall"; 114 } 115 } 116 } 117 118 string iconClass = GetString("Item.Icon"); 119 iconClass = iconClass.Substring(iconClass.LastIndexOf("/") + 1); 120 iconClass = iconClass.Replace(".svg",""); 121 } 122 @if (GetString("Item.Type") == "inline-form" || GetString("Item.Type") == "custom") { 123 if (GetString("Item.Type") == "inline-form") { 124 <a class="tablet-desktop-link" @if(!string.IsNullOrWhiteSpace(GetString("Item.LinkTitle"))) {<text>title='@GetString("Item.LinkTitle")'</text>} @if (GetBoolean("Item.IsReferenceForm") && p.ProductFieldValues.GetProductFieldValue("ShowNewReferenceTool").Value.ToString() == "False") {<text>href="mailto:@Translate("RT-2.0_Reference_mail_modtager")?subject=@productnumber - @Translate("RT-2.0_Forespørgsel_på_referenceadresse_mail_emne")&body=@Translate("RT-2.0_Forespørgsel_på_referenceadresse_mail_body")"</text>}><span class='icon @iconClass'> 125 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) 126 </span><h2> 127 @GetString("Item.Header").Replace("[RTXXX]",@productnumber) 128 <span>@GetString("Item.Subheader").Replace("[RTXXX]",@productnumber)</span></h2> 129 @if (GetBoolean("Item.IsReferenceForm")) { 130 if (p.ProductFieldValues.GetProductFieldValue("ShowNewReferenceTool").Value.ToString() == "True") { 131 <text>@RenderParagraphContent(GetInteger("Item.FormParagraph"))</text> 132 } else { 133 <span><span class="arrow-link"> 134 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { 135 <span> 136 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 137 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 138 </span> 139 } 140 </span> 141 @Translate("RT-2.0_Spørg_på_referenceadresser") 142 </span> 143 } 144 145 } else { 146 <text>@RenderParagraphContent(GetInteger("Item.FormParagraph"))</text> 147 } 148 </a><a class="mobile-link" 149 150 @if (GetBoolean("Item.IsReferenceForm") && p.ProductFieldValues.GetProductFieldValue("ShowNewReferenceTool").Value.ToString() == "True") {<text>data-target='product-modal-@GetString("Item.Id")'</text>} @if (GetBoolean("Item.IsReferenceForm") && p.ProductFieldValues.GetProductFieldValue("ShowNewReferenceTool").Value.ToString() == "False") {<text>href="mailto:@Translate("RT-2.0_Reference_mail_modtager")?subject=@productnumber - @Translate("RT-2.0_Forespørgsel_på_referenceadresse_mail_emne")&body=@Translate("RT-2.0_Forespørgsel_på_referenceadresse_mail_body")"</text>}><span class='icon @iconClass'> 151 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) 152 </span> 153 @if (GetBoolean("Item.IsReferenceForm")) { 154 if (p.ProductFieldValues.GetProductFieldValue("ShowNewReferenceTool").Value.ToString() == "True") { 155 <h2><span>@GetString("Item.MobileHeader").Replace("[RTXXX]",@productnumber)</span></h2> 156 } else { 157 <h2><span>@Translate("RT-2.0_Spørg_på_referenceadresser")</span></h2> 158 } 159 } else { 160 <h2><span>@GetString("Item.MobileHeader").Replace("[RTXXX]",@productnumber)</span></h2> 161 } 162 </a> 163 @SnippetStart("Modals") 164 <div id='product-modal-@GetString("Item.Id")' class="product-modal modal-light"><div class="column-xxs-22 column-lg-18 column-xl-14 column-xxs-left-1 column-lg-left-3 column-xl-left-5 column-xxs-top-6 column-xxs-bottom-2 column-md-top-2"><div class="wrap-inner"><div class="column-xxs-24"><span class="header"> 165 @GetString("Item.Header").Replace("[RTXXX]",@productnumber) 166 <span>@GetString("Item.Subheader").Replace("[RTXXX]",@productnumber)</span></span></div></div></div><div class="column-xxs-22 column-lg-18 column-xl-14 column-xxs-left-1 column-lg-left-3 column-xl-left-5"> 167 @RenderParagraphContent(GetInteger("Item.FormParagraph")) 168 </div><span class="icon-close"> 169 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))) { 170 <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))</text> 171 } 172 </span></div> 173 @SnippetEnd("Modals") 174 } else { 175 <a class="tablet-desktop-link" @if(!string.IsNullOrWhiteSpace(GetString("Item.LinkTitle"))) {<text>title='@GetString("Item.LinkTitle")'</text>}><span class='icon @iconClass'> 176 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) 177 </span><h2> 178 @GetString("Item.Header").Replace("[RTXXX]",@productnumber) 179 <span>@GetString("Item.Subheader").Replace("[RTXXX]",@productnumber)</span></h2><form action='/Default.aspx?Id=@GetString("Item.PostPage")' method="post" id='dw-form-@GetString("ParagraphID")'><div class="input-wrap"><input type="text" name='@GetString("Item.FieldName")' placeholder='@GetString("Item.FieldPlaceholder")' autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" /><button class="arrow-link"> 180 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { 181 <span> 182 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 183 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 184 </span> 185 } 186 </button></div></form></a><a class="mobile-link" data-target='product-modal-@GetString("Item.Id")'><span class='icon @iconClass'> 187 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) 188 </span><h2><span>@GetString("Item.MobileHeader").Replace("[RTXXX]",@productnumber)</span></h2></a> 189 @SnippetStart("Modals") 190 <div id='product-modal-@GetString("Item.Id")' class="product-modal modal-light"><div class="column-xxs-22 column-lg-18 column-xl-14 column-xxs-left-1 column-lg-left-3 column-xl-left-5 column-xxs-top-6 column-xxs-bottom-2 column-md-top-2"><div class="wrap-inner"><div class="column-xxs-24"><span class="header"> 191 @GetString("Item.Header").Replace("[RTXXX]",@productnumber) 192 <span>@GetString("Item.Subheader").Replace("[RTXXX]",@productnumber)</span></span></div></div></div><div class="column-xxs-22 column-lg-18 column-xl-14 column-xxs-left-1 column-lg-left-3 column-xl-left-5 column-xxs-top-6 column-xxs-bottom-2 column-md-top-2"><form action='/Default.aspx?Id=@GetString("Item.PostPage")' method="post" id='dw-form-@GetString("ParagraphID")'><div class="input-wrap"><input type="text" name='@GetString("Item.FieldName")' placeholder='@GetString("Item.FieldPlaceholder")' autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" /><button class="arrow-link"> 193 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { 194 <span> 195 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 196 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 197 </span> 198 } 199 </button></div></form></div><span class="icon-close"> 200 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))) { 201 <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))</text> 202 } 203 </span></div> 204 @SnippetEnd("Modals") 205 } 206 } else { 207 <a @if(GetString("Item.Type") == "link") {<text>href=@link</text>} 208 @if(!string.IsNullOrWhiteSpace(GetString("Item.LinkTitle"))) {<text>title='@GetString("Item.LinkTitle")'</text>} 209 @if(GetString("Item.Type") == "modal-form") {<text>data-target='modal-@GetString("Item.ModalFormParagraph")'</text>} 210 @(GetString("Item.ActionID") == "samples" ? "data-callback='hubspotLoad'" : null) 211 @if (GetBoolean("Item.IsVisualizationToolLink")) {<text>target="_blank"</text>} 212 @if (!string.IsNullOrWhiteSpace(GetString("Item.OpenTrackingCategory"))) {<text>data-open-tracking-category='@GetString("Item.OpenTrackingCategory")'</text>} 213 @if (!string.IsNullOrWhiteSpace(GetString("Item.OpenTrackingAction"))) {<text>data-open-tracking-action='@GetString("Item.OpenTrackingAction")'</text>}><span class='icon @iconClass'> 214 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) 215 </span><h2> 216 @GetString("Item.Header").Replace("[RTXXX]",@productnumber) 217 <span>@GetString("Item.Subheader").Replace("[RTXXX]",@productnumber)</span></h2><h2><span>@GetString("Item.MobileHeader").Replace("[RTXXX]",@productnumber)</span></h2> 218 @if (GetString("Item.Type") == "link") { 219 <span><span class="arrow-link"> 220 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { 221 <span> 222 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 223 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 224 </span> 225 } 226 </span> 227 @GetString("Item.LinkText") 228 </span> 229 } else if (GetString("Item.Type") == "modal-form") { 230 <span><span class="arrow-link"> 231 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { 232 <span> 233 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 234 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 235 </span> 236 } 237 </span> 238 @GetString("Item.FormLinkText") 239 </span> 240 } 241 </a> 242 } 243 </div></div> 244 } 245
Error executing template "/Designs/randers-tegl/Paragraph/rt-2.0.product-action.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
   at CompiledRazorTemplates.Dynamic.RazorEngine_7ec4d585d18c41c1b427a29cdb7973c6.Execute() in D:\dynamicweb.net\Solutions\Gotcha\randerstegl.cloud.dynamicweb-cms.com\files\Templates\Designs\randers-tegl\Paragraph\rt-2.0.product-action.cshtml:line 6
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader)
   at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<RunCompile>b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template)
   at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()

1 @{ 2 string productid = System.Web.HttpContext.Current.Request.QueryString.Get("ProductID"); 3 4 Dynamicweb.Ecommerce.Products.Product p = Dynamicweb.Ecommerce.Services.Products.GetProductById(productid, "", false); 5 6 string productname = p.Name; 7 string productnumber = p.Number; 8 string categoryName = p.Groups[0].Name.ToLower(); 9 } 10 11 @if (!GetString("Item.ExcludeProducts").Contains(productnumber)) { 12 <div class="column-xxs-12 column-md-8 column-xxs-top-1 column-xxs-bottom-1 column-sm-top-0 column-sm-bottom-0" id='@GetString("Item.ActionID")@("-action")'><div class="wrap-inner"> 13 @{ 14 bool islink = false; 15 string link = ""; 16 17 if (GetString("Item.Type") == "link") { 18 islink = true; 19 link = GetString("Item.Link"); 20 bool hasparameter = false; 21 22 if (GetBoolean("Item.IncludeRTNumberInURL")) { 23 link += (GetString("Item.Link").Contains("?") ? "&" : "?"); 24 25 if (!string.IsNullOrWhiteSpace(GetString("Item.URLParameterName"))) { 26 link += GetString("Item.URLParameterName") + "=" + productnumber.Replace(" ",""); 27 } else { 28 link += "ProductID=" + productid; 29 } 30 31 hasparameter = true; 32 } 33 34 if (GetBoolean("Item.IsVisualizationToolLink")) { 35 string brick = p.ProductFieldValues.GetProductFieldValue("VisualizationBrick").Value.ToString(); 36 string groove = p.ProductFieldValues.GetProductFieldValue("VisualizationGroove").Value.ToString(); 37 string linking = p.ProductFieldValues.GetProductFieldValue("VisualizationLinking").Value.ToString(); 38 string paving = p.ProductFieldValues.GetProductFieldValue("VisualizationPaving").Value.ToString(); 39 string roof = p.ProductFieldValues.GetProductFieldValue("VisualizationRoof").Value.ToString(); 40 string house = p.ProductFieldValues.GetProductFieldValue("VisualizationHouse").Value.ToString(); 41 string windows = p.ProductFieldValues.GetProductFieldValue("VisualizationWindows").Value.ToString(); 42 string rnd = p.ProductFieldValues.GetProductFieldValue("VisualizationRnd").Value.ToString(); 43 string viewmode = p.ProductFieldValues.GetProductFieldValue("VisualizationViewmode").Value.ToString(); 44 45 if (categoryName == "mursten") { 46 link += "#brick=" + productnumber.Replace(" ",""); 47 } else if (!string.IsNullOrWhiteSpace(brick)) { 48 link += "#brick=" + brick; 49 } else { 50 link += "#brick=RT522"; 51 } 52 53 if (!string.IsNullOrWhiteSpace(groove)) { 54 link += "&groove=" + groove; 55 } 56 57 if (!string.IsNullOrWhiteSpace(linking)) { 58 link += "&linking=" + linking; 59 } 60 61 if (!string.IsNullOrWhiteSpace(paving)) { 62 link += "&paving=" + paving; 63 } 64 65 if (categoryName == "tagsten") { 66 link += "&roof=" + productnumber.Replace(" ","_"); 67 } else if (!string.IsNullOrWhiteSpace(roof)) { 68 link += "&roof=" + roof; 69 } 70 71 if (!string.IsNullOrWhiteSpace(house)) { 72 link += "&house=" + house; 73 } else if (categoryName == "tagsten") { 74 link += "&house=05"; 75 } 76 77 if (!string.IsNullOrWhiteSpace(windows)) { 78 link += "&windows=" + windows; 79 } 80 81 if (!string.IsNullOrWhiteSpace(rnd)) { 82 link += "&rnd=" + rnd; 83 } 84 85 if (!string.IsNullOrWhiteSpace(viewmode)) { 86 link += "&viewmode=" + viewmode; 87 } else { 88 link += "&viewmode=house"; 89 } 90 } 91 if (GetBoolean("Item.IsTextureToolLink")) { 92 string groove = p.ProductFieldValues.GetProductFieldValue("VisualizationGroove").Value.ToString(); 93 string linking = p.ProductFieldValues.GetProductFieldValue("VisualizationLinking").Value.ToString(); 94 string viewmode = p.ProductFieldValues.GetProductFieldValue("VisualizationViewmode").Value.ToString(); 95 96 if (categoryName == "mursten") { 97 link += "#brick=" + productnumber.Replace(" ",""); 98 } else { 99 link += "#brick=RT522"; 100 } 101 102 if (!string.IsNullOrWhiteSpace(groove)) { 103 link += "&groove=" + groove; 104 } 105 106 if (!string.IsNullOrWhiteSpace(linking)) { 107 link += "&linking=" + linking; 108 } 109 110 if (!string.IsNullOrWhiteSpace(viewmode)) { 111 link += "&viewmode=" + viewmode; 112 } else { 113 link += "&viewmode=wall"; 114 } 115 } 116 } 117 118 string iconClass = GetString("Item.Icon"); 119 iconClass = iconClass.Substring(iconClass.LastIndexOf("/") + 1); 120 iconClass = iconClass.Replace(".svg",""); 121 } 122 @if (GetString("Item.Type") == "inline-form" || GetString("Item.Type") == "custom") { 123 if (GetString("Item.Type") == "inline-form") { 124 <a class="tablet-desktop-link" @if(!string.IsNullOrWhiteSpace(GetString("Item.LinkTitle"))) {<text>title='@GetString("Item.LinkTitle")'</text>} @if (GetBoolean("Item.IsReferenceForm") && p.ProductFieldValues.GetProductFieldValue("ShowNewReferenceTool").Value.ToString() == "False") {<text>href="mailto:@Translate("RT-2.0_Reference_mail_modtager")?subject=@productnumber - @Translate("RT-2.0_Forespørgsel_på_referenceadresse_mail_emne")&body=@Translate("RT-2.0_Forespørgsel_på_referenceadresse_mail_body")"</text>}><span class='icon @iconClass'> 125 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) 126 </span><h2> 127 @GetString("Item.Header").Replace("[RTXXX]",@productnumber) 128 <span>@GetString("Item.Subheader").Replace("[RTXXX]",@productnumber)</span></h2> 129 @if (GetBoolean("Item.IsReferenceForm")) { 130 if (p.ProductFieldValues.GetProductFieldValue("ShowNewReferenceTool").Value.ToString() == "True") { 131 <text>@RenderParagraphContent(GetInteger("Item.FormParagraph"))</text> 132 } else { 133 <span><span class="arrow-link"> 134 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { 135 <span> 136 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 137 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 138 </span> 139 } 140 </span> 141 @Translate("RT-2.0_Spørg_på_referenceadresser") 142 </span> 143 } 144 145 } else { 146 <text>@RenderParagraphContent(GetInteger("Item.FormParagraph"))</text> 147 } 148 </a><a class="mobile-link" 149 150 @if (GetBoolean("Item.IsReferenceForm") && p.ProductFieldValues.GetProductFieldValue("ShowNewReferenceTool").Value.ToString() == "True") {<text>data-target='product-modal-@GetString("Item.Id")'</text>} @if (GetBoolean("Item.IsReferenceForm") && p.ProductFieldValues.GetProductFieldValue("ShowNewReferenceTool").Value.ToString() == "False") {<text>href="mailto:@Translate("RT-2.0_Reference_mail_modtager")?subject=@productnumber - @Translate("RT-2.0_Forespørgsel_på_referenceadresse_mail_emne")&body=@Translate("RT-2.0_Forespørgsel_på_referenceadresse_mail_body")"</text>}><span class='icon @iconClass'> 151 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) 152 </span> 153 @if (GetBoolean("Item.IsReferenceForm")) { 154 if (p.ProductFieldValues.GetProductFieldValue("ShowNewReferenceTool").Value.ToString() == "True") { 155 <h2><span>@GetString("Item.MobileHeader").Replace("[RTXXX]",@productnumber)</span></h2> 156 } else { 157 <h2><span>@Translate("RT-2.0_Spørg_på_referenceadresser")</span></h2> 158 } 159 } else { 160 <h2><span>@GetString("Item.MobileHeader").Replace("[RTXXX]",@productnumber)</span></h2> 161 } 162 </a> 163 @SnippetStart("Modals") 164 <div id='product-modal-@GetString("Item.Id")' class="product-modal modal-light"><div class="column-xxs-22 column-lg-18 column-xl-14 column-xxs-left-1 column-lg-left-3 column-xl-left-5 column-xxs-top-6 column-xxs-bottom-2 column-md-top-2"><div class="wrap-inner"><div class="column-xxs-24"><span class="header"> 165 @GetString("Item.Header").Replace("[RTXXX]",@productnumber) 166 <span>@GetString("Item.Subheader").Replace("[RTXXX]",@productnumber)</span></span></div></div></div><div class="column-xxs-22 column-lg-18 column-xl-14 column-xxs-left-1 column-lg-left-3 column-xl-left-5"> 167 @RenderParagraphContent(GetInteger("Item.FormParagraph")) 168 </div><span class="icon-close"> 169 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))) { 170 <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))</text> 171 } 172 </span></div> 173 @SnippetEnd("Modals") 174 } else { 175 <a class="tablet-desktop-link" @if(!string.IsNullOrWhiteSpace(GetString("Item.LinkTitle"))) {<text>title='@GetString("Item.LinkTitle")'</text>}><span class='icon @iconClass'> 176 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) 177 </span><h2> 178 @GetString("Item.Header").Replace("[RTXXX]",@productnumber) 179 <span>@GetString("Item.Subheader").Replace("[RTXXX]",@productnumber)</span></h2><form action='/Default.aspx?Id=@GetString("Item.PostPage")' method="post" id='dw-form-@GetString("ParagraphID")'><div class="input-wrap"><input type="text" name='@GetString("Item.FieldName")' placeholder='@GetString("Item.FieldPlaceholder")' autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" /><button class="arrow-link"> 180 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { 181 <span> 182 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 183 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 184 </span> 185 } 186 </button></div></form></a><a class="mobile-link" data-target='product-modal-@GetString("Item.Id")'><span class='icon @iconClass'> 187 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) 188 </span><h2><span>@GetString("Item.MobileHeader").Replace("[RTXXX]",@productnumber)</span></h2></a> 189 @SnippetStart("Modals") 190 <div id='product-modal-@GetString("Item.Id")' class="product-modal modal-light"><div class="column-xxs-22 column-lg-18 column-xl-14 column-xxs-left-1 column-lg-left-3 column-xl-left-5 column-xxs-top-6 column-xxs-bottom-2 column-md-top-2"><div class="wrap-inner"><div class="column-xxs-24"><span class="header"> 191 @GetString("Item.Header").Replace("[RTXXX]",@productnumber) 192 <span>@GetString("Item.Subheader").Replace("[RTXXX]",@productnumber)</span></span></div></div></div><div class="column-xxs-22 column-lg-18 column-xl-14 column-xxs-left-1 column-lg-left-3 column-xl-left-5 column-xxs-top-6 column-xxs-bottom-2 column-md-top-2"><form action='/Default.aspx?Id=@GetString("Item.PostPage")' method="post" id='dw-form-@GetString("ParagraphID")'><div class="input-wrap"><input type="text" name='@GetString("Item.FieldName")' placeholder='@GetString("Item.FieldPlaceholder")' autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" /><button class="arrow-link"> 193 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { 194 <span> 195 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 196 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 197 </span> 198 } 199 </button></div></form></div><span class="icon-close"> 200 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))) { 201 <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))</text> 202 } 203 </span></div> 204 @SnippetEnd("Modals") 205 } 206 } else { 207 <a @if(GetString("Item.Type") == "link") {<text>href=@link</text>} 208 @if(!string.IsNullOrWhiteSpace(GetString("Item.LinkTitle"))) {<text>title='@GetString("Item.LinkTitle")'</text>} 209 @if(GetString("Item.Type") == "modal-form") {<text>data-target='modal-@GetString("Item.ModalFormParagraph")'</text>} 210 @(GetString("Item.ActionID") == "samples" ? "data-callback='hubspotLoad'" : null) 211 @if (GetBoolean("Item.IsVisualizationToolLink")) {<text>target="_blank"</text>} 212 @if (!string.IsNullOrWhiteSpace(GetString("Item.OpenTrackingCategory"))) {<text>data-open-tracking-category='@GetString("Item.OpenTrackingCategory")'</text>} 213 @if (!string.IsNullOrWhiteSpace(GetString("Item.OpenTrackingAction"))) {<text>data-open-tracking-action='@GetString("Item.OpenTrackingAction")'</text>}><span class='icon @iconClass'> 214 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) 215 </span><h2> 216 @GetString("Item.Header").Replace("[RTXXX]",@productnumber) 217 <span>@GetString("Item.Subheader").Replace("[RTXXX]",@productnumber)</span></h2><h2><span>@GetString("Item.MobileHeader").Replace("[RTXXX]",@productnumber)</span></h2> 218 @if (GetString("Item.Type") == "link") { 219 <span><span class="arrow-link"> 220 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { 221 <span> 222 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 223 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 224 </span> 225 } 226 </span> 227 @GetString("Item.LinkText") 228 </span> 229 } else if (GetString("Item.Type") == "modal-form") { 230 <span><span class="arrow-link"> 231 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { 232 <span> 233 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 234 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 235 </span> 236 } 237 </span> 238 @GetString("Item.FormLinkText") 239 </span> 240 } 241 </a> 242 } 243 </div></div> 244 } 245
Belægning

Uderumi tegl

Teglbelægning er et ekstremt modstandsdygtigt naturmateriale, der fuldender stilrene uderum som terrasser, havegange og indkørsler. Belægning i tegl patinerer smukt med tiden og er stort set vedligeholdelsesfrit.

icon-arrow-right icon-arrow-right Udlev drømmen om en ny terasse
Mursten

Sundt indeklima

Et fuldmuret hus skabt til det dynamiske familieliv og det skandinaviske klima, fordi mursten kan noget som ingen andre byggematerialer kan. Et sundt indeklima er bare en af fordelene ved et fuldmuret hjem. Mursten skaber et behageligt klima uanset årstiden, er energivenligt og meget modstandsdygtigt.

icon-arrow-right icon-arrow-right Se hvorfor trivsel er noget man bygger

Få ekspertråd

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.