Gelb glatt

Strangpressziegel


Pris fra €360,00 pr. stk. Gå til produktside
RT 201 Alpha Gelb glatt
Gelb glatt geflammt

Strangpressziegel


Pris fra €395,00 pr. stk. Gå til produktside
RT 208 Alpha Gelb glatt geflammt
Rot glatt

Strangpressziegel


Pris fra €330,00 pr. stk. Gå til produktside
RT 301 Alpha Rot glatt
Rot

Wasserstrichziegel mit 4 Fassaden


Pris fra €460,00 pr. stk. Gå til produktside
RT 307HT Classica Rot
Rotbunt geflammt

Wasserstrichziegel mit 4 Fassaden


Pris fra €490,00 pr. stk. Gå til produktside
RT 406 Classica Rotbunt geflammt
Gelb Malakit

Wasserstrichziegel


Pris fra €490,00 pr. stk. Gå til produktside
RT 412 Classica Gelb Malakit
Rotbunt

Wasserstrichziegel


Pris fra €490,00 pr. stk. Gå til produktside
RT 418 Classica Rotbunt
Lava

Wasserstrichziegel mit 4 Fassaden


Pris fra €560,00 pr. stk. Gå til produktside
RT 434 Prima Lava
Rosé

Wasserstrichziegel mit 4 Fassaden


Pris fra €490,00 pr. stk. Gå til produktside
RT 435 Classica Rosé
Rotbunt

Wasserstrichziegel mit 4 Fassaden


Pris fra €490,00 pr. stk. Gå til produktside
RT 436 Classica Rotbunt

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

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

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

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

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

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

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

Komplettgemauerter Bau

Dieses moderne Einfamilienhaus ist komplett gemauert. Komplett gemauerte Gebäude sind robust und halten auch raueren Klimabedingungen stand, da der Ziegel gegenüber anderen Baumaterialien einzigartige Vorteile hat. Komplett gemauerte Wände tragen zu einem gesunden Raumklima, zu Energiefreundlichkeit und zu Haltbarkeit über mehrere Generationen hinweg bei.

icon-arrow-right icon-arrow-right Warum ist Wohlbefinden etwas, das man baut?
Pflasterung

GemütlicheEcke

Träumen Sie von einer gemütlichen Ecke für die lauen Sommernächte? Stilvolle, mit Ziegeln gepflasterte Außenbereiche schaffen kleine Oasen zur Erholung, die generationenlang Freude bereiten. Die Pflasterung mit echten Ziegeln ist nämlich ein extrem robustes Naturmaterial, das so gut wie nicht gewartet werden muss und mit der Zeit eine hübsche Patina bekommt.

icon-arrow-right icon-arrow-right Lassen Sie den Traum von einer neuen Terrasse wahr werden

Hier bekommen Sie Experten-Tipps

Diese Website ist durch reCAPTCHA geschützt, hierfür gelten die Datenschutzbestimmungen und Nutzungsbedingungen von Google.