Højslev Lille Dansk format

Antracit engoberet vingetagsten


Pris fra kr.105,60 pr. stk. Gå til produktside
RT 822 Højslev Lille Dansk format
Højslev Normalformat

Rød vingetagsten


Pris fra kr.98,40 pr. stk. Gå til produktside
RT 801 Højslev Normalformat
Højslev Lille Dansk Format

Højslev Lille Dansk Håndbearbejdet
 


Pris fra kr.260,80 pr. stk. Gå til produktside
RT 805 Højslev Lille Dansk Format
Højslev Lille Dansk Format

Rød vingetagsten


Pris fra kr.105,60 pr. stk. Gå til produktside
RT 806 Højslev Lille Dansk Format
Højslev Lille Dansk format

Brun vingetagsten


Pris fra kr.166,40 pr. stk. Gå til produktside
RT 807 Højslev Lille Dansk format
Højslev Lille Dansk format

Blådæmpet vingetagsten


Pris fra kr.253,60 pr. stk. Gå til produktside
RT 810 Højslev Lille Dansk format
Højslev Lille Dansk format

Gul vingetagsten


Pris fra kr.245,60 pr. stk. Gå til produktside
RT 811 Højslev Lille Dansk format
Højslev Lille Dansk format

Blådæmpet nuanceret vingetagsten


Pris fra kr.281,60 pr. stk. Gå til produktside
RT 820 Højslev Lille Dansk format
Højslev Lille Dansk format

Rød reduceret vingetagsten


Pris fra kr.153,60 pr. stk. Gå til produktside
RT 821 Højslev Lille Dansk format
Højslev Lille Dansk format

Sort engoberet vingetagsten


Pris fra kr.138,40 pr. stk. Gå til produktside
RT 840 Højslev Lille Dansk format

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

Testet af detSkandinaviske klima

Vores tagsten er hårdtbrændte og ekstremt formfaste, så de modstår selv den hårdeste vinterkulde. Det kalder vi frostgaranti.

icon-arrow-right icon-arrow-right Tagstensgaranti
Nyt tag

Den store guide til nyt tag

Et nyt tag er en stor investering, og det er derfor en beslutning, der skal træffes på det rigtige grundlag. Hvilket tag passer til dit hus, hvilke materialer skal du vælge, og hvordan sikrer du dig, at du overholder de gældende love og regler?

For at gøre processen mere overskuelig for dig, der planlægger at skifte tag på din bolig, har vi sammensat "Den store tagguide."

icon-arrow-right icon-arrow-right Se guiden til nyt tag

Få ekspertråd

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_8a85d49ce7bf4425924f5b07fb8be232.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