Ultima

Waterstruck with engobes 468x108x38 mm
Estimate: 42 Ultima bricks per m2


Pris fra £0.00 pr. stk. Gå til produktside
RT 150 Ultima Ultima
Ultima

Waterstruck with engobes 468x108x38 mm
Estimate: 42 Ultima bricks per m2


Pris fra £0.00 pr. stk. Gå til produktside
RT 151 Ultima Ultima
Ultima

Waterstruck with engobes 468x108x38 mm
Estimate: 42 Ultima bricks per m2


Pris fra £0.00 pr. stk. Gå til produktside
RT 152 Ultima Ultima
Ultima

Waterstruck with engobes 468x108x38 mm
Estimate: 42 Ultima bricks per m2


Pris fra £0.00 pr. stk. Gå til produktside
RT 153 Ultima Ultima
Ultima

Waterstruck with engobes 468x108x38 mm
Estimate: 42 Ultima bricks per m2


Pris fra £0.00 pr. stk. Gå til produktside
RT 154 Ultima Ultima
Ultima

Waterstruck with engobes 468x108x38 mm
Estimate: 42 Ultima bricks per m2


Pris fra £0.00 pr. stk. Gå til produktside
RT 155 Ultima Ultima
Ultima

Waterstruck with engobes 468x108x38 mm
Estimate: 42 Ultima bricks per m2


Pris fra £0.00 pr. stk. Gå til produktside
RT 156 Ultima Ultima
Ultima

Waterstruck with engobes 468x108x38 mm
Estimate: 42 Ultima bricks per m2


Pris fra £0.00 pr. stk. Gå til produktside
RT 157 Ultima Ultima
Ultima

Waterstruck with engobes 468x108x38 mm
Estimate: 42 Ultima bricks per m2


Pris fra £0.00 pr. stk. Gå til produktside
RT 158 Ultima Ultima
Ultima

Waterstruck with engobes 468x108x38 mm
Estimate: 42 Ultima bricks per m2


Pris fra £0.00 pr. stk. Gå til produktside
RT 159 Ultima Ultima

95 products found Page 1 of 10 Next
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_6c1752c73e9941a49922384a344c5dd5.Execute() in E:\dynamicweb.net\Solutions\randerstegl.net.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.b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   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 <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"> 12 @{ 13 bool islink = false; 14 string link = ""; 15 16 if (GetString("Item.Type") == "link") { 17 islink = true; 18 link = GetString("Item.Link"); 19 bool hasparameter = false; 20 21 if (GetBoolean("Item.IncludeRTNumberInURL")) { 22 link += (GetString("Item.Link").Contains("?") ? "&" : "?") + GetString("Item.URLParameterName") + "=" + productnumber.Replace(" ",""); 23 24 hasparameter = true; 25 } 26 27 if (GetBoolean("Item.IsVisualizationToolLink")) { 28 string brick = p.ProductFieldValues.GetProductFieldValue("VisualizationBrick").Value.ToString(); 29 string groove = p.ProductFieldValues.GetProductFieldValue("VisualizationGroove").Value.ToString(); 30 string linking = p.ProductFieldValues.GetProductFieldValue("VisualizationLinking").Value.ToString(); 31 string paving = p.ProductFieldValues.GetProductFieldValue("VisualizationPaving").Value.ToString(); 32 string roof = p.ProductFieldValues.GetProductFieldValue("VisualizationRoof").Value.ToString(); 33 string house = p.ProductFieldValues.GetProductFieldValue("VisualizationHouse").Value.ToString(); 34 string windows = p.ProductFieldValues.GetProductFieldValue("VisualizationWindows").Value.ToString(); 35 string rnd = p.ProductFieldValues.GetProductFieldValue("VisualizationRnd").Value.ToString(); 36 string viewmode = p.ProductFieldValues.GetProductFieldValue("VisualizationViewmode").Value.ToString(); 37 38 if (categoryName == "mursten") { 39 link += "#brick=" + productnumber.Replace(" ",""); 40 } else if (!string.IsNullOrWhiteSpace(brick)) { 41 link += "#brick=" + brick; 42 } else { 43 link += "#brick=RT522"; 44 } 45 46 if (!string.IsNullOrWhiteSpace(groove)) { 47 link += "&groove=" + groove; 48 } 49 50 if (!string.IsNullOrWhiteSpace(linking)) { 51 link += "&linking=" + linking; 52 } 53 54 if (!string.IsNullOrWhiteSpace(paving)) { 55 link += "&paving=" + paving; 56 } 57 58 if (categoryName == "tagsten") { 59 link += "&roof=" + productnumber.Replace(" ","_"); 60 } else if (!string.IsNullOrWhiteSpace(roof)) { 61 link += "&roof=" + roof; 62 } 63 64 if (!string.IsNullOrWhiteSpace(house)) { 65 link += "&house=" + house; 66 } else if (categoryName == "tagsten") { 67 link += "&house=05"; 68 } 69 70 if (!string.IsNullOrWhiteSpace(windows)) { 71 link += "&windows=" + windows; 72 } 73 74 if (!string.IsNullOrWhiteSpace(rnd)) { 75 link += "&rnd=" + rnd; 76 } 77 78 if (!string.IsNullOrWhiteSpace(viewmode)) { 79 link += "&viewmode=" + viewmode; 80 } else { 81 link += "&viewmode=house"; 82 } 83 } 84 } 85 86 string iconClass = GetString("Item.Icon"); 87 iconClass = iconClass.Substring(iconClass.LastIndexOf("/") + 1); 88 iconClass = iconClass.Replace(".svg",""); 89 } 90 @if (GetString("Item.Type") == "inline-form" || GetString("Item.Type") == "custom") { 91 if (GetString("Item.Type") == "inline-form") { 92 <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'> 93 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) 94 </span><h2> 95 @GetString("Item.Header").Replace("[RTXXX]",@productnumber) 96 <span>@GetString("Item.Subheader").Replace("[RTXXX]",@productnumber)</span></h2> 97 @if (GetBoolean("Item.IsReferenceForm")) { 98 if (p.ProductFieldValues.GetProductFieldValue("ShowNewReferenceTool").Value.ToString() == "True") { 99 <text>@RenderParagraphContent(GetInteger("Item.FormParagraph"))</text> 100 } else { 101 <span><span class="arrow-link"> 102 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { 103 <span> 104 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 105 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 106 </span> 107 } 108 </span> 109 @Translate("RT-2.0_Spørg_på_referenceadresser") 110 </span> 111 } 112 113 } else { 114 <text>@RenderParagraphContent(GetInteger("Item.FormParagraph"))</text> 115 } 116 </a><a class="mobile-link" 117 118 @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'> 119 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) 120 </span> 121 @if (GetBoolean("Item.IsReferenceForm")) { 122 if (p.ProductFieldValues.GetProductFieldValue("ShowNewReferenceTool").Value.ToString() == "True") { 123 <h2><span>@GetString("Item.MobileHeader").Replace("[RTXXX]",@productnumber)</span></h2> 124 } else { 125 <h2><span>@Translate("RT-2.0_Spørg_på_referenceadresser")</span></h2> 126 } 127 } else { 128 <h2><span>@GetString("Item.MobileHeader").Replace("[RTXXX]",@productnumber)</span></h2> 129 } 130 </a> 131 @SnippetStart("Modals") 132 <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"> 133 @GetString("Item.Header").Replace("[RTXXX]",@productnumber) 134 <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"> 135 @RenderParagraphContent(GetInteger("Item.FormParagraph")) 136 </div><span class="icon-close"> 137 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))) { 138 <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))</text> 139 } 140 </span></div> 141 @SnippetEnd("Modals") 142 } else { 143 <a class="tablet-desktop-link" @if(!string.IsNullOrWhiteSpace(GetString("Item.LinkTitle"))) {<text>title='@GetString("Item.LinkTitle")'</text>}><span class='icon @iconClass'> 144 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) 145 </span><h2> 146 @GetString("Item.Header").Replace("[RTXXX]",@productnumber) 147 <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"> 148 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { 149 <span> 150 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 151 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 152 </span> 153 } 154 </button></div></form></a><a class="mobile-link" data-target='product-modal-@GetString("Item.Id")'><span class='icon @iconClass'> 155 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) 156 </span><h2><span>@GetString("Item.MobileHeader").Replace("[RTXXX]",@productnumber)</span></h2></a> 157 @SnippetStart("Modals") 158 <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"> 159 @GetString("Item.Header").Replace("[RTXXX]",@productnumber) 160 <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"> 161 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { 162 <span> 163 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 164 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 165 </span> 166 } 167 </button></div></form></div><span class="icon-close"> 168 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))) { 169 <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))</text> 170 } 171 </span></div> 172 @SnippetEnd("Modals") 173 } 174 } else { 175 <a @if(GetString("Item.Type") == "link") {<text>href=@link</text>} 176 @if(!string.IsNullOrWhiteSpace(GetString("Item.LinkTitle"))) {<text>title='@GetString("Item.LinkTitle")'</text>} 177 @if(GetString("Item.Type") == "modal-form") {<text>data-target='modal-@GetString("Item.ModalFormParagraph")'</text>} 178 @(GetString("Item.ActionID") == "samples" ? "data-callback='hubspotLoad'" : null) 179 @if (GetBoolean("Item.IsVisualizationToolLink")) {<text>target="_blank"</text>} 180 @if (!string.IsNullOrWhiteSpace(GetString("Item.OpenTrackingCategory"))) {<text>data-open-tracking-category='@GetString("Item.OpenTrackingCategory")'</text>} 181 @if (!string.IsNullOrWhiteSpace(GetString("Item.OpenTrackingAction"))) {<text>data-open-tracking-action='@GetString("Item.OpenTrackingAction")'</text>}><span class='icon @iconClass'> 182 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) 183 </span><h2> 184 @GetString("Item.Header").Replace("[RTXXX]",@productnumber) 185 <span>@GetString("Item.Subheader").Replace("[RTXXX]",@productnumber)</span></h2><h2><span>@GetString("Item.MobileHeader").Replace("[RTXXX]",@productnumber)</span></h2> 186 @if (GetString("Item.Type") == "link") { 187 <span><span class="arrow-link"> 188 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { 189 <span> 190 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 191 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 192 </span> 193 } 194 </span> 195 @GetString("Item.LinkText") 196 </span> 197 } else if (GetString("Item.Type") == "modal-form") { 198 <span><span class="arrow-link"> 199 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { 200 <span> 201 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 202 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 203 </span> 204 } 205 </span> 206 @GetString("Item.FormLinkText") 207 </span> 208 } 209 </a> 210 } 211 </div></div> 212
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_6c1752c73e9941a49922384a344c5dd5.Execute() in E:\dynamicweb.net\Solutions\randerstegl.net.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.b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   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 <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"> 12 @{ 13 bool islink = false; 14 string link = ""; 15 16 if (GetString("Item.Type") == "link") { 17 islink = true; 18 link = GetString("Item.Link"); 19 bool hasparameter = false; 20 21 if (GetBoolean("Item.IncludeRTNumberInURL")) { 22 link += (GetString("Item.Link").Contains("?") ? "&" : "?") + GetString("Item.URLParameterName") + "=" + productnumber.Replace(" ",""); 23 24 hasparameter = true; 25 } 26 27 if (GetBoolean("Item.IsVisualizationToolLink")) { 28 string brick = p.ProductFieldValues.GetProductFieldValue("VisualizationBrick").Value.ToString(); 29 string groove = p.ProductFieldValues.GetProductFieldValue("VisualizationGroove").Value.ToString(); 30 string linking = p.ProductFieldValues.GetProductFieldValue("VisualizationLinking").Value.ToString(); 31 string paving = p.ProductFieldValues.GetProductFieldValue("VisualizationPaving").Value.ToString(); 32 string roof = p.ProductFieldValues.GetProductFieldValue("VisualizationRoof").Value.ToString(); 33 string house = p.ProductFieldValues.GetProductFieldValue("VisualizationHouse").Value.ToString(); 34 string windows = p.ProductFieldValues.GetProductFieldValue("VisualizationWindows").Value.ToString(); 35 string rnd = p.ProductFieldValues.GetProductFieldValue("VisualizationRnd").Value.ToString(); 36 string viewmode = p.ProductFieldValues.GetProductFieldValue("VisualizationViewmode").Value.ToString(); 37 38 if (categoryName == "mursten") { 39 link += "#brick=" + productnumber.Replace(" ",""); 40 } else if (!string.IsNullOrWhiteSpace(brick)) { 41 link += "#brick=" + brick; 42 } else { 43 link += "#brick=RT522"; 44 } 45 46 if (!string.IsNullOrWhiteSpace(groove)) { 47 link += "&groove=" + groove; 48 } 49 50 if (!string.IsNullOrWhiteSpace(linking)) { 51 link += "&linking=" + linking; 52 } 53 54 if (!string.IsNullOrWhiteSpace(paving)) { 55 link += "&paving=" + paving; 56 } 57 58 if (categoryName == "tagsten") { 59 link += "&roof=" + productnumber.Replace(" ","_"); 60 } else if (!string.IsNullOrWhiteSpace(roof)) { 61 link += "&roof=" + roof; 62 } 63 64 if (!string.IsNullOrWhiteSpace(house)) { 65 link += "&house=" + house; 66 } else if (categoryName == "tagsten") { 67 link += "&house=05"; 68 } 69 70 if (!string.IsNullOrWhiteSpace(windows)) { 71 link += "&windows=" + windows; 72 } 73 74 if (!string.IsNullOrWhiteSpace(rnd)) { 75 link += "&rnd=" + rnd; 76 } 77 78 if (!string.IsNullOrWhiteSpace(viewmode)) { 79 link += "&viewmode=" + viewmode; 80 } else { 81 link += "&viewmode=house"; 82 } 83 } 84 } 85 86 string iconClass = GetString("Item.Icon"); 87 iconClass = iconClass.Substring(iconClass.LastIndexOf("/") + 1); 88 iconClass = iconClass.Replace(".svg",""); 89 } 90 @if (GetString("Item.Type") == "inline-form" || GetString("Item.Type") == "custom") { 91 if (GetString("Item.Type") == "inline-form") { 92 <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'> 93 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) 94 </span><h2> 95 @GetString("Item.Header").Replace("[RTXXX]",@productnumber) 96 <span>@GetString("Item.Subheader").Replace("[RTXXX]",@productnumber)</span></h2> 97 @if (GetBoolean("Item.IsReferenceForm")) { 98 if (p.ProductFieldValues.GetProductFieldValue("ShowNewReferenceTool").Value.ToString() == "True") { 99 <text>@RenderParagraphContent(GetInteger("Item.FormParagraph"))</text> 100 } else { 101 <span><span class="arrow-link"> 102 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { 103 <span> 104 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 105 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 106 </span> 107 } 108 </span> 109 @Translate("RT-2.0_Spørg_på_referenceadresser") 110 </span> 111 } 112 113 } else { 114 <text>@RenderParagraphContent(GetInteger("Item.FormParagraph"))</text> 115 } 116 </a><a class="mobile-link" 117 118 @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'> 119 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) 120 </span> 121 @if (GetBoolean("Item.IsReferenceForm")) { 122 if (p.ProductFieldValues.GetProductFieldValue("ShowNewReferenceTool").Value.ToString() == "True") { 123 <h2><span>@GetString("Item.MobileHeader").Replace("[RTXXX]",@productnumber)</span></h2> 124 } else { 125 <h2><span>@Translate("RT-2.0_Spørg_på_referenceadresser")</span></h2> 126 } 127 } else { 128 <h2><span>@GetString("Item.MobileHeader").Replace("[RTXXX]",@productnumber)</span></h2> 129 } 130 </a> 131 @SnippetStart("Modals") 132 <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"> 133 @GetString("Item.Header").Replace("[RTXXX]",@productnumber) 134 <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"> 135 @RenderParagraphContent(GetInteger("Item.FormParagraph")) 136 </div><span class="icon-close"> 137 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))) { 138 <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))</text> 139 } 140 </span></div> 141 @SnippetEnd("Modals") 142 } else { 143 <a class="tablet-desktop-link" @if(!string.IsNullOrWhiteSpace(GetString("Item.LinkTitle"))) {<text>title='@GetString("Item.LinkTitle")'</text>}><span class='icon @iconClass'> 144 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) 145 </span><h2> 146 @GetString("Item.Header").Replace("[RTXXX]",@productnumber) 147 <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"> 148 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { 149 <span> 150 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 151 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 152 </span> 153 } 154 </button></div></form></a><a class="mobile-link" data-target='product-modal-@GetString("Item.Id")'><span class='icon @iconClass'> 155 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) 156 </span><h2><span>@GetString("Item.MobileHeader").Replace("[RTXXX]",@productnumber)</span></h2></a> 157 @SnippetStart("Modals") 158 <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"> 159 @GetString("Item.Header").Replace("[RTXXX]",@productnumber) 160 <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"> 161 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { 162 <span> 163 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 164 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 165 </span> 166 } 167 </button></div></form></div><span class="icon-close"> 168 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))) { 169 <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))</text> 170 } 171 </span></div> 172 @SnippetEnd("Modals") 173 } 174 } else { 175 <a @if(GetString("Item.Type") == "link") {<text>href=@link</text>} 176 @if(!string.IsNullOrWhiteSpace(GetString("Item.LinkTitle"))) {<text>title='@GetString("Item.LinkTitle")'</text>} 177 @if(GetString("Item.Type") == "modal-form") {<text>data-target='modal-@GetString("Item.ModalFormParagraph")'</text>} 178 @(GetString("Item.ActionID") == "samples" ? "data-callback='hubspotLoad'" : null) 179 @if (GetBoolean("Item.IsVisualizationToolLink")) {<text>target="_blank"</text>} 180 @if (!string.IsNullOrWhiteSpace(GetString("Item.OpenTrackingCategory"))) {<text>data-open-tracking-category='@GetString("Item.OpenTrackingCategory")'</text>} 181 @if (!string.IsNullOrWhiteSpace(GetString("Item.OpenTrackingAction"))) {<text>data-open-tracking-action='@GetString("Item.OpenTrackingAction")'</text>}><span class='icon @iconClass'> 182 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) 183 </span><h2> 184 @GetString("Item.Header").Replace("[RTXXX]",@productnumber) 185 <span>@GetString("Item.Subheader").Replace("[RTXXX]",@productnumber)</span></h2><h2><span>@GetString("Item.MobileHeader").Replace("[RTXXX]",@productnumber)</span></h2> 186 @if (GetString("Item.Type") == "link") { 187 <span><span class="arrow-link"> 188 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { 189 <span> 190 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 191 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 192 </span> 193 } 194 </span> 195 @GetString("Item.LinkText") 196 </span> 197 } else if (GetString("Item.Type") == "modal-form") { 198 <span><span class="arrow-link"> 199 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { 200 <span> 201 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 202 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 203 </span> 204 } 205 </span> 206 @GetString("Item.FormLinkText") 207 </span> 208 } 209 </a> 210 } 211 </div></div> 212
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_6c1752c73e9941a49922384a344c5dd5.Execute() in E:\dynamicweb.net\Solutions\randerstegl.net.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.b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   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 <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"> 12 @{ 13 bool islink = false; 14 string link = ""; 15 16 if (GetString("Item.Type") == "link") { 17 islink = true; 18 link = GetString("Item.Link"); 19 bool hasparameter = false; 20 21 if (GetBoolean("Item.IncludeRTNumberInURL")) { 22 link += (GetString("Item.Link").Contains("?") ? "&" : "?") + GetString("Item.URLParameterName") + "=" + productnumber.Replace(" ",""); 23 24 hasparameter = true; 25 } 26 27 if (GetBoolean("Item.IsVisualizationToolLink")) { 28 string brick = p.ProductFieldValues.GetProductFieldValue("VisualizationBrick").Value.ToString(); 29 string groove = p.ProductFieldValues.GetProductFieldValue("VisualizationGroove").Value.ToString(); 30 string linking = p.ProductFieldValues.GetProductFieldValue("VisualizationLinking").Value.ToString(); 31 string paving = p.ProductFieldValues.GetProductFieldValue("VisualizationPaving").Value.ToString(); 32 string roof = p.ProductFieldValues.GetProductFieldValue("VisualizationRoof").Value.ToString(); 33 string house = p.ProductFieldValues.GetProductFieldValue("VisualizationHouse").Value.ToString(); 34 string windows = p.ProductFieldValues.GetProductFieldValue("VisualizationWindows").Value.ToString(); 35 string rnd = p.ProductFieldValues.GetProductFieldValue("VisualizationRnd").Value.ToString(); 36 string viewmode = p.ProductFieldValues.GetProductFieldValue("VisualizationViewmode").Value.ToString(); 37 38 if (categoryName == "mursten") { 39 link += "#brick=" + productnumber.Replace(" ",""); 40 } else if (!string.IsNullOrWhiteSpace(brick)) { 41 link += "#brick=" + brick; 42 } else { 43 link += "#brick=RT522"; 44 } 45 46 if (!string.IsNullOrWhiteSpace(groove)) { 47 link += "&groove=" + groove; 48 } 49 50 if (!string.IsNullOrWhiteSpace(linking)) { 51 link += "&linking=" + linking; 52 } 53 54 if (!string.IsNullOrWhiteSpace(paving)) { 55 link += "&paving=" + paving; 56 } 57 58 if (categoryName == "tagsten") { 59 link += "&roof=" + productnumber.Replace(" ","_"); 60 } else if (!string.IsNullOrWhiteSpace(roof)) { 61 link += "&roof=" + roof; 62 } 63 64 if (!string.IsNullOrWhiteSpace(house)) { 65 link += "&house=" + house; 66 } else if (categoryName == "tagsten") { 67 link += "&house=05"; 68 } 69 70 if (!string.IsNullOrWhiteSpace(windows)) { 71 link += "&windows=" + windows; 72 } 73 74 if (!string.IsNullOrWhiteSpace(rnd)) { 75 link += "&rnd=" + rnd; 76 } 77 78 if (!string.IsNullOrWhiteSpace(viewmode)) { 79 link += "&viewmode=" + viewmode; 80 } else { 81 link += "&viewmode=house"; 82 } 83 } 84 } 85 86 string iconClass = GetString("Item.Icon"); 87 iconClass = iconClass.Substring(iconClass.LastIndexOf("/") + 1); 88 iconClass = iconClass.Replace(".svg",""); 89 } 90 @if (GetString("Item.Type") == "inline-form" || GetString("Item.Type") == "custom") { 91 if (GetString("Item.Type") == "inline-form") { 92 <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'> 93 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) 94 </span><h2> 95 @GetString("Item.Header").Replace("[RTXXX]",@productnumber) 96 <span>@GetString("Item.Subheader").Replace("[RTXXX]",@productnumber)</span></h2> 97 @if (GetBoolean("Item.IsReferenceForm")) { 98 if (p.ProductFieldValues.GetProductFieldValue("ShowNewReferenceTool").Value.ToString() == "True") { 99 <text>@RenderParagraphContent(GetInteger("Item.FormParagraph"))</text> 100 } else { 101 <span><span class="arrow-link"> 102 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { 103 <span> 104 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 105 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 106 </span> 107 } 108 </span> 109 @Translate("RT-2.0_Spørg_på_referenceadresser") 110 </span> 111 } 112 113 } else { 114 <text>@RenderParagraphContent(GetInteger("Item.FormParagraph"))</text> 115 } 116 </a><a class="mobile-link" 117 118 @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'> 119 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) 120 </span> 121 @if (GetBoolean("Item.IsReferenceForm")) { 122 if (p.ProductFieldValues.GetProductFieldValue("ShowNewReferenceTool").Value.ToString() == "True") { 123 <h2><span>@GetString("Item.MobileHeader").Replace("[RTXXX]",@productnumber)</span></h2> 124 } else { 125 <h2><span>@Translate("RT-2.0_Spørg_på_referenceadresser")</span></h2> 126 } 127 } else { 128 <h2><span>@GetString("Item.MobileHeader").Replace("[RTXXX]",@productnumber)</span></h2> 129 } 130 </a> 131 @SnippetStart("Modals") 132 <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"> 133 @GetString("Item.Header").Replace("[RTXXX]",@productnumber) 134 <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"> 135 @RenderParagraphContent(GetInteger("Item.FormParagraph")) 136 </div><span class="icon-close"> 137 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))) { 138 <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))</text> 139 } 140 </span></div> 141 @SnippetEnd("Modals") 142 } else { 143 <a class="tablet-desktop-link" @if(!string.IsNullOrWhiteSpace(GetString("Item.LinkTitle"))) {<text>title='@GetString("Item.LinkTitle")'</text>}><span class='icon @iconClass'> 144 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) 145 </span><h2> 146 @GetString("Item.Header").Replace("[RTXXX]",@productnumber) 147 <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"> 148 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { 149 <span> 150 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 151 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 152 </span> 153 } 154 </button></div></form></a><a class="mobile-link" data-target='product-modal-@GetString("Item.Id")'><span class='icon @iconClass'> 155 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) 156 </span><h2><span>@GetString("Item.MobileHeader").Replace("[RTXXX]",@productnumber)</span></h2></a> 157 @SnippetStart("Modals") 158 <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"> 159 @GetString("Item.Header").Replace("[RTXXX]",@productnumber) 160 <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"> 161 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { 162 <span> 163 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 164 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 165 </span> 166 } 167 </button></div></form></div><span class="icon-close"> 168 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))) { 169 <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))</text> 170 } 171 </span></div> 172 @SnippetEnd("Modals") 173 } 174 } else { 175 <a @if(GetString("Item.Type") == "link") {<text>href=@link</text>} 176 @if(!string.IsNullOrWhiteSpace(GetString("Item.LinkTitle"))) {<text>title='@GetString("Item.LinkTitle")'</text>} 177 @if(GetString("Item.Type") == "modal-form") {<text>data-target='modal-@GetString("Item.ModalFormParagraph")'</text>} 178 @(GetString("Item.ActionID") == "samples" ? "data-callback='hubspotLoad'" : null) 179 @if (GetBoolean("Item.IsVisualizationToolLink")) {<text>target="_blank"</text>} 180 @if (!string.IsNullOrWhiteSpace(GetString("Item.OpenTrackingCategory"))) {<text>data-open-tracking-category='@GetString("Item.OpenTrackingCategory")'</text>} 181 @if (!string.IsNullOrWhiteSpace(GetString("Item.OpenTrackingAction"))) {<text>data-open-tracking-action='@GetString("Item.OpenTrackingAction")'</text>}><span class='icon @iconClass'> 182 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) 183 </span><h2> 184 @GetString("Item.Header").Replace("[RTXXX]",@productnumber) 185 <span>@GetString("Item.Subheader").Replace("[RTXXX]",@productnumber)</span></h2><h2><span>@GetString("Item.MobileHeader").Replace("[RTXXX]",@productnumber)</span></h2> 186 @if (GetString("Item.Type") == "link") { 187 <span><span class="arrow-link"> 188 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { 189 <span> 190 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 191 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 192 </span> 193 } 194 </span> 195 @GetString("Item.LinkText") 196 </span> 197 } else if (GetString("Item.Type") == "modal-form") { 198 <span><span class="arrow-link"> 199 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { 200 <span> 201 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 202 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 203 </span> 204 } 205 </span> 206 @GetString("Item.FormLinkText") 207 </span> 208 } 209 </a> 210 } 211 </div></div> 212
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_6c1752c73e9941a49922384a344c5dd5.Execute() in E:\dynamicweb.net\Solutions\randerstegl.net.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.b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   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 <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"> 12 @{ 13 bool islink = false; 14 string link = ""; 15 16 if (GetString("Item.Type") == "link") { 17 islink = true; 18 link = GetString("Item.Link"); 19 bool hasparameter = false; 20 21 if (GetBoolean("Item.IncludeRTNumberInURL")) { 22 link += (GetString("Item.Link").Contains("?") ? "&" : "?") + GetString("Item.URLParameterName") + "=" + productnumber.Replace(" ",""); 23 24 hasparameter = true; 25 } 26 27 if (GetBoolean("Item.IsVisualizationToolLink")) { 28 string brick = p.ProductFieldValues.GetProductFieldValue("VisualizationBrick").Value.ToString(); 29 string groove = p.ProductFieldValues.GetProductFieldValue("VisualizationGroove").Value.ToString(); 30 string linking = p.ProductFieldValues.GetProductFieldValue("VisualizationLinking").Value.ToString(); 31 string paving = p.ProductFieldValues.GetProductFieldValue("VisualizationPaving").Value.ToString(); 32 string roof = p.ProductFieldValues.GetProductFieldValue("VisualizationRoof").Value.ToString(); 33 string house = p.ProductFieldValues.GetProductFieldValue("VisualizationHouse").Value.ToString(); 34 string windows = p.ProductFieldValues.GetProductFieldValue("VisualizationWindows").Value.ToString(); 35 string rnd = p.ProductFieldValues.GetProductFieldValue("VisualizationRnd").Value.ToString(); 36 string viewmode = p.ProductFieldValues.GetProductFieldValue("VisualizationViewmode").Value.ToString(); 37 38 if (categoryName == "mursten") { 39 link += "#brick=" + productnumber.Replace(" ",""); 40 } else if (!string.IsNullOrWhiteSpace(brick)) { 41 link += "#brick=" + brick; 42 } else { 43 link += "#brick=RT522"; 44 } 45 46 if (!string.IsNullOrWhiteSpace(groove)) { 47 link += "&groove=" + groove; 48 } 49 50 if (!string.IsNullOrWhiteSpace(linking)) { 51 link += "&linking=" + linking; 52 } 53 54 if (!string.IsNullOrWhiteSpace(paving)) { 55 link += "&paving=" + paving; 56 } 57 58 if (categoryName == "tagsten") { 59 link += "&roof=" + productnumber.Replace(" ","_"); 60 } else if (!string.IsNullOrWhiteSpace(roof)) { 61 link += "&roof=" + roof; 62 } 63 64 if (!string.IsNullOrWhiteSpace(house)) { 65 link += "&house=" + house; 66 } else if (categoryName == "tagsten") { 67 link += "&house=05"; 68 } 69 70 if (!string.IsNullOrWhiteSpace(windows)) { 71 link += "&windows=" + windows; 72 } 73 74 if (!string.IsNullOrWhiteSpace(rnd)) { 75 link += "&rnd=" + rnd; 76 } 77 78 if (!string.IsNullOrWhiteSpace(viewmode)) { 79 link += "&viewmode=" + viewmode; 80 } else { 81 link += "&viewmode=house"; 82 } 83 } 84 } 85 86 string iconClass = GetString("Item.Icon"); 87 iconClass = iconClass.Substring(iconClass.LastIndexOf("/") + 1); 88 iconClass = iconClass.Replace(".svg",""); 89 } 90 @if (GetString("Item.Type") == "inline-form" || GetString("Item.Type") == "custom") { 91 if (GetString("Item.Type") == "inline-form") { 92 <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'> 93 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) 94 </span><h2> 95 @GetString("Item.Header").Replace("[RTXXX]",@productnumber) 96 <span>@GetString("Item.Subheader").Replace("[RTXXX]",@productnumber)</span></h2> 97 @if (GetBoolean("Item.IsReferenceForm")) { 98 if (p.ProductFieldValues.GetProductFieldValue("ShowNewReferenceTool").Value.ToString() == "True") { 99 <text>@RenderParagraphContent(GetInteger("Item.FormParagraph"))</text> 100 } else { 101 <span><span class="arrow-link"> 102 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { 103 <span> 104 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 105 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 106 </span> 107 } 108 </span> 109 @Translate("RT-2.0_Spørg_på_referenceadresser") 110 </span> 111 } 112 113 } else { 114 <text>@RenderParagraphContent(GetInteger("Item.FormParagraph"))</text> 115 } 116 </a><a class="mobile-link" 117 118 @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'> 119 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) 120 </span> 121 @if (GetBoolean("Item.IsReferenceForm")) { 122 if (p.ProductFieldValues.GetProductFieldValue("ShowNewReferenceTool").Value.ToString() == "True") { 123 <h2><span>@GetString("Item.MobileHeader").Replace("[RTXXX]",@productnumber)</span></h2> 124 } else { 125 <h2><span>@Translate("RT-2.0_Spørg_på_referenceadresser")</span></h2> 126 } 127 } else { 128 <h2><span>@GetString("Item.MobileHeader").Replace("[RTXXX]",@productnumber)</span></h2> 129 } 130 </a> 131 @SnippetStart("Modals") 132 <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"> 133 @GetString("Item.Header").Replace("[RTXXX]",@productnumber) 134 <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"> 135 @RenderParagraphContent(GetInteger("Item.FormParagraph")) 136 </div><span class="icon-close"> 137 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))) { 138 <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))</text> 139 } 140 </span></div> 141 @SnippetEnd("Modals") 142 } else { 143 <a class="tablet-desktop-link" @if(!string.IsNullOrWhiteSpace(GetString("Item.LinkTitle"))) {<text>title='@GetString("Item.LinkTitle")'</text>}><span class='icon @iconClass'> 144 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) 145 </span><h2> 146 @GetString("Item.Header").Replace("[RTXXX]",@productnumber) 147 <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"> 148 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { 149 <span> 150 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 151 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 152 </span> 153 } 154 </button></div></form></a><a class="mobile-link" data-target='product-modal-@GetString("Item.Id")'><span class='icon @iconClass'> 155 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) 156 </span><h2><span>@GetString("Item.MobileHeader").Replace("[RTXXX]",@productnumber)</span></h2></a> 157 @SnippetStart("Modals") 158 <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"> 159 @GetString("Item.Header").Replace("[RTXXX]",@productnumber) 160 <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"> 161 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { 162 <span> 163 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 164 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 165 </span> 166 } 167 </button></div></form></div><span class="icon-close"> 168 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))) { 169 <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))</text> 170 } 171 </span></div> 172 @SnippetEnd("Modals") 173 } 174 } else { 175 <a @if(GetString("Item.Type") == "link") {<text>href=@link</text>} 176 @if(!string.IsNullOrWhiteSpace(GetString("Item.LinkTitle"))) {<text>title='@GetString("Item.LinkTitle")'</text>} 177 @if(GetString("Item.Type") == "modal-form") {<text>data-target='modal-@GetString("Item.ModalFormParagraph")'</text>} 178 @(GetString("Item.ActionID") == "samples" ? "data-callback='hubspotLoad'" : null) 179 @if (GetBoolean("Item.IsVisualizationToolLink")) {<text>target="_blank"</text>} 180 @if (!string.IsNullOrWhiteSpace(GetString("Item.OpenTrackingCategory"))) {<text>data-open-tracking-category='@GetString("Item.OpenTrackingCategory")'</text>} 181 @if (!string.IsNullOrWhiteSpace(GetString("Item.OpenTrackingAction"))) {<text>data-open-tracking-action='@GetString("Item.OpenTrackingAction")'</text>}><span class='icon @iconClass'> 182 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) 183 </span><h2> 184 @GetString("Item.Header").Replace("[RTXXX]",@productnumber) 185 <span>@GetString("Item.Subheader").Replace("[RTXXX]",@productnumber)</span></h2><h2><span>@GetString("Item.MobileHeader").Replace("[RTXXX]",@productnumber)</span></h2> 186 @if (GetString("Item.Type") == "link") { 187 <span><span class="arrow-link"> 188 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { 189 <span> 190 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 191 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 192 </span> 193 } 194 </span> 195 @GetString("Item.LinkText") 196 </span> 197 } else if (GetString("Item.Type") == "modal-form") { 198 <span><span class="arrow-link"> 199 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { 200 <span> 201 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 202 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 203 </span> 204 } 205 </span> 206 @GetString("Item.FormLinkText") 207 </span> 208 } 209 </a> 210 } 211 </div></div> 212
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_6c1752c73e9941a49922384a344c5dd5.Execute() in E:\dynamicweb.net\Solutions\randerstegl.net.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.b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   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 <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"> 12 @{ 13 bool islink = false; 14 string link = ""; 15 16 if (GetString("Item.Type") == "link") { 17 islink = true; 18 link = GetString("Item.Link"); 19 bool hasparameter = false; 20 21 if (GetBoolean("Item.IncludeRTNumberInURL")) { 22 link += (GetString("Item.Link").Contains("?") ? "&" : "?") + GetString("Item.URLParameterName") + "=" + productnumber.Replace(" ",""); 23 24 hasparameter = true; 25 } 26 27 if (GetBoolean("Item.IsVisualizationToolLink")) { 28 string brick = p.ProductFieldValues.GetProductFieldValue("VisualizationBrick").Value.ToString(); 29 string groove = p.ProductFieldValues.GetProductFieldValue("VisualizationGroove").Value.ToString(); 30 string linking = p.ProductFieldValues.GetProductFieldValue("VisualizationLinking").Value.ToString(); 31 string paving = p.ProductFieldValues.GetProductFieldValue("VisualizationPaving").Value.ToString(); 32 string roof = p.ProductFieldValues.GetProductFieldValue("VisualizationRoof").Value.ToString(); 33 string house = p.ProductFieldValues.GetProductFieldValue("VisualizationHouse").Value.ToString(); 34 string windows = p.ProductFieldValues.GetProductFieldValue("VisualizationWindows").Value.ToString(); 35 string rnd = p.ProductFieldValues.GetProductFieldValue("VisualizationRnd").Value.ToString(); 36 string viewmode = p.ProductFieldValues.GetProductFieldValue("VisualizationViewmode").Value.ToString(); 37 38 if (categoryName == "mursten") { 39 link += "#brick=" + productnumber.Replace(" ",""); 40 } else if (!string.IsNullOrWhiteSpace(brick)) { 41 link += "#brick=" + brick; 42 } else { 43 link += "#brick=RT522"; 44 } 45 46 if (!string.IsNullOrWhiteSpace(groove)) { 47 link += "&groove=" + groove; 48 } 49 50 if (!string.IsNullOrWhiteSpace(linking)) { 51 link += "&linking=" + linking; 52 } 53 54 if (!string.IsNullOrWhiteSpace(paving)) { 55 link += "&paving=" + paving; 56 } 57 58 if (categoryName == "tagsten") { 59 link += "&roof=" + productnumber.Replace(" ","_"); 60 } else if (!string.IsNullOrWhiteSpace(roof)) { 61 link += "&roof=" + roof; 62 } 63 64 if (!string.IsNullOrWhiteSpace(house)) { 65 link += "&house=" + house; 66 } else if (categoryName == "tagsten") { 67 link += "&house=05"; 68 } 69 70 if (!string.IsNullOrWhiteSpace(windows)) { 71 link += "&windows=" + windows; 72 } 73 74 if (!string.IsNullOrWhiteSpace(rnd)) { 75 link += "&rnd=" + rnd; 76 } 77 78 if (!string.IsNullOrWhiteSpace(viewmode)) { 79 link += "&viewmode=" + viewmode; 80 } else { 81 link += "&viewmode=house"; 82 } 83 } 84 } 85 86 string iconClass = GetString("Item.Icon"); 87 iconClass = iconClass.Substring(iconClass.LastIndexOf("/") + 1); 88 iconClass = iconClass.Replace(".svg",""); 89 } 90 @if (GetString("Item.Type") == "inline-form" || GetString("Item.Type") == "custom") { 91 if (GetString("Item.Type") == "inline-form") { 92 <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'> 93 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) 94 </span><h2> 95 @GetString("Item.Header").Replace("[RTXXX]",@productnumber) 96 <span>@GetString("Item.Subheader").Replace("[RTXXX]",@productnumber)</span></h2> 97 @if (GetBoolean("Item.IsReferenceForm")) { 98 if (p.ProductFieldValues.GetProductFieldValue("ShowNewReferenceTool").Value.ToString() == "True") { 99 <text>@RenderParagraphContent(GetInteger("Item.FormParagraph"))</text> 100 } else { 101 <span><span class="arrow-link"> 102 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { 103 <span> 104 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 105 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 106 </span> 107 } 108 </span> 109 @Translate("RT-2.0_Spørg_på_referenceadresser") 110 </span> 111 } 112 113 } else { 114 <text>@RenderParagraphContent(GetInteger("Item.FormParagraph"))</text> 115 } 116 </a><a class="mobile-link" 117 118 @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'> 119 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) 120 </span> 121 @if (GetBoolean("Item.IsReferenceForm")) { 122 if (p.ProductFieldValues.GetProductFieldValue("ShowNewReferenceTool").Value.ToString() == "True") { 123 <h2><span>@GetString("Item.MobileHeader").Replace("[RTXXX]",@productnumber)</span></h2> 124 } else { 125 <h2><span>@Translate("RT-2.0_Spørg_på_referenceadresser")</span></h2> 126 } 127 } else { 128 <h2><span>@GetString("Item.MobileHeader").Replace("[RTXXX]",@productnumber)</span></h2> 129 } 130 </a> 131 @SnippetStart("Modals") 132 <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"> 133 @GetString("Item.Header").Replace("[RTXXX]",@productnumber) 134 <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"> 135 @RenderParagraphContent(GetInteger("Item.FormParagraph")) 136 </div><span class="icon-close"> 137 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))) { 138 <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))</text> 139 } 140 </span></div> 141 @SnippetEnd("Modals") 142 } else { 143 <a class="tablet-desktop-link" @if(!string.IsNullOrWhiteSpace(GetString("Item.LinkTitle"))) {<text>title='@GetString("Item.LinkTitle")'</text>}><span class='icon @iconClass'> 144 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) 145 </span><h2> 146 @GetString("Item.Header").Replace("[RTXXX]",@productnumber) 147 <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"> 148 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { 149 <span> 150 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 151 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 152 </span> 153 } 154 </button></div></form></a><a class="mobile-link" data-target='product-modal-@GetString("Item.Id")'><span class='icon @iconClass'> 155 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) 156 </span><h2><span>@GetString("Item.MobileHeader").Replace("[RTXXX]",@productnumber)</span></h2></a> 157 @SnippetStart("Modals") 158 <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"> 159 @GetString("Item.Header").Replace("[RTXXX]",@productnumber) 160 <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"> 161 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { 162 <span> 163 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 164 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 165 </span> 166 } 167 </button></div></form></div><span class="icon-close"> 168 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))) { 169 <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))</text> 170 } 171 </span></div> 172 @SnippetEnd("Modals") 173 } 174 } else { 175 <a @if(GetString("Item.Type") == "link") {<text>href=@link</text>} 176 @if(!string.IsNullOrWhiteSpace(GetString("Item.LinkTitle"))) {<text>title='@GetString("Item.LinkTitle")'</text>} 177 @if(GetString("Item.Type") == "modal-form") {<text>data-target='modal-@GetString("Item.ModalFormParagraph")'</text>} 178 @(GetString("Item.ActionID") == "samples" ? "data-callback='hubspotLoad'" : null) 179 @if (GetBoolean("Item.IsVisualizationToolLink")) {<text>target="_blank"</text>} 180 @if (!string.IsNullOrWhiteSpace(GetString("Item.OpenTrackingCategory"))) {<text>data-open-tracking-category='@GetString("Item.OpenTrackingCategory")'</text>} 181 @if (!string.IsNullOrWhiteSpace(GetString("Item.OpenTrackingAction"))) {<text>data-open-tracking-action='@GetString("Item.OpenTrackingAction")'</text>}><span class='icon @iconClass'> 182 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) 183 </span><h2> 184 @GetString("Item.Header").Replace("[RTXXX]",@productnumber) 185 <span>@GetString("Item.Subheader").Replace("[RTXXX]",@productnumber)</span></h2><h2><span>@GetString("Item.MobileHeader").Replace("[RTXXX]",@productnumber)</span></h2> 186 @if (GetString("Item.Type") == "link") { 187 <span><span class="arrow-link"> 188 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { 189 <span> 190 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 191 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 192 </span> 193 } 194 </span> 195 @GetString("Item.LinkText") 196 </span> 197 } else if (GetString("Item.Type") == "modal-form") { 198 <span><span class="arrow-link"> 199 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { 200 <span> 201 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 202 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 203 </span> 204 } 205 </span> 206 @GetString("Item.FormLinkText") 207 </span> 208 } 209 </a> 210 } 211 </div></div> 212
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_6c1752c73e9941a49922384a344c5dd5.Execute() in E:\dynamicweb.net\Solutions\randerstegl.net.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.b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   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 <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"> 12 @{ 13 bool islink = false; 14 string link = ""; 15 16 if (GetString("Item.Type") == "link") { 17 islink = true; 18 link = GetString("Item.Link"); 19 bool hasparameter = false; 20 21 if (GetBoolean("Item.IncludeRTNumberInURL")) { 22 link += (GetString("Item.Link").Contains("?") ? "&" : "?") + GetString("Item.URLParameterName") + "=" + productnumber.Replace(" ",""); 23 24 hasparameter = true; 25 } 26 27 if (GetBoolean("Item.IsVisualizationToolLink")) { 28 string brick = p.ProductFieldValues.GetProductFieldValue("VisualizationBrick").Value.ToString(); 29 string groove = p.ProductFieldValues.GetProductFieldValue("VisualizationGroove").Value.ToString(); 30 string linking = p.ProductFieldValues.GetProductFieldValue("VisualizationLinking").Value.ToString(); 31 string paving = p.ProductFieldValues.GetProductFieldValue("VisualizationPaving").Value.ToString(); 32 string roof = p.ProductFieldValues.GetProductFieldValue("VisualizationRoof").Value.ToString(); 33 string house = p.ProductFieldValues.GetProductFieldValue("VisualizationHouse").Value.ToString(); 34 string windows = p.ProductFieldValues.GetProductFieldValue("VisualizationWindows").Value.ToString(); 35 string rnd = p.ProductFieldValues.GetProductFieldValue("VisualizationRnd").Value.ToString(); 36 string viewmode = p.ProductFieldValues.GetProductFieldValue("VisualizationViewmode").Value.ToString(); 37 38 if (categoryName == "mursten") { 39 link += "#brick=" + productnumber.Replace(" ",""); 40 } else if (!string.IsNullOrWhiteSpace(brick)) { 41 link += "#brick=" + brick; 42 } else { 43 link += "#brick=RT522"; 44 } 45 46 if (!string.IsNullOrWhiteSpace(groove)) { 47 link += "&groove=" + groove; 48 } 49 50 if (!string.IsNullOrWhiteSpace(linking)) { 51 link += "&linking=" + linking; 52 } 53 54 if (!string.IsNullOrWhiteSpace(paving)) { 55 link += "&paving=" + paving; 56 } 57 58 if (categoryName == "tagsten") { 59 link += "&roof=" + productnumber.Replace(" ","_"); 60 } else if (!string.IsNullOrWhiteSpace(roof)) { 61 link += "&roof=" + roof; 62 } 63 64 if (!string.IsNullOrWhiteSpace(house)) { 65 link += "&house=" + house; 66 } else if (categoryName == "tagsten") { 67 link += "&house=05"; 68 } 69 70 if (!string.IsNullOrWhiteSpace(windows)) { 71 link += "&windows=" + windows; 72 } 73 74 if (!string.IsNullOrWhiteSpace(rnd)) { 75 link += "&rnd=" + rnd; 76 } 77 78 if (!string.IsNullOrWhiteSpace(viewmode)) { 79 link += "&viewmode=" + viewmode; 80 } else { 81 link += "&viewmode=house"; 82 } 83 } 84 } 85 86 string iconClass = GetString("Item.Icon"); 87 iconClass = iconClass.Substring(iconClass.LastIndexOf("/") + 1); 88 iconClass = iconClass.Replace(".svg",""); 89 } 90 @if (GetString("Item.Type") == "inline-form" || GetString("Item.Type") == "custom") { 91 if (GetString("Item.Type") == "inline-form") { 92 <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'> 93 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) 94 </span><h2> 95 @GetString("Item.Header").Replace("[RTXXX]",@productnumber) 96 <span>@GetString("Item.Subheader").Replace("[RTXXX]",@productnumber)</span></h2> 97 @if (GetBoolean("Item.IsReferenceForm")) { 98 if (p.ProductFieldValues.GetProductFieldValue("ShowNewReferenceTool").Value.ToString() == "True") { 99 <text>@RenderParagraphContent(GetInteger("Item.FormParagraph"))</text> 100 } else { 101 <span><span class="arrow-link"> 102 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { 103 <span> 104 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 105 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 106 </span> 107 } 108 </span> 109 @Translate("RT-2.0_Spørg_på_referenceadresser") 110 </span> 111 } 112 113 } else { 114 <text>@RenderParagraphContent(GetInteger("Item.FormParagraph"))</text> 115 } 116 </a><a class="mobile-link" 117 118 @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'> 119 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) 120 </span> 121 @if (GetBoolean("Item.IsReferenceForm")) { 122 if (p.ProductFieldValues.GetProductFieldValue("ShowNewReferenceTool").Value.ToString() == "True") { 123 <h2><span>@GetString("Item.MobileHeader").Replace("[RTXXX]",@productnumber)</span></h2> 124 } else { 125 <h2><span>@Translate("RT-2.0_Spørg_på_referenceadresser")</span></h2> 126 } 127 } else { 128 <h2><span>@GetString("Item.MobileHeader").Replace("[RTXXX]",@productnumber)</span></h2> 129 } 130 </a> 131 @SnippetStart("Modals") 132 <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"> 133 @GetString("Item.Header").Replace("[RTXXX]",@productnumber) 134 <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"> 135 @RenderParagraphContent(GetInteger("Item.FormParagraph")) 136 </div><span class="icon-close"> 137 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))) { 138 <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))</text> 139 } 140 </span></div> 141 @SnippetEnd("Modals") 142 } else { 143 <a class="tablet-desktop-link" @if(!string.IsNullOrWhiteSpace(GetString("Item.LinkTitle"))) {<text>title='@GetString("Item.LinkTitle")'</text>}><span class='icon @iconClass'> 144 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) 145 </span><h2> 146 @GetString("Item.Header").Replace("[RTXXX]",@productnumber) 147 <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"> 148 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { 149 <span> 150 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 151 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 152 </span> 153 } 154 </button></div></form></a><a class="mobile-link" data-target='product-modal-@GetString("Item.Id")'><span class='icon @iconClass'> 155 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) 156 </span><h2><span>@GetString("Item.MobileHeader").Replace("[RTXXX]",@productnumber)</span></h2></a> 157 @SnippetStart("Modals") 158 <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"> 159 @GetString("Item.Header").Replace("[RTXXX]",@productnumber) 160 <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"> 161 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { 162 <span> 163 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 164 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 165 </span> 166 } 167 </button></div></form></div><span class="icon-close"> 168 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))) { 169 <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))</text> 170 } 171 </span></div> 172 @SnippetEnd("Modals") 173 } 174 } else { 175 <a @if(GetString("Item.Type") == "link") {<text>href=@link</text>} 176 @if(!string.IsNullOrWhiteSpace(GetString("Item.LinkTitle"))) {<text>title='@GetString("Item.LinkTitle")'</text>} 177 @if(GetString("Item.Type") == "modal-form") {<text>data-target='modal-@GetString("Item.ModalFormParagraph")'</text>} 178 @(GetString("Item.ActionID") == "samples" ? "data-callback='hubspotLoad'" : null) 179 @if (GetBoolean("Item.IsVisualizationToolLink")) {<text>target="_blank"</text>} 180 @if (!string.IsNullOrWhiteSpace(GetString("Item.OpenTrackingCategory"))) {<text>data-open-tracking-category='@GetString("Item.OpenTrackingCategory")'</text>} 181 @if (!string.IsNullOrWhiteSpace(GetString("Item.OpenTrackingAction"))) {<text>data-open-tracking-action='@GetString("Item.OpenTrackingAction")'</text>}><span class='icon @iconClass'> 182 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) 183 </span><h2> 184 @GetString("Item.Header").Replace("[RTXXX]",@productnumber) 185 <span>@GetString("Item.Subheader").Replace("[RTXXX]",@productnumber)</span></h2><h2><span>@GetString("Item.MobileHeader").Replace("[RTXXX]",@productnumber)</span></h2> 186 @if (GetString("Item.Type") == "link") { 187 <span><span class="arrow-link"> 188 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { 189 <span> 190 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 191 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 192 </span> 193 } 194 </span> 195 @GetString("Item.LinkText") 196 </span> 197 } else if (GetString("Item.Type") == "modal-form") { 198 <span><span class="arrow-link"> 199 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { 200 <span> 201 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 202 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 203 </span> 204 } 205 </span> 206 @GetString("Item.FormLinkText") 207 </span> 208 } 209 </a> 210 } 211 </div></div> 212
Wall bricks

Brick-built dwellings

The modern single-family home is brick-built. Buildings in brick are robust and are ideal for the Scandinavian climate because brick has properties unlike any other building materials. Brick-built dwellings have a healthy indoor climate, are energy-efficient and last for generations.

icon-arrow-right icon-arrow-right See why well-being is something you build

GET EXPERT GUIDANCE

Error executing template "Designs/randers-tegl/Forms/Form/rt-2.0.product-question-form-bottom.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
   at CompiledRazorTemplates.Dynamic.RazorEngine_9044a29db7274819bbd3327ac5210603.Execute() in E:\dynamicweb.net\Solutions\randerstegl.net.dynamicweb-cms.com\files\Templates\Designs\randers-tegl\Forms\Form\rt-2.0.product-question-form-bottom.cshtml:line 9
   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.b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()

1 @{ 2 int areaId = Dynamicweb.Frontend.PageView.Current().Area.ID; 3 string areaName = Dynamicweb.Frontend.PageView.Current().Area.Name; 4 5 string productid = System.Web.HttpContext.Current.Request.QueryString.Get("ProductID"); 6 7 Dynamicweb.Ecommerce.Products.Product p = Dynamicweb.Ecommerce.Services.Products.GetProductById(productid, "", true); 8 9 string productname = p.Name; 10 string productnumber = p.Number; 11 string path = Pageview.SearchFriendlyUrl; 12 } 13 14 @GetString("Form.FormStart") 15 @GetString("Form.SystemFields") 16 17 @if (GetBoolean("Form.Field.Sprog.Active")) { 18 <input type="hidden" name='@GetString("Form.Field.Sprog.SystemName")' value='@areaName' /> 19 } 20 @if (GetBoolean("Form.Field.Produktnavn.Active")) { 21 <input type="hidden" name='@GetString("Form.Field.Produktnavn.SystemName")' value='@productname' /> 22 } 23 @if (GetBoolean("Form.Field.Produktnr.Active")) { 24 <input type="hidden" name='@GetString("Form.Field.Produktnr.SystemName")' value='@productnumber' /> 25 } 26 @if (GetBoolean("Form.Field.formSubmitAction.Active")) { 27 <input type="hidden" name='@GetString("Form.Field.formSubmitAction.SystemName")' value="page" /> 28 } 29 @if (GetBoolean("Form.Field.formSubmitPageAfterSave.Active")) { 30 <input type="hidden" name='@GetString("Form.Field.formSubmitPageAfterSave.SystemName")' value='@("/Default.aspx?Id=")@Pageview.Page.ID@("&ProductId=")@System.Web.HttpContext.Current.Request.QueryString.Get("ProductID")@("&modal=question-thank-you#product-actions")' /> 31 } 32 33 @if (GetBoolean("Form.Field.Navn.Active")) { 34 @GetString("Form.Field.Navn.Prepend") 35 36 <fieldset class='@GetString("Form.Field.Navn.CssClass")'><input type="text" name='@GetString("Form.Field.Navn.SystemName")' placeholder='@GetString("Form.Field.Navn.Placeholder")' value='@GetString("Form.Field.Navn.ValueFromAutoOrDefault")' @(GetBoolean("Form.Field.Navn.Required") ? "required" : null ) aria-label='@GetString("Form.Field.Navn.Name")' /></fieldset> 37 38 @GetString("Form.Field.Navn.Append") 39 } 40 @if (GetBoolean("Form.Field.Firma.Active")) { 41 @GetString("Form.Field.Firma.Prepend") 42 43 <fieldset class='@GetString("Form.Field.Firma.CssClass")'><input type="text" name='@GetString("Form.Field.Firma.SystemName")' placeholder='@GetString("Form.Field.Firma.Placeholder")' value='@GetString("Form.Field.Firma.ValueFromAutoOrDefault")' @(GetBoolean("Form.Field.Firma.Required") ? "required" : null ) aria-label='@GetString("Form.Field.Firma.Name")' /></fieldset> 44 45 @GetString("Form.Field.Firma.Append") 46 } 47 @if (GetBoolean("Form.Field.Telefon.Active")) { 48 @GetString("Form.Field.Telefon.Prepend") 49 50 <fieldset class='@GetString("Form.Field.Telefon.CssClass")'><input type="text" name='@GetString("Form.Field.Telefon.SystemName")' placeholder='@GetString("Form.Field.Telefon.Placeholder")' value='@GetString("Form.Field.Telefon.ValueFromAutoOrDefault")' @(GetBoolean("Form.Field.Telefon.Required") ? "required" : null ) aria-label='@GetString("Form.Field.Telefon.Name")' /></fieldset> 51 52 @GetString("Form.Field.Telefon.Append") 53 } 54 @if (GetBoolean("Form.Field.Email.Active")) { 55 @GetString("Form.Field.Email.Prepend") 56 57 <fieldset class='@GetString("Form.Field.Email.CssClass")'><input type="email" name='@GetString("Form.Field.Email.SystemName")' placeholder='@GetString("Form.Field.Email.Placeholder")' value='@GetString("Form.Field.Email.ValueFromAutoOrDefault")' @(GetBoolean("Form.Field.Email.Required") ? "required" : null ) aria-label='@GetString("Form.Field.Email.Name")' /></fieldset> 58 59 @GetString("Form.Field.Email.Append") 60 } 61 @if (GetBoolean("Form.Field.Spoergsmaal.Active")) { 62 @GetString("Form.Field.Spoergsmaal.Prepend") 63 64 <fieldset class='@GetString("Form.Field.Spoergsmaal.CssClass")'><textarea name='@GetString("Form.Field.Spoergsmaal.SystemName")' @(!string.IsNullOrWhiteSpace(GetString("Form.Field.Spoergsmaal.TextareaHeight")) ? "rows='" + GetString("Form.Field.Spoergsmaal.TextareaHeight") + "'" : null ) placeholder='@GetString("Form.Field.Spoergsmaal.Placeholder")' @(GetBoolean("Form.Field.Spoergsmaal.Required") ? "required" : null ) aria-label='@GetString("Form.Field.Spoergsmaal.Name")'>@GetString("Form.Field.Spoergsmaal.ValueFromAutoOrDefault")</textarea></fieldset> 65 66 @GetString("Form.Field.Spoergsmaal.Append") 67 } 68 @if (GetBoolean("Form.Field.SamtykkeHenvendelse.Active")) { 69 @GetString("Form.Field.SamtykkeHenvendelse.Prepend") 70 71 <fieldset class='@GetString("Form.Field.SamtykkeHenvendelse.CssClass")'><input type='@GetString("Form.Field.SamtykkeHenvendelse.Type").ToLower()' name='@GetString("Form.Field.SamtykkeHenvendelse.SystemName")' id='@GetString("Form.Field.SamtykkeHenvendelse.HtmlId")' value='@GetString("Form.Field.SamtykkeHenvendelse.ValueFromAutoOrDefault")' @(GetBoolean("Form.Field.SamtykkeHenvendelse.Required") ? "required" : null ) /><label for='@GetString("Form.Field.SamtykkeHenvendelse.HtmlId")'>@GetString("Form.Field.SamtykkeHenvendelse.Description")</label></fieldset> 72 73 @GetString("Form.Field.SamtykkeHenvendelse.Append") 74 } 75 @if (GetBoolean("Form.Field.Sendspoergsmaal.Active")) { 76 @GetString("Form.Field.Sendspoergsmaal.Prepend") 77 78 <fieldset class='@GetString("Form.Field.Sendspoergsmaal.CssClass")'><button>@GetString("Form.Field.Sendspoergsmaal.Name")</button></fieldset> 79 80 @GetString("Form.Field.Sendspoergsmaal.Append") 81 } 82 @GetString("Form.FormEnd") 83