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_8894369f45654c4d8c6e4516fee4271b.Execute() in E:\dynamicweb.net\Solutions\randerstegl.net.dynamicweb-cms.com\files\Templates\Designs\randers-tegl\Paragraph\rt-2.0.product-action.cshtml:line 6 at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader) at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag) at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<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 @{ string productid = System.Web.HttpContext.Current.Request.QueryString.Get("ProductID"); Dynamicweb.Ecommerce.Products.Product p = Dynamicweb.Ecommerce.Services.Products.GetProductById(productid, "", false); string productname = p.Name; string productnumber = p.Number; string categoryName = p.Groups[0].Name.ToLower(); } @if (!GetString("Item.ExcludeProducts").Contains(productnumber)) { <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"> @{ bool islink = false; string link = ""; if (GetString("Item.Type") == "link") { islink = true; link = GetString("Item.Link"); bool hasparameter = false; if (GetBoolean("Item.IncludeRTNumberInURL")) { link += (GetString("Item.Link").Contains("?") ? "&" : "?"); if (!string.IsNullOrWhiteSpace(GetString("Item.URLParameterName"))) { link += GetString("Item.URLParameterName") + "=" + productnumber.Replace(" ",""); } else { link += "ProductID=" + productid; } hasparameter = true; } if (GetBoolean("Item.IsVisualizationToolLink")) { string brick = p.ProductFieldValues.GetProductFieldValue("VisualizationBrick").Value.ToString(); string groove = p.ProductFieldValues.GetProductFieldValue("VisualizationGroove").Value.ToString(); string linking = p.ProductFieldValues.GetProductFieldValue("VisualizationLinking").Value.ToString(); string paving = p.ProductFieldValues.GetProductFieldValue("VisualizationPaving").Value.ToString(); string roof = p.ProductFieldValues.GetProductFieldValue("VisualizationRoof").Value.ToString(); string house = p.ProductFieldValues.GetProductFieldValue("VisualizationHouse").Value.ToString(); string windows = p.ProductFieldValues.GetProductFieldValue("VisualizationWindows").Value.ToString(); string rnd = p.ProductFieldValues.GetProductFieldValue("VisualizationRnd").Value.ToString(); string viewmode = p.ProductFieldValues.GetProductFieldValue("VisualizationViewmode").Value.ToString(); if (categoryName == "mursten") { link += "#brick=" + productnumber.Replace(" ",""); } else if (!string.IsNullOrWhiteSpace(brick)) { link += "#brick=" + brick; } else { link += "#brick=RT522"; } if (!string.IsNullOrWhiteSpace(groove)) { link += "&groove=" + groove; } if (!string.IsNullOrWhiteSpace(linking)) { link += "&linking=" + linking; } if (!string.IsNullOrWhiteSpace(paving)) { link += "&paving=" + paving; } if (categoryName == "tagsten") { link += "&roof=" + productnumber.Replace(" ","_"); } else if (!string.IsNullOrWhiteSpace(roof)) { link += "&roof=" + roof; } if (!string.IsNullOrWhiteSpace(house)) { link += "&house=" + house; } else if (categoryName == "tagsten") { link += "&house=05"; } if (!string.IsNullOrWhiteSpace(windows)) { link += "&windows=" + windows; } if (!string.IsNullOrWhiteSpace(rnd)) { link += "&rnd=" + rnd; } if (!string.IsNullOrWhiteSpace(viewmode)) { link += "&viewmode=" + viewmode; } else { link += "&viewmode=house"; } } if (GetBoolean("Item.IsTextureToolLink")) { string groove = p.ProductFieldValues.GetProductFieldValue("VisualizationGroove").Value.ToString(); string linking = p.ProductFieldValues.GetProductFieldValue("VisualizationLinking").Value.ToString(); string viewmode = p.ProductFieldValues.GetProductFieldValue("VisualizationViewmode").Value.ToString(); if (categoryName == "mursten") { link += "#brick=" + productnumber.Replace(" ",""); } else { link += "#brick=RT522"; } if (!string.IsNullOrWhiteSpace(groove)) { link += "&groove=" + groove; } if (!string.IsNullOrWhiteSpace(linking)) { link += "&linking=" + linking; } if (!string.IsNullOrWhiteSpace(viewmode)) { link += "&viewmode=" + viewmode; } else { link += "&viewmode=wall"; } } } string iconClass = GetString("Item.Icon"); iconClass = iconClass.Substring(iconClass.LastIndexOf("/") + 1); iconClass = iconClass.Replace(".svg",""); } @if (GetString("Item.Type") == "inline-form" || GetString("Item.Type") == "custom") { if (GetString("Item.Type") == "inline-form") { <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'> @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) </span><h2> @GetString("Item.Header").Replace("[RTXXX]",@productnumber) <span>@GetString("Item.Subheader").Replace("[RTXXX]",@productnumber)</span></h2> @if (GetBoolean("Item.IsReferenceForm")) { if (p.ProductFieldValues.GetProductFieldValue("ShowNewReferenceTool").Value.ToString() == "True") { <text>@RenderParagraphContent(GetInteger("Item.FormParagraph"))</text> } else { <span><span class="arrow-link"> @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { <span> @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) </span> } </span> @Translate("RT-2.0_Spørg_på_referenceadresser") </span> } } else { <text>@RenderParagraphContent(GetInteger("Item.FormParagraph"))</text> } </a><a class="mobile-link" @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'> @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) </span> @if (GetBoolean("Item.IsReferenceForm")) { if (p.ProductFieldValues.GetProductFieldValue("ShowNewReferenceTool").Value.ToString() == "True") { <h2><span>@GetString("Item.MobileHeader").Replace("[RTXXX]",@productnumber)</span></h2> } else { <h2><span>@Translate("RT-2.0_Spørg_på_referenceadresser")</span></h2> } } else { <h2><span>@GetString("Item.MobileHeader").Replace("[RTXXX]",@productnumber)</span></h2> } </a> @SnippetStart("Modals") <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"> @GetString("Item.Header").Replace("[RTXXX]",@productnumber) <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"> @RenderParagraphContent(GetInteger("Item.FormParagraph")) </div><span class="icon-close"> @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))) { <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))</text> } </span></div> @SnippetEnd("Modals") } else { <a class="tablet-desktop-link" @if(!string.IsNullOrWhiteSpace(GetString("Item.LinkTitle"))) {<text>title='@GetString("Item.LinkTitle")'</text>}><span class='icon @iconClass'> @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) </span><h2> @GetString("Item.Header").Replace("[RTXXX]",@productnumber) <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"> @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { <span> @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) </span> } </button></div></form></a><a class="mobile-link" data-target='product-modal-@GetString("Item.Id")'><span class='icon @iconClass'> @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) </span><h2><span>@GetString("Item.MobileHeader").Replace("[RTXXX]",@productnumber)</span></h2></a> @SnippetStart("Modals") <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"> @GetString("Item.Header").Replace("[RTXXX]",@productnumber) <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"> @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { <span> @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) </span> } </button></div></form></div><span class="icon-close"> @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))) { <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))</text> } </span></div> @SnippetEnd("Modals") } } else { <a @if(GetString("Item.Type") == "link") {<text>href=@link</text>} @if(!string.IsNullOrWhiteSpace(GetString("Item.LinkTitle"))) {<text>title='@GetString("Item.LinkTitle")'</text>} @if(GetString("Item.Type") == "modal-form") {<text>data-target='modal-@GetString("Item.ModalFormParagraph")'</text>} @(GetString("Item.ActionID") == "samples" ? "data-callback='hubspotLoad'" : null) @if (GetBoolean("Item.IsVisualizationToolLink")) {<text>target="_blank"</text>} @if (!string.IsNullOrWhiteSpace(GetString("Item.OpenTrackingCategory"))) {<text>data-open-tracking-category='@GetString("Item.OpenTrackingCategory")'</text>} @if (!string.IsNullOrWhiteSpace(GetString("Item.OpenTrackingAction"))) {<text>data-open-tracking-action='@GetString("Item.OpenTrackingAction")'</text>}><span class='icon @iconClass'> @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) </span><h2> @GetString("Item.Header").Replace("[RTXXX]",@productnumber) <span>@GetString("Item.Subheader").Replace("[RTXXX]",@productnumber)</span></h2><h2><span>@GetString("Item.MobileHeader").Replace("[RTXXX]",@productnumber)</span></h2> @if (GetString("Item.Type") == "link") { <span><span class="arrow-link"> @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { <span> @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) </span> } </span> @GetString("Item.LinkText") </span> } else if (GetString("Item.Type") == "modal-form") { <span><span class="arrow-link"> @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { <span> @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) </span> } </span> @GetString("Item.FormLinkText") </span> } </a> } </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_8894369f45654c4d8c6e4516fee4271b.Execute() in E:\dynamicweb.net\Solutions\randerstegl.net.dynamicweb-cms.com\files\Templates\Designs\randers-tegl\Paragraph\rt-2.0.product-action.cshtml:line 6 at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader) at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag) at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<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 @{ string productid = System.Web.HttpContext.Current.Request.QueryString.Get("ProductID"); Dynamicweb.Ecommerce.Products.Product p = Dynamicweb.Ecommerce.Services.Products.GetProductById(productid, "", false); string productname = p.Name; string productnumber = p.Number; string categoryName = p.Groups[0].Name.ToLower(); } @if (!GetString("Item.ExcludeProducts").Contains(productnumber)) { <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"> @{ bool islink = false; string link = ""; if (GetString("Item.Type") == "link") { islink = true; link = GetString("Item.Link"); bool hasparameter = false; if (GetBoolean("Item.IncludeRTNumberInURL")) { link += (GetString("Item.Link").Contains("?") ? "&" : "?"); if (!string.IsNullOrWhiteSpace(GetString("Item.URLParameterName"))) { link += GetString("Item.URLParameterName") + "=" + productnumber.Replace(" ",""); } else { link += "ProductID=" + productid; } hasparameter = true; } if (GetBoolean("Item.IsVisualizationToolLink")) { string brick = p.ProductFieldValues.GetProductFieldValue("VisualizationBrick").Value.ToString(); string groove = p.ProductFieldValues.GetProductFieldValue("VisualizationGroove").Value.ToString(); string linking = p.ProductFieldValues.GetProductFieldValue("VisualizationLinking").Value.ToString(); string paving = p.ProductFieldValues.GetProductFieldValue("VisualizationPaving").Value.ToString(); string roof = p.ProductFieldValues.GetProductFieldValue("VisualizationRoof").Value.ToString(); string house = p.ProductFieldValues.GetProductFieldValue("VisualizationHouse").Value.ToString(); string windows = p.ProductFieldValues.GetProductFieldValue("VisualizationWindows").Value.ToString(); string rnd = p.ProductFieldValues.GetProductFieldValue("VisualizationRnd").Value.ToString(); string viewmode = p.ProductFieldValues.GetProductFieldValue("VisualizationViewmode").Value.ToString(); if (categoryName == "mursten") { link += "#brick=" + productnumber.Replace(" ",""); } else if (!string.IsNullOrWhiteSpace(brick)) { link += "#brick=" + brick; } else { link += "#brick=RT522"; } if (!string.IsNullOrWhiteSpace(groove)) { link += "&groove=" + groove; } if (!string.IsNullOrWhiteSpace(linking)) { link += "&linking=" + linking; } if (!string.IsNullOrWhiteSpace(paving)) { link += "&paving=" + paving; } if (categoryName == "tagsten") { link += "&roof=" + productnumber.Replace(" ","_"); } else if (!string.IsNullOrWhiteSpace(roof)) { link += "&roof=" + roof; } if (!string.IsNullOrWhiteSpace(house)) { link += "&house=" + house; } else if (categoryName == "tagsten") { link += "&house=05"; } if (!string.IsNullOrWhiteSpace(windows)) { link += "&windows=" + windows; } if (!string.IsNullOrWhiteSpace(rnd)) { link += "&rnd=" + rnd; } if (!string.IsNullOrWhiteSpace(viewmode)) { link += "&viewmode=" + viewmode; } else { link += "&viewmode=house"; } } if (GetBoolean("Item.IsTextureToolLink")) { string groove = p.ProductFieldValues.GetProductFieldValue("VisualizationGroove").Value.ToString(); string linking = p.ProductFieldValues.GetProductFieldValue("VisualizationLinking").Value.ToString(); string viewmode = p.ProductFieldValues.GetProductFieldValue("VisualizationViewmode").Value.ToString(); if (categoryName == "mursten") { link += "#brick=" + productnumber.Replace(" ",""); } else { link += "#brick=RT522"; } if (!string.IsNullOrWhiteSpace(groove)) { link += "&groove=" + groove; } if (!string.IsNullOrWhiteSpace(linking)) { link += "&linking=" + linking; } if (!string.IsNullOrWhiteSpace(viewmode)) { link += "&viewmode=" + viewmode; } else { link += "&viewmode=wall"; } } } string iconClass = GetString("Item.Icon"); iconClass = iconClass.Substring(iconClass.LastIndexOf("/") + 1); iconClass = iconClass.Replace(".svg",""); } @if (GetString("Item.Type") == "inline-form" || GetString("Item.Type") == "custom") { if (GetString("Item.Type") == "inline-form") { <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'> @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) </span><h2> @GetString("Item.Header").Replace("[RTXXX]",@productnumber) <span>@GetString("Item.Subheader").Replace("[RTXXX]",@productnumber)</span></h2> @if (GetBoolean("Item.IsReferenceForm")) { if (p.ProductFieldValues.GetProductFieldValue("ShowNewReferenceTool").Value.ToString() == "True") { <text>@RenderParagraphContent(GetInteger("Item.FormParagraph"))</text> } else { <span><span class="arrow-link"> @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { <span> @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) </span> } </span> @Translate("RT-2.0_Spørg_på_referenceadresser") </span> } } else { <text>@RenderParagraphContent(GetInteger("Item.FormParagraph"))</text> } </a><a class="mobile-link" @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'> @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) </span> @if (GetBoolean("Item.IsReferenceForm")) { if (p.ProductFieldValues.GetProductFieldValue("ShowNewReferenceTool").Value.ToString() == "True") { <h2><span>@GetString("Item.MobileHeader").Replace("[RTXXX]",@productnumber)</span></h2> } else { <h2><span>@Translate("RT-2.0_Spørg_på_referenceadresser")</span></h2> } } else { <h2><span>@GetString("Item.MobileHeader").Replace("[RTXXX]",@productnumber)</span></h2> } </a> @SnippetStart("Modals") <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"> @GetString("Item.Header").Replace("[RTXXX]",@productnumber) <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"> @RenderParagraphContent(GetInteger("Item.FormParagraph")) </div><span class="icon-close"> @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))) { <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))</text> } </span></div> @SnippetEnd("Modals") } else { <a class="tablet-desktop-link" @if(!string.IsNullOrWhiteSpace(GetString("Item.LinkTitle"))) {<text>title='@GetString("Item.LinkTitle")'</text>}><span class='icon @iconClass'> @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) </span><h2> @GetString("Item.Header").Replace("[RTXXX]",@productnumber) <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"> @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { <span> @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) </span> } </button></div></form></a><a class="mobile-link" data-target='product-modal-@GetString("Item.Id")'><span class='icon @iconClass'> @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) </span><h2><span>@GetString("Item.MobileHeader").Replace("[RTXXX]",@productnumber)</span></h2></a> @SnippetStart("Modals") <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"> @GetString("Item.Header").Replace("[RTXXX]",@productnumber) <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"> @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { <span> @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) </span> } </button></div></form></div><span class="icon-close"> @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))) { <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))</text> } </span></div> @SnippetEnd("Modals") } } else { <a @if(GetString("Item.Type") == "link") {<text>href=@link</text>} @if(!string.IsNullOrWhiteSpace(GetString("Item.LinkTitle"))) {<text>title='@GetString("Item.LinkTitle")'</text>} @if(GetString("Item.Type") == "modal-form") {<text>data-target='modal-@GetString("Item.ModalFormParagraph")'</text>} @(GetString("Item.ActionID") == "samples" ? "data-callback='hubspotLoad'" : null) @if (GetBoolean("Item.IsVisualizationToolLink")) {<text>target="_blank"</text>} @if (!string.IsNullOrWhiteSpace(GetString("Item.OpenTrackingCategory"))) {<text>data-open-tracking-category='@GetString("Item.OpenTrackingCategory")'</text>} @if (!string.IsNullOrWhiteSpace(GetString("Item.OpenTrackingAction"))) {<text>data-open-tracking-action='@GetString("Item.OpenTrackingAction")'</text>}><span class='icon @iconClass'> @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) </span><h2> @GetString("Item.Header").Replace("[RTXXX]",@productnumber) <span>@GetString("Item.Subheader").Replace("[RTXXX]",@productnumber)</span></h2><h2><span>@GetString("Item.MobileHeader").Replace("[RTXXX]",@productnumber)</span></h2> @if (GetString("Item.Type") == "link") { <span><span class="arrow-link"> @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { <span> @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) </span> } </span> @GetString("Item.LinkText") </span> } else if (GetString("Item.Type") == "modal-form") { <span><span class="arrow-link"> @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { <span> @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) </span> } </span> @GetString("Item.FormLinkText") </span> } </a> } </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_8894369f45654c4d8c6e4516fee4271b.Execute() in E:\dynamicweb.net\Solutions\randerstegl.net.dynamicweb-cms.com\files\Templates\Designs\randers-tegl\Paragraph\rt-2.0.product-action.cshtml:line 6 at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader) at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag) at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<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 @{ string productid = System.Web.HttpContext.Current.Request.QueryString.Get("ProductID"); Dynamicweb.Ecommerce.Products.Product p = Dynamicweb.Ecommerce.Services.Products.GetProductById(productid, "", false); string productname = p.Name; string productnumber = p.Number; string categoryName = p.Groups[0].Name.ToLower(); } @if (!GetString("Item.ExcludeProducts").Contains(productnumber)) { <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"> @{ bool islink = false; string link = ""; if (GetString("Item.Type") == "link") { islink = true; link = GetString("Item.Link"); bool hasparameter = false; if (GetBoolean("Item.IncludeRTNumberInURL")) { link += (GetString("Item.Link").Contains("?") ? "&" : "?"); if (!string.IsNullOrWhiteSpace(GetString("Item.URLParameterName"))) { link += GetString("Item.URLParameterName") + "=" + productnumber.Replace(" ",""); } else { link += "ProductID=" + productid; } hasparameter = true; } if (GetBoolean("Item.IsVisualizationToolLink")) { string brick = p.ProductFieldValues.GetProductFieldValue("VisualizationBrick").Value.ToString(); string groove = p.ProductFieldValues.GetProductFieldValue("VisualizationGroove").Value.ToString(); string linking = p.ProductFieldValues.GetProductFieldValue("VisualizationLinking").Value.ToString(); string paving = p.ProductFieldValues.GetProductFieldValue("VisualizationPaving").Value.ToString(); string roof = p.ProductFieldValues.GetProductFieldValue("VisualizationRoof").Value.ToString(); string house = p.ProductFieldValues.GetProductFieldValue("VisualizationHouse").Value.ToString(); string windows = p.ProductFieldValues.GetProductFieldValue("VisualizationWindows").Value.ToString(); string rnd = p.ProductFieldValues.GetProductFieldValue("VisualizationRnd").Value.ToString(); string viewmode = p.ProductFieldValues.GetProductFieldValue("VisualizationViewmode").Value.ToString(); if (categoryName == "mursten") { link += "#brick=" + productnumber.Replace(" ",""); } else if (!string.IsNullOrWhiteSpace(brick)) { link += "#brick=" + brick; } else { link += "#brick=RT522"; } if (!string.IsNullOrWhiteSpace(groove)) { link += "&groove=" + groove; } if (!string.IsNullOrWhiteSpace(linking)) { link += "&linking=" + linking; } if (!string.IsNullOrWhiteSpace(paving)) { link += "&paving=" + paving; } if (categoryName == "tagsten") { link += "&roof=" + productnumber.Replace(" ","_"); } else if (!string.IsNullOrWhiteSpace(roof)) { link += "&roof=" + roof; } if (!string.IsNullOrWhiteSpace(house)) { link += "&house=" + house; } else if (categoryName == "tagsten") { link += "&house=05"; } if (!string.IsNullOrWhiteSpace(windows)) { link += "&windows=" + windows; } if (!string.IsNullOrWhiteSpace(rnd)) { link += "&rnd=" + rnd; } if (!string.IsNullOrWhiteSpace(viewmode)) { link += "&viewmode=" + viewmode; } else { link += "&viewmode=house"; } } if (GetBoolean("Item.IsTextureToolLink")) { string groove = p.ProductFieldValues.GetProductFieldValue("VisualizationGroove").Value.ToString(); string linking = p.ProductFieldValues.GetProductFieldValue("VisualizationLinking").Value.ToString(); string viewmode = p.ProductFieldValues.GetProductFieldValue("VisualizationViewmode").Value.ToString(); if (categoryName == "mursten") { link += "#brick=" + productnumber.Replace(" ",""); } else { link += "#brick=RT522"; } if (!string.IsNullOrWhiteSpace(groove)) { link += "&groove=" + groove; } if (!string.IsNullOrWhiteSpace(linking)) { link += "&linking=" + linking; } if (!string.IsNullOrWhiteSpace(viewmode)) { link += "&viewmode=" + viewmode; } else { link += "&viewmode=wall"; } } } string iconClass = GetString("Item.Icon"); iconClass = iconClass.Substring(iconClass.LastIndexOf("/") + 1); iconClass = iconClass.Replace(".svg",""); } @if (GetString("Item.Type") == "inline-form" || GetString("Item.Type") == "custom") { if (GetString("Item.Type") == "inline-form") { <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'> @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) </span><h2> @GetString("Item.Header").Replace("[RTXXX]",@productnumber) <span>@GetString("Item.Subheader").Replace("[RTXXX]",@productnumber)</span></h2> @if (GetBoolean("Item.IsReferenceForm")) { if (p.ProductFieldValues.GetProductFieldValue("ShowNewReferenceTool").Value.ToString() == "True") { <text>@RenderParagraphContent(GetInteger("Item.FormParagraph"))</text> } else { <span><span class="arrow-link"> @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { <span> @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) </span> } </span> @Translate("RT-2.0_Spørg_på_referenceadresser") </span> } } else { <text>@RenderParagraphContent(GetInteger("Item.FormParagraph"))</text> } </a><a class="mobile-link" @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'> @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) </span> @if (GetBoolean("Item.IsReferenceForm")) { if (p.ProductFieldValues.GetProductFieldValue("ShowNewReferenceTool").Value.ToString() == "True") { <h2><span>@GetString("Item.MobileHeader").Replace("[RTXXX]",@productnumber)</span></h2> } else { <h2><span>@Translate("RT-2.0_Spørg_på_referenceadresser")</span></h2> } } else { <h2><span>@GetString("Item.MobileHeader").Replace("[RTXXX]",@productnumber)</span></h2> } </a> @SnippetStart("Modals") <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"> @GetString("Item.Header").Replace("[RTXXX]",@productnumber) <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"> @RenderParagraphContent(GetInteger("Item.FormParagraph")) </div><span class="icon-close"> @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))) { <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))</text> } </span></div> @SnippetEnd("Modals") } else { <a class="tablet-desktop-link" @if(!string.IsNullOrWhiteSpace(GetString("Item.LinkTitle"))) {<text>title='@GetString("Item.LinkTitle")'</text>}><span class='icon @iconClass'> @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) </span><h2> @GetString("Item.Header").Replace("[RTXXX]",@productnumber) <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"> @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { <span> @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) </span> } </button></div></form></a><a class="mobile-link" data-target='product-modal-@GetString("Item.Id")'><span class='icon @iconClass'> @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) </span><h2><span>@GetString("Item.MobileHeader").Replace("[RTXXX]",@productnumber)</span></h2></a> @SnippetStart("Modals") <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"> @GetString("Item.Header").Replace("[RTXXX]",@productnumber) <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"> @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { <span> @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) </span> } </button></div></form></div><span class="icon-close"> @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))) { <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))</text> } </span></div> @SnippetEnd("Modals") } } else { <a @if(GetString("Item.Type") == "link") {<text>href=@link</text>} @if(!string.IsNullOrWhiteSpace(GetString("Item.LinkTitle"))) {<text>title='@GetString("Item.LinkTitle")'</text>} @if(GetString("Item.Type") == "modal-form") {<text>data-target='modal-@GetString("Item.ModalFormParagraph")'</text>} @(GetString("Item.ActionID") == "samples" ? "data-callback='hubspotLoad'" : null) @if (GetBoolean("Item.IsVisualizationToolLink")) {<text>target="_blank"</text>} @if (!string.IsNullOrWhiteSpace(GetString("Item.OpenTrackingCategory"))) {<text>data-open-tracking-category='@GetString("Item.OpenTrackingCategory")'</text>} @if (!string.IsNullOrWhiteSpace(GetString("Item.OpenTrackingAction"))) {<text>data-open-tracking-action='@GetString("Item.OpenTrackingAction")'</text>}><span class='icon @iconClass'> @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) </span><h2> @GetString("Item.Header").Replace("[RTXXX]",@productnumber) <span>@GetString("Item.Subheader").Replace("[RTXXX]",@productnumber)</span></h2><h2><span>@GetString("Item.MobileHeader").Replace("[RTXXX]",@productnumber)</span></h2> @if (GetString("Item.Type") == "link") { <span><span class="arrow-link"> @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { <span> @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) </span> } </span> @GetString("Item.LinkText") </span> } else if (GetString("Item.Type") == "modal-form") { <span><span class="arrow-link"> @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { <span> @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) </span> } </span> @GetString("Item.FormLinkText") </span> } </a> } </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_8894369f45654c4d8c6e4516fee4271b.Execute() in E:\dynamicweb.net\Solutions\randerstegl.net.dynamicweb-cms.com\files\Templates\Designs\randers-tegl\Paragraph\rt-2.0.product-action.cshtml:line 6 at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader) at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag) at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<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 @{ string productid = System.Web.HttpContext.Current.Request.QueryString.Get("ProductID"); Dynamicweb.Ecommerce.Products.Product p = Dynamicweb.Ecommerce.Services.Products.GetProductById(productid, "", false); string productname = p.Name; string productnumber = p.Number; string categoryName = p.Groups[0].Name.ToLower(); } @if (!GetString("Item.ExcludeProducts").Contains(productnumber)) { <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"> @{ bool islink = false; string link = ""; if (GetString("Item.Type") == "link") { islink = true; link = GetString("Item.Link"); bool hasparameter = false; if (GetBoolean("Item.IncludeRTNumberInURL")) { link += (GetString("Item.Link").Contains("?") ? "&" : "?"); if (!string.IsNullOrWhiteSpace(GetString("Item.URLParameterName"))) { link += GetString("Item.URLParameterName") + "=" + productnumber.Replace(" ",""); } else { link += "ProductID=" + productid; } hasparameter = true; } if (GetBoolean("Item.IsVisualizationToolLink")) { string brick = p.ProductFieldValues.GetProductFieldValue("VisualizationBrick").Value.ToString(); string groove = p.ProductFieldValues.GetProductFieldValue("VisualizationGroove").Value.ToString(); string linking = p.ProductFieldValues.GetProductFieldValue("VisualizationLinking").Value.ToString(); string paving = p.ProductFieldValues.GetProductFieldValue("VisualizationPaving").Value.ToString(); string roof = p.ProductFieldValues.GetProductFieldValue("VisualizationRoof").Value.ToString(); string house = p.ProductFieldValues.GetProductFieldValue("VisualizationHouse").Value.ToString(); string windows = p.ProductFieldValues.GetProductFieldValue("VisualizationWindows").Value.ToString(); string rnd = p.ProductFieldValues.GetProductFieldValue("VisualizationRnd").Value.ToString(); string viewmode = p.ProductFieldValues.GetProductFieldValue("VisualizationViewmode").Value.ToString(); if (categoryName == "mursten") { link += "#brick=" + productnumber.Replace(" ",""); } else if (!string.IsNullOrWhiteSpace(brick)) { link += "#brick=" + brick; } else { link += "#brick=RT522"; } if (!string.IsNullOrWhiteSpace(groove)) { link += "&groove=" + groove; } if (!string.IsNullOrWhiteSpace(linking)) { link += "&linking=" + linking; } if (!string.IsNullOrWhiteSpace(paving)) { link += "&paving=" + paving; } if (categoryName == "tagsten") { link += "&roof=" + productnumber.Replace(" ","_"); } else if (!string.IsNullOrWhiteSpace(roof)) { link += "&roof=" + roof; } if (!string.IsNullOrWhiteSpace(house)) { link += "&house=" + house; } else if (categoryName == "tagsten") { link += "&house=05"; } if (!string.IsNullOrWhiteSpace(windows)) { link += "&windows=" + windows; } if (!string.IsNullOrWhiteSpace(rnd)) { link += "&rnd=" + rnd; } if (!string.IsNullOrWhiteSpace(viewmode)) { link += "&viewmode=" + viewmode; } else { link += "&viewmode=house"; } } if (GetBoolean("Item.IsTextureToolLink")) { string groove = p.ProductFieldValues.GetProductFieldValue("VisualizationGroove").Value.ToString(); string linking = p.ProductFieldValues.GetProductFieldValue("VisualizationLinking").Value.ToString(); string viewmode = p.ProductFieldValues.GetProductFieldValue("VisualizationViewmode").Value.ToString(); if (categoryName == "mursten") { link += "#brick=" + productnumber.Replace(" ",""); } else { link += "#brick=RT522"; } if (!string.IsNullOrWhiteSpace(groove)) { link += "&groove=" + groove; } if (!string.IsNullOrWhiteSpace(linking)) { link += "&linking=" + linking; } if (!string.IsNullOrWhiteSpace(viewmode)) { link += "&viewmode=" + viewmode; } else { link += "&viewmode=wall"; } } } string iconClass = GetString("Item.Icon"); iconClass = iconClass.Substring(iconClass.LastIndexOf("/") + 1); iconClass = iconClass.Replace(".svg",""); } @if (GetString("Item.Type") == "inline-form" || GetString("Item.Type") == "custom") { if (GetString("Item.Type") == "inline-form") { <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'> @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) </span><h2> @GetString("Item.Header").Replace("[RTXXX]",@productnumber) <span>@GetString("Item.Subheader").Replace("[RTXXX]",@productnumber)</span></h2> @if (GetBoolean("Item.IsReferenceForm")) { if (p.ProductFieldValues.GetProductFieldValue("ShowNewReferenceTool").Value.ToString() == "True") { <text>@RenderParagraphContent(GetInteger("Item.FormParagraph"))</text> } else { <span><span class="arrow-link"> @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { <span> @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) </span> } </span> @Translate("RT-2.0_Spørg_på_referenceadresser") </span> } } else { <text>@RenderParagraphContent(GetInteger("Item.FormParagraph"))</text> } </a><a class="mobile-link" @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'> @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) </span> @if (GetBoolean("Item.IsReferenceForm")) { if (p.ProductFieldValues.GetProductFieldValue("ShowNewReferenceTool").Value.ToString() == "True") { <h2><span>@GetString("Item.MobileHeader").Replace("[RTXXX]",@productnumber)</span></h2> } else { <h2><span>@Translate("RT-2.0_Spørg_på_referenceadresser")</span></h2> } } else { <h2><span>@GetString("Item.MobileHeader").Replace("[RTXXX]",@productnumber)</span></h2> } </a> @SnippetStart("Modals") <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"> @GetString("Item.Header").Replace("[RTXXX]",@productnumber) <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"> @RenderParagraphContent(GetInteger("Item.FormParagraph")) </div><span class="icon-close"> @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))) { <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))</text> } </span></div> @SnippetEnd("Modals") } else { <a class="tablet-desktop-link" @if(!string.IsNullOrWhiteSpace(GetString("Item.LinkTitle"))) {<text>title='@GetString("Item.LinkTitle")'</text>}><span class='icon @iconClass'> @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) </span><h2> @GetString("Item.Header").Replace("[RTXXX]",@productnumber) <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"> @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { <span> @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) </span> } </button></div></form></a><a class="mobile-link" data-target='product-modal-@GetString("Item.Id")'><span class='icon @iconClass'> @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) </span><h2><span>@GetString("Item.MobileHeader").Replace("[RTXXX]",@productnumber)</span></h2></a> @SnippetStart("Modals") <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"> @GetString("Item.Header").Replace("[RTXXX]",@productnumber) <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"> @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { <span> @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) </span> } </button></div></form></div><span class="icon-close"> @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))) { <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))</text> } </span></div> @SnippetEnd("Modals") } } else { <a @if(GetString("Item.Type") == "link") {<text>href=@link</text>} @if(!string.IsNullOrWhiteSpace(GetString("Item.LinkTitle"))) {<text>title='@GetString("Item.LinkTitle")'</text>} @if(GetString("Item.Type") == "modal-form") {<text>data-target='modal-@GetString("Item.ModalFormParagraph")'</text>} @(GetString("Item.ActionID") == "samples" ? "data-callback='hubspotLoad'" : null) @if (GetBoolean("Item.IsVisualizationToolLink")) {<text>target="_blank"</text>} @if (!string.IsNullOrWhiteSpace(GetString("Item.OpenTrackingCategory"))) {<text>data-open-tracking-category='@GetString("Item.OpenTrackingCategory")'</text>} @if (!string.IsNullOrWhiteSpace(GetString("Item.OpenTrackingAction"))) {<text>data-open-tracking-action='@GetString("Item.OpenTrackingAction")'</text>}><span class='icon @iconClass'> @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) </span><h2> @GetString("Item.Header").Replace("[RTXXX]",@productnumber) <span>@GetString("Item.Subheader").Replace("[RTXXX]",@productnumber)</span></h2><h2><span>@GetString("Item.MobileHeader").Replace("[RTXXX]",@productnumber)</span></h2> @if (GetString("Item.Type") == "link") { <span><span class="arrow-link"> @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { <span> @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) </span> } </span> @GetString("Item.LinkText") </span> } else if (GetString("Item.Type") == "modal-form") { <span><span class="arrow-link"> @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { <span> @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) </span> } </span> @GetString("Item.FormLinkText") </span> } </a> } </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_8894369f45654c4d8c6e4516fee4271b.Execute() in E:\dynamicweb.net\Solutions\randerstegl.net.dynamicweb-cms.com\files\Templates\Designs\randers-tegl\Paragraph\rt-2.0.product-action.cshtml:line 6 at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader) at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag) at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<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 @{ string productid = System.Web.HttpContext.Current.Request.QueryString.Get("ProductID"); Dynamicweb.Ecommerce.Products.Product p = Dynamicweb.Ecommerce.Services.Products.GetProductById(productid, "", false); string productname = p.Name; string productnumber = p.Number; string categoryName = p.Groups[0].Name.ToLower(); } @if (!GetString("Item.ExcludeProducts").Contains(productnumber)) { <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"> @{ bool islink = false; string link = ""; if (GetString("Item.Type") == "link") { islink = true; link = GetString("Item.Link"); bool hasparameter = false; if (GetBoolean("Item.IncludeRTNumberInURL")) { link += (GetString("Item.Link").Contains("?") ? "&" : "?"); if (!string.IsNullOrWhiteSpace(GetString("Item.URLParameterName"))) { link += GetString("Item.URLParameterName") + "=" + productnumber.Replace(" ",""); } else { link += "ProductID=" + productid; } hasparameter = true; } if (GetBoolean("Item.IsVisualizationToolLink")) { string brick = p.ProductFieldValues.GetProductFieldValue("VisualizationBrick").Value.ToString(); string groove = p.ProductFieldValues.GetProductFieldValue("VisualizationGroove").Value.ToString(); string linking = p.ProductFieldValues.GetProductFieldValue("VisualizationLinking").Value.ToString(); string paving = p.ProductFieldValues.GetProductFieldValue("VisualizationPaving").Value.ToString(); string roof = p.ProductFieldValues.GetProductFieldValue("VisualizationRoof").Value.ToString(); string house = p.ProductFieldValues.GetProductFieldValue("VisualizationHouse").Value.ToString(); string windows = p.ProductFieldValues.GetProductFieldValue("VisualizationWindows").Value.ToString(); string rnd = p.ProductFieldValues.GetProductFieldValue("VisualizationRnd").Value.ToString(); string viewmode = p.ProductFieldValues.GetProductFieldValue("VisualizationViewmode").Value.ToString(); if (categoryName == "mursten") { link += "#brick=" + productnumber.Replace(" ",""); } else if (!string.IsNullOrWhiteSpace(brick)) { link += "#brick=" + brick; } else { link += "#brick=RT522"; } if (!string.IsNullOrWhiteSpace(groove)) { link += "&groove=" + groove; } if (!string.IsNullOrWhiteSpace(linking)) { link += "&linking=" + linking; } if (!string.IsNullOrWhiteSpace(paving)) { link += "&paving=" + paving; } if (categoryName == "tagsten") { link += "&roof=" + productnumber.Replace(" ","_"); } else if (!string.IsNullOrWhiteSpace(roof)) { link += "&roof=" + roof; } if (!string.IsNullOrWhiteSpace(house)) { link += "&house=" + house; } else if (categoryName == "tagsten") { link += "&house=05"; } if (!string.IsNullOrWhiteSpace(windows)) { link += "&windows=" + windows; } if (!string.IsNullOrWhiteSpace(rnd)) { link += "&rnd=" + rnd; } if (!string.IsNullOrWhiteSpace(viewmode)) { link += "&viewmode=" + viewmode; } else { link += "&viewmode=house"; } } if (GetBoolean("Item.IsTextureToolLink")) { string groove = p.ProductFieldValues.GetProductFieldValue("VisualizationGroove").Value.ToString(); string linking = p.ProductFieldValues.GetProductFieldValue("VisualizationLinking").Value.ToString(); string viewmode = p.ProductFieldValues.GetProductFieldValue("VisualizationViewmode").Value.ToString(); if (categoryName == "mursten") { link += "#brick=" + productnumber.Replace(" ",""); } else { link += "#brick=RT522"; } if (!string.IsNullOrWhiteSpace(groove)) { link += "&groove=" + groove; } if (!string.IsNullOrWhiteSpace(linking)) { link += "&linking=" + linking; } if (!string.IsNullOrWhiteSpace(viewmode)) { link += "&viewmode=" + viewmode; } else { link += "&viewmode=wall"; } } } string iconClass = GetString("Item.Icon"); iconClass = iconClass.Substring(iconClass.LastIndexOf("/") + 1); iconClass = iconClass.Replace(".svg",""); } @if (GetString("Item.Type") == "inline-form" || GetString("Item.Type") == "custom") { if (GetString("Item.Type") == "inline-form") { <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'> @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) </span><h2> @GetString("Item.Header").Replace("[RTXXX]",@productnumber) <span>@GetString("Item.Subheader").Replace("[RTXXX]",@productnumber)</span></h2> @if (GetBoolean("Item.IsReferenceForm")) { if (p.ProductFieldValues.GetProductFieldValue("ShowNewReferenceTool").Value.ToString() == "True") { <text>@RenderParagraphContent(GetInteger("Item.FormParagraph"))</text> } else { <span><span class="arrow-link"> @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { <span> @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) </span> } </span> @Translate("RT-2.0_Spørg_på_referenceadresser") </span> } } else { <text>@RenderParagraphContent(GetInteger("Item.FormParagraph"))</text> } </a><a class="mobile-link" @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'> @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) </span> @if (GetBoolean("Item.IsReferenceForm")) { if (p.ProductFieldValues.GetProductFieldValue("ShowNewReferenceTool").Value.ToString() == "True") { <h2><span>@GetString("Item.MobileHeader").Replace("[RTXXX]",@productnumber)</span></h2> } else { <h2><span>@Translate("RT-2.0_Spørg_på_referenceadresser")</span></h2> } } else { <h2><span>@GetString("Item.MobileHeader").Replace("[RTXXX]",@productnumber)</span></h2> } </a> @SnippetStart("Modals") <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"> @GetString("Item.Header").Replace("[RTXXX]",@productnumber) <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"> @RenderParagraphContent(GetInteger("Item.FormParagraph")) </div><span class="icon-close"> @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))) { <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))</text> } </span></div> @SnippetEnd("Modals") } else { <a class="tablet-desktop-link" @if(!string.IsNullOrWhiteSpace(GetString("Item.LinkTitle"))) {<text>title='@GetString("Item.LinkTitle")'</text>}><span class='icon @iconClass'> @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) </span><h2> @GetString("Item.Header").Replace("[RTXXX]",@productnumber) <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"> @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { <span> @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) </span> } </button></div></form></a><a class="mobile-link" data-target='product-modal-@GetString("Item.Id")'><span class='icon @iconClass'> @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) </span><h2><span>@GetString("Item.MobileHeader").Replace("[RTXXX]",@productnumber)</span></h2></a> @SnippetStart("Modals") <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"> @GetString("Item.Header").Replace("[RTXXX]",@productnumber) <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"> @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { <span> @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) </span> } </button></div></form></div><span class="icon-close"> @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))) { <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))</text> } </span></div> @SnippetEnd("Modals") } } else { <a @if(GetString("Item.Type") == "link") {<text>href=@link</text>} @if(!string.IsNullOrWhiteSpace(GetString("Item.LinkTitle"))) {<text>title='@GetString("Item.LinkTitle")'</text>} @if(GetString("Item.Type") == "modal-form") {<text>data-target='modal-@GetString("Item.ModalFormParagraph")'</text>} @(GetString("Item.ActionID") == "samples" ? "data-callback='hubspotLoad'" : null) @if (GetBoolean("Item.IsVisualizationToolLink")) {<text>target="_blank"</text>} @if (!string.IsNullOrWhiteSpace(GetString("Item.OpenTrackingCategory"))) {<text>data-open-tracking-category='@GetString("Item.OpenTrackingCategory")'</text>} @if (!string.IsNullOrWhiteSpace(GetString("Item.OpenTrackingAction"))) {<text>data-open-tracking-action='@GetString("Item.OpenTrackingAction")'</text>}><span class='icon @iconClass'> @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) </span><h2> @GetString("Item.Header").Replace("[RTXXX]",@productnumber) <span>@GetString("Item.Subheader").Replace("[RTXXX]",@productnumber)</span></h2><h2><span>@GetString("Item.MobileHeader").Replace("[RTXXX]",@productnumber)</span></h2> @if (GetString("Item.Type") == "link") { <span><span class="arrow-link"> @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { <span> @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) </span> } </span> @GetString("Item.LinkText") </span> } else if (GetString("Item.Type") == "modal-form") { <span><span class="arrow-link"> @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { <span> @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) </span> } </span> @GetString("Item.FormLinkText") </span> } </a> } </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_8894369f45654c4d8c6e4516fee4271b.Execute() in E:\dynamicweb.net\Solutions\randerstegl.net.dynamicweb-cms.com\files\Templates\Designs\randers-tegl\Paragraph\rt-2.0.product-action.cshtml:line 6 at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader) at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag) at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<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 @{ string productid = System.Web.HttpContext.Current.Request.QueryString.Get("ProductID"); Dynamicweb.Ecommerce.Products.Product p = Dynamicweb.Ecommerce.Services.Products.GetProductById(productid, "", false); string productname = p.Name; string productnumber = p.Number; string categoryName = p.Groups[0].Name.ToLower(); } @if (!GetString("Item.ExcludeProducts").Contains(productnumber)) { <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"> @{ bool islink = false; string link = ""; if (GetString("Item.Type") == "link") { islink = true; link = GetString("Item.Link"); bool hasparameter = false; if (GetBoolean("Item.IncludeRTNumberInURL")) { link += (GetString("Item.Link").Contains("?") ? "&" : "?"); if (!string.IsNullOrWhiteSpace(GetString("Item.URLParameterName"))) { link += GetString("Item.URLParameterName") + "=" + productnumber.Replace(" ",""); } else { link += "ProductID=" + productid; } hasparameter = true; } if (GetBoolean("Item.IsVisualizationToolLink")) { string brick = p.ProductFieldValues.GetProductFieldValue("VisualizationBrick").Value.ToString(); string groove = p.ProductFieldValues.GetProductFieldValue("VisualizationGroove").Value.ToString(); string linking = p.ProductFieldValues.GetProductFieldValue("VisualizationLinking").Value.ToString(); string paving = p.ProductFieldValues.GetProductFieldValue("VisualizationPaving").Value.ToString(); string roof = p.ProductFieldValues.GetProductFieldValue("VisualizationRoof").Value.ToString(); string house = p.ProductFieldValues.GetProductFieldValue("VisualizationHouse").Value.ToString(); string windows = p.ProductFieldValues.GetProductFieldValue("VisualizationWindows").Value.ToString(); string rnd = p.ProductFieldValues.GetProductFieldValue("VisualizationRnd").Value.ToString(); string viewmode = p.ProductFieldValues.GetProductFieldValue("VisualizationViewmode").Value.ToString(); if (categoryName == "mursten") { link += "#brick=" + productnumber.Replace(" ",""); } else if (!string.IsNullOrWhiteSpace(brick)) { link += "#brick=" + brick; } else { link += "#brick=RT522"; } if (!string.IsNullOrWhiteSpace(groove)) { link += "&groove=" + groove; } if (!string.IsNullOrWhiteSpace(linking)) { link += "&linking=" + linking; } if (!string.IsNullOrWhiteSpace(paving)) { link += "&paving=" + paving; } if (categoryName == "tagsten") { link += "&roof=" + productnumber.Replace(" ","_"); } else if (!string.IsNullOrWhiteSpace(roof)) { link += "&roof=" + roof; } if (!string.IsNullOrWhiteSpace(house)) { link += "&house=" + house; } else if (categoryName == "tagsten") { link += "&house=05"; } if (!string.IsNullOrWhiteSpace(windows)) { link += "&windows=" + windows; } if (!string.IsNullOrWhiteSpace(rnd)) { link += "&rnd=" + rnd; } if (!string.IsNullOrWhiteSpace(viewmode)) { link += "&viewmode=" + viewmode; } else { link += "&viewmode=house"; } } if (GetBoolean("Item.IsTextureToolLink")) { string groove = p.ProductFieldValues.GetProductFieldValue("VisualizationGroove").Value.ToString(); string linking = p.ProductFieldValues.GetProductFieldValue("VisualizationLinking").Value.ToString(); string viewmode = p.ProductFieldValues.GetProductFieldValue("VisualizationViewmode").Value.ToString(); if (categoryName == "mursten") { link += "#brick=" + productnumber.Replace(" ",""); } else { link += "#brick=RT522"; } if (!string.IsNullOrWhiteSpace(groove)) { link += "&groove=" + groove; } if (!string.IsNullOrWhiteSpace(linking)) { link += "&linking=" + linking; } if (!string.IsNullOrWhiteSpace(viewmode)) { link += "&viewmode=" + viewmode; } else { link += "&viewmode=wall"; } } } string iconClass = GetString("Item.Icon"); iconClass = iconClass.Substring(iconClass.LastIndexOf("/") + 1); iconClass = iconClass.Replace(".svg",""); } @if (GetString("Item.Type") == "inline-form" || GetString("Item.Type") == "custom") { if (GetString("Item.Type") == "inline-form") { <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'> @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) </span><h2> @GetString("Item.Header").Replace("[RTXXX]",@productnumber) <span>@GetString("Item.Subheader").Replace("[RTXXX]",@productnumber)</span></h2> @if (GetBoolean("Item.IsReferenceForm")) { if (p.ProductFieldValues.GetProductFieldValue("ShowNewReferenceTool").Value.ToString() == "True") { <text>@RenderParagraphContent(GetInteger("Item.FormParagraph"))</text> } else { <span><span class="arrow-link"> @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { <span> @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) </span> } </span> @Translate("RT-2.0_Spørg_på_referenceadresser") </span> } } else { <text>@RenderParagraphContent(GetInteger("Item.FormParagraph"))</text> } </a><a class="mobile-link" @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'> @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) </span> @if (GetBoolean("Item.IsReferenceForm")) { if (p.ProductFieldValues.GetProductFieldValue("ShowNewReferenceTool").Value.ToString() == "True") { <h2><span>@GetString("Item.MobileHeader").Replace("[RTXXX]",@productnumber)</span></h2> } else { <h2><span>@Translate("RT-2.0_Spørg_på_referenceadresser")</span></h2> } } else { <h2><span>@GetString("Item.MobileHeader").Replace("[RTXXX]",@productnumber)</span></h2> } </a> @SnippetStart("Modals") <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"> @GetString("Item.Header").Replace("[RTXXX]",@productnumber) <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"> @RenderParagraphContent(GetInteger("Item.FormParagraph")) </div><span class="icon-close"> @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))) { <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))</text> } </span></div> @SnippetEnd("Modals") } else { <a class="tablet-desktop-link" @if(!string.IsNullOrWhiteSpace(GetString("Item.LinkTitle"))) {<text>title='@GetString("Item.LinkTitle")'</text>}><span class='icon @iconClass'> @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) </span><h2> @GetString("Item.Header").Replace("[RTXXX]",@productnumber) <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"> @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { <span> @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) </span> } </button></div></form></a><a class="mobile-link" data-target='product-modal-@GetString("Item.Id")'><span class='icon @iconClass'> @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) </span><h2><span>@GetString("Item.MobileHeader").Replace("[RTXXX]",@productnumber)</span></h2></a> @SnippetStart("Modals") <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"> @GetString("Item.Header").Replace("[RTXXX]",@productnumber) <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"> @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { <span> @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) </span> } </button></div></form></div><span class="icon-close"> @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))) { <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))</text> } </span></div> @SnippetEnd("Modals") } } else { <a @if(GetString("Item.Type") == "link") {<text>href=@link</text>} @if(!string.IsNullOrWhiteSpace(GetString("Item.LinkTitle"))) {<text>title='@GetString("Item.LinkTitle")'</text>} @if(GetString("Item.Type") == "modal-form") {<text>data-target='modal-@GetString("Item.ModalFormParagraph")'</text>} @(GetString("Item.ActionID") == "samples" ? "data-callback='hubspotLoad'" : null) @if (GetBoolean("Item.IsVisualizationToolLink")) {<text>target="_blank"</text>} @if (!string.IsNullOrWhiteSpace(GetString("Item.OpenTrackingCategory"))) {<text>data-open-tracking-category='@GetString("Item.OpenTrackingCategory")'</text>} @if (!string.IsNullOrWhiteSpace(GetString("Item.OpenTrackingAction"))) {<text>data-open-tracking-action='@GetString("Item.OpenTrackingAction")'</text>}><span class='icon @iconClass'> @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(GetString("Item.Icon"))) </span><h2> @GetString("Item.Header").Replace("[RTXXX]",@productnumber) <span>@GetString("Item.Subheader").Replace("[RTXXX]",@productnumber)</span></h2><h2><span>@GetString("Item.MobileHeader").Replace("[RTXXX]",@productnumber)</span></h2> @if (GetString("Item.Type") == "link") { <span><span class="arrow-link"> @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { <span> @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) </span> } </span> @GetString("Item.LinkText") </span> } else if (GetString("Item.Type") == "modal-form") { <span><span class="arrow-link"> @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { <span> @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) </span> } </span> @GetString("Item.FormLinkText") </span> } </a> } </div></div> }
The modern single-family home is brick-built. Buildings in brick are robust and are ideal for the Scandinavian climate because brick has properties unlike any other building materials. Brick-built dwellings have a healthy indoor climate, are energy-efficient and last for generations.
See why well-being is something you buildError executing template "/Designs/randers-tegl/Paragraph/rt-2.0.bricktiler.cshtml" System.NullReferenceException: Object reference not set to an instance of an object. at CompiledRazorTemplates.Dynamic.RazorEngine_268f0efd8c364cc9a63e4ab8663aa7a9.Execute() in E:\dynamicweb.net\Solutions\randerstegl.net.dynamicweb-cms.com\files\Templates\Designs\randers-tegl\Paragraph\rt-2.0.bricktiler.cshtml:line 13 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 @SnippetStart("Modals") <script> var brickimages = []; </script><div id='modal-@GetString("ParagraphID")' class="product-modal modal-light-grey"> @{ bool showBrickTiler = true; string[] brickimages; string productid = System.Web.HttpContext.Current.Request.QueryString.Get("ProductID"); Dynamicweb.Ecommerce.Products.Product p = Dynamicweb.Ecommerce.Services.Products.GetProductById(productid, "", true); string productnumber = p.Number.Replace(" ",""); string productName = p.Name; string isWild = p.ProductFieldValues.GetProductFieldValue("BrickTilerVildtForbandt").Value.ToString(); try { brickimages = System.IO.Directory.GetFiles(System.Web.HttpContext.Current.Server.MapPath("~\\files\\images\\bricktiler\\" + productnumber)); foreach (string brickImage in brickimages) { string filepath = brickImage.Substring(brickImage.IndexOf("\\files"), brickImage.Length - brickImage.IndexOf("\\files")).Replace("\\","/"); if (filepath.Contains(".png")) { <script> brickimages.push('@filepath'); </script> } } } catch { showBrickTiler = false; } if (showBrickTiler) { <div class="wrap-fluid" id="bricktiler"><div class="wrap-inner"><div class="column-xxs-22 column-xxs-left-1 column-xxs-top-6 column-xxs-bottom-2 column-md-top-2"><div id="brickTilerWrap"> @if (GetGlobalValue("Global:Device.IsDesktop").ToString().ToLower() == "true") { <div class="dropdowns"> @if (isWild.ToLower() == "false") { <ul class="drop-down" role="menu"><li class="bonds"><a>@Translate("RT-2.0_vaelgforbandt")</a><ul> @RenderItemList(new { ItemType = "ForbandtTyper", ListSourceType = "Area", ListSourceArea = Pageview.Area.ID, IncludeParagraphItems = false, ItemFieldsList = "*", ListOrderBy = "Created", ListTemplate = "ItemPublisher/List/Bonds.cshtml", ListPageSize = 100 }) </ul> @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { <span class="icon-down"> @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) </span> } </li></ul> } <ul class="drop-down" role="menu"><li class="grooves"><a>@Translate("RT-2.0_vaelgfugefarve")</a><ul> @RenderItemList(new { ItemType = "Fugefaver", ListSourceType = "Area", ListSourceArea = Pageview.Area.ID, IncludeParagraphItems = false, ItemFieldsList = "*", ListOrderBy = "Created", ListTemplate = "ItemPublisher/List/Grooves.cshtml", ListPageSize = 100 }) </ul> @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { <span class="icon-down"> @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) </span> } </li></ul></div> } else { if (isWild.ToLower() == "false") { <select id="bond-select"> @RenderItemList(new { ItemType = "ForbandtTyper", ListSourceType = "Area", ListSourceArea = Pageview.Area.ID, IncludeParagraphItems = false, ItemFieldsList = "*", ListOrderBy = "Created", ListTemplate = "ItemPublisher/List/Bonds-native.cshtml", ListPageSize = 100 }) </select> } <select id="groove-select"> @RenderItemList(new { ItemType = "Fugefaver", ListSourceType = "Area", ListSourceArea = Pageview.Area.ID, IncludeParagraphItems = false, ItemFieldsList = "*", ListOrderBy = "Created", ListTemplate = "ItemPublisher/List/Grooves-native.cshtml", ListPageSize = 100 }) </select> } @if (GetGlobalValue("Global:Device.IsDesktop").ToString().ToLower() == "true") { <div class="save"><a id="bricktiler_savepackage"><span class="arrow-link"><span> @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { <span> @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) </span> } </span></span> @Translate("RT-2.0_SavePackage") </a></div> } <div id="canvasImg"><canvas id="myCanvas" width="1200px" height="630px" style="background-color:#fdfdfd"></canvas><!--canvas id="myCanvas" width="1900px" height="997px" style="background-color:#fdfdfd"></canvas--></div></div></div></div></div> } } <span class="icon-close"> @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))) { <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))</text> } </span></div><script src="/files/Templates/Designs/randers-tegl/js/bricktiler.min.js" async defer"></script><!--script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script><script src="/files/Templates/Designs/randers-tegl/js/jspdf/libs/filesaver.js/FileSaver.js"></script><script src="//cdnjs.cloudflare.com/ajax/libs/jszip/2.5.0/jszip.min.js"></script><script src="/files/Templates/Designs/randers-tegl/js/bricktiler6.js"></script--><script> var track = false; </script> @if (Pageview.Area.ID != 8) { <script> track = true; </script> } <script> var checkjquery = setInterval(function() { if (window.jQuery) { clearInterval(checkjquery); initBrickTiler(); } },10); function initBrickTiler() { /*if ($('html').hasClass('canvas')) {*/ var timerStart = -1; var timerEnd = -1; /* ---------- Start timer when clicking save package button */ if ($('#bricktiler').length > 0) { $('#bricktiler_savepackage').click(function() { // TODO: Start timer var tmpStart = new Date(); timerStart = tmpStart.getTime(); if (track) { ga('send', 'event', { eventCategory: 'Murstenskonfigurator', eventAction: 'Start download texture' }); } }); } var selectedbond = ""; var selectedbondname = ""; var selectedgrooveimage = "" var selectedgroovename = ""; var usenative = false; var vildtforbandt = '@isWild'; if ($('#groove-select').length > 0) { usenative = true; } if (vildtforbandt.toLowerCase() == 'true') { if (usenative) { selectedbond = []; selectedbondname = 'Vildtforbandt'; selectedgrooveimage = [$($('#groove-select option')[0]).attr('data-image-src')]; selectedgroovename = $($('#groove-select option')[0]).attr('data-color-name'); } else { selectedbond = []; selectedbondname = 'Vildtforbandt'; selectedgrooveimage = [$($('#bricktiler .grooves ul li a')[0]).attr('data-image-src')]; selectedgroovename = $($('#bricktiler .grooves ul li a')[0]).attr('data-color-name'); } } else { if (usenative) { selectedbond = JSON.parse($($('#bond-select option')[0]).attr('data-bond')); selectedbondname = $($('#bond-select option')[0]).attr('data-bond-name'); selectedgrooveimage = [$($('#groove-select option')[0]).attr('data-image-src')]; selectedgroovename = $($('#groove-select option')[0]).attr('data-color-name'); } else { selectedbond = JSON.parse($($('#bricktiler .bonds ul li a')[0]).attr('data-bond')); selectedbondname = $($('#bricktiler .bonds ul li a')[0]).attr('data-bond-name'); selectedgrooveimage = [$($('#bricktiler .grooves ul li a')[0]).attr('data-image-src')]; selectedgroovename = $($('#bricktiler .grooves ul li a')[0]).attr('data-color-name'); } } $('#bricktiler .bonds ul li a').click(function() { var selectedbondname = $(this).attr('data-bond-name'); var selectedbond = JSON.parse($(this).attr('data-bond')); brickTiler.switchBond(selectedbond, selectedbondname); }); $('#bricktiler .grooves ul li a').click(function() { var selectedgroovename = $(this).attr('data-color-name'); var selectedgrooveimage = [$(this).attr('data-image-src')]; brickTiler.switchGroove(selectedgrooveimage, selectedgroovename); }); $('#bond-select').change(function(e) { var selectedbondname = $(this).find('option:selected').attr('data-bond-name'); var selectedbond = JSON.parse($(this).find('option:selected').attr('data-bond')); brickTiler.switchBond(selectedbond, selectedbondname); }); $('#groove-select').change(function(e) { var selectedgroovename = $(this).find('option:selected').attr('data-color-name'); var selectedgrooveimage = [$(this).find('option:selected').attr('data-image-src')]; brickTiler.switchGroove(selectedgrooveimage, selectedgroovename); }); $('#bricktiler_saveaspdf').click(function() { showloader(); setTimeout(function() { brickTiler.savePdf('text here...').done(function() { hideloader(); }); },300); }); $('#bricktiler_savepackage').click(function() { showloader(); $('body').append('<div id="downloadmessage" style="z-index: 999999; color: #fff; position: fixed; max-width: 960px; line-height: 40px; top: 50%; left: 0; right: 0; text-align: center; margin: auto;">Please wait. In short time, you will receive a zip-file with the selected texture. Depending on your Internet connection, this may take up to 30 seconds.</div>'); setTimeout(function() { brickTiler.saveZip().done(function() { hideloader(); $('#downloadmessage').remove(); var tmpEnd = new Date(); timerEnd = tmpEnd.getTime(); var seconds = (timerEnd - timerStart) / 1000; if (track) { ga('send', 'event', { eventCategory: 'Murstenskonfigurator', eventAction: 'Slut download texture', eventLabel: 'download tid = ' + seconds }); } }); },300); }); function showloader() { $('body').addClass('js-bricktiler-loading'); } function hideloader() { $('body').removeClass('js-bricktiler-loading'); } function init() { if (document.getElementById("myCanvas")){ setTimeout(function() { brickTiler.init( document.getElementById('myCanvas'), brickimages, '@productnumber @productName', selectedgrooveimage, selectedgroovename, selectedbond, selectedbondname ).done(function(){ //console.log("Init done!"); }); }, 10); } else{ document.getElementById("bricktiler").setAttribute("style","display:none"); } } init(); /*$('.dropdowns ul li ul a').click(function() { $('.dropdowns ul li ul a.js-selected').removeClass('js-selected'); $(this).addClass('js-selected'); var text = $(this).html(); $(this).parent().parent().parent().find('> a').html(text); });*/ /*}*/ } </script> @SnippetEnd("Modals")
Error executing template "Designs/randers-tegl/Forms/Form/rt-2.0.product-samples-form.uk.cshtml" System.NullReferenceException: Object reference not set to an instance of an object. at CompiledRazorTemplates.Dynamic.RazorEngine_03994b3a895541559974c72abce05f69.Execute() in E:\dynamicweb.net\Solutions\randerstegl.net.dynamicweb-cms.com\files\Templates\Designs\randers-tegl\Forms\Form\rt-2.0.product-samples-form.uk.cshtml:line 9 at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader) at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag) at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<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 int areaId = Dynamicweb.Frontend.PageView.Current().Area.ID; 3 string areaName = Dynamicweb.Frontend.PageView.Current().Area.Name; 4 5 string productid = System.Web.HttpContext.Current.Request.QueryString.Get("ProductID"); 6 7 Dynamicweb.Ecommerce.Products.Product p = Dynamicweb.Ecommerce.Services.Products.GetProductById(productid, "", true); 8 9 string productname = p.Name; 10 string productnumber = p.Number; 11 string path = Pageview.SearchFriendlyUrl; 12 } 13 14 <div class="wrap-inner"><div class="column-xxs-24"><span class="header">@Translate("RT-2.0_Bestil_en_gratis_proevekasse")</span></div></div><div class="wrap-inner" id="samplesFormWrap"><div class="centered-content"><div> 15 @GetString("Form.FormStart") 16 @GetString("Form.SystemFields") 17 @foreach (var field in GetLoop("Fields")) { 18 if (field.GetString("Field.Name").ToLower() == "formsubmitaction") { 19 <input type="hidden" name='@field.GetString("Field.Name")' value="page"> 20 } else if (field.GetString("Field.Name").ToLower() == "formsubmitpageaftersave") { 21 <input type="hidden" name='@field.GetString("Field.Name")' value='@("/Default.aspx?Id=")@Pageview.Page.ID@("&ProductId=")@System.Web.HttpContext.Current.Request.QueryString.Get("ProductID")@("&modal=samples-thank-you#product-actions")' /> 22 } else if (field.GetString("Field.SystemName").ToLower() == "sprog") { 23 <input type="hidden" name='@field.GetString("Field.SystemName")' id='@field.GetString("Field.SystemName")' value='@areaName' /> 24 } else if (field.GetString("Field.SystemName").ToLower() == "produktnavn") { 25 <input type="hidden" name='@field.GetString("Field.SystemName")' id='@field.GetString("Field.SystemName")' value='@productname' /> 26 } else if (field.GetString("Field.SystemName").ToLower() == "produktnr") { 27 <input type="hidden" name='@field.GetString("Field.SystemName")' id='@field.GetString("Field.SystemName")' value='@productnumber' /> 28 } else if (field.GetString("Field.SystemName").ToLower() == "produkttype") { 29 if (path.Contains("tagsten") || path.Contains("dachziegel") || path.Contains("taktegel")) { 30 <input type="hidden" name='@field.GetString("Field.SystemName")' id='@field.GetString("Field.SystemName")' value="tagsten" /> 31 } else if (path.Contains("mursten") || path.Contains("mauerziegel") || (path.Contains("tegel") && !path.Contains("taktegel"))) { 32 <input type="hidden" name='@field.GetString("Field.SystemName")' id='@field.GetString("Field.SystemName")' value="mursten" /> 33 } 34 } else if (field.GetString("Field.Type").ToLower() == "hidden") { 35 @field.GetString("Field.Control") 36 } else if (field.GetString("Field.Type").ToLower() == "select") { 37 if (areaId == 1 || areaId == 8 || areaId == 10) { 38 if (GetGlobalValue("Global:Device.IsDesktop").ToString().ToLower() == "true") { 39 if ((areaId == 10 && field.GetString("Field.SystemName").ToLower() != "jeger") || areaId == 1 || areaId == 8) { 40 <div class="input-wrap"><ul class="drop-down" role="menu" data-input-container-id='input_@field.GetString("Field.SystemName")' @if(field.GetString("Field.SystemName") == "Leveringsadresse") {<text>data-trigger-fields='Navn,Firmanavn,Attnavn'</text>}><li><a>@Translate("RT-2.0_" + @field.GetString("Field.SystemName"))</a><ul> 41 @foreach (var fieldOption in field.GetLoop("Options")) { 42 <li data-value='@fieldOption.GetString("Option.Value")'><a>@Translate("RT-2.0_" + fieldOption.GetString("Option.Text"))</a></li> 43 } 44 </ul> 45 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/files/templates/designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { 46 <span class="icon-down"> 47 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/files/templates/designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 48 </span> 49 } 50 </li></ul></div><div id='input_@field.GetString("Field.SystemName")' class="hidden"><input type="hidden" name='@field.GetString("Field.SystemName")' id='@field.GetString("Field.SystemName")' /></div> 51 } 52 } else { 53 if ((areaId == 10 && field.GetString("Field.SystemName").ToLower() != "jeger") || areaId == 1 || areaId == 8) { 54 <select name='@field.GetString("Field.SystemName")' id='@field.GetString("Field.SystemName")' @if(field.GetString("Field.SystemName") == "Leveringsadresse") {<text>data-trigger-fields='Navn,Firmanavn,Attnavn'</text>}> 55 @foreach (var fieldOption in field.GetLoop("Options")) { 56 <option value='@fieldOption.GetString("Option.Value")'>@Translate("RT-2.0_" + fieldOption.GetString("Option.Text"))</option> 57 } 58 </select> 59 } 60 } 61 } 62 } else if (field.GetString("Field.SystemName").ToLower() == "bemaerkninger") { 63 if (areaId == 8 || areaId == 9 || areaId == 10) { 64 <div class="input-wrap" data-system-name='@field.GetString("Field.SystemName")' data-pageview='@areaId'><textarea id='@field.GetString("Field.SystemName")' name='@field.GetString("Field.SystemName")' placeholder='@Translate("RT-2.0_" + field.GetString("Field.Placeholder"))' @if(field.GetBoolean("Field.Required")) {<text>required</text>}></textarea></div> 65 } 66 } else if (field.GetString("Field.SystemName").ToLower() == "samtykke" || field.GetString("Field.SystemName").ToLower() == "samtykkeproevepakke") { 67 if (areaId == 8 || areaId == 9 || areaId == 10) { 68 <div class="input-wrap" data-system-name='@field.GetString("Field.SystemName")' data-pageview='@areaId'><input type="checkbox" required name='@field.GetString("Field.HtmlId")' id='@field.GetString("Field.HtmlId")' /><label class="form-consent" for='@field.GetString("Field.HtmlId")'>@Translate("RT-2.0_Samtykke_brochurer") 69 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/files/templates/designs/randers-tegl/images-rt-2.0/icon-checkmark.svg"))) { 70 <span class="icon-checkmark">@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/files/templates/designs/randers-tegl/images-rt-2.0/icon-checkmark.svg"))</span> 71 } 72 </label></div> 73 } 74 } else if (field.GetString("Field.Type").ToLower() == "submit") { 75 <div class="input-wrap"><button type="submit"><span class="arrow-link"> 76 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/files/templates/designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { 77 <span> 78 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/files/templates/designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 79 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/files/templates/designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 80 </span> 81 } 82 </span> 83 @Translate("RT-2.0_Bestil_proevekasse") 84 </button></div> 85 } else { 86 if ((field.GetString("Field.SystemName").ToLower() == "firmanavn" || field.GetString("Field.SystemName").ToLower() == "attnavn")) { 87 if (areaId == 1 || areaId == 8 || areaId == 10) { 88 <div class="input-wrap js-hide" data-trigger="Business"><input type='@field.GetString("Field.Type").ToLower().Replace("input","")' id='@field.GetString("Field.SystemName")' name='@field.GetString("Field.SystemName")' placeholder='@Translate("RT-2.0_" + field.GetString("Field.Placeholder"))' @if(field.GetBoolean("Field.Required")) {<text>required</text>} /></div> 89 } 90 if (field.GetString("Field.SystemName").ToLower() == "firmanavn" && areaId == 9) { 91 <div class="input-wrap"><input type='@field.GetString("Field.Type").ToLower().Replace("input","")' id='@field.GetString("Field.SystemName")' name='@field.GetString("Field.SystemName")' placeholder='@Translate("RT-2.0_" + field.GetString("Field.Placeholder"))' @if(field.GetBoolean("Field.Required")) {<text>required</text>} /></div> 92 } 93 } else { 94 <div class='input-wrap @if (field.GetString("Field.Name").ToLower() == "postnr") {<text>zipcode-wrap</text>}' data-trigger="Private"><input type='@field.GetString("Field.Type").ToLower().Replace("input","")' id='@field.GetString("Field.SystemName")' name='@field.GetString("Field.SystemName")' placeholder='@Translate("RT-2.0_" + field.GetString("Field.Placeholder"))' @if(field.GetBoolean("Field.Required")) {<text>required</text>} /></div> 95 } 96 } 97 } 98 @GetString("Form.FormEnd") 99 </div><div><img src="/files/templates/designs/randers-tegl/images-rt-2.0/product-order-samples.png" alt="" /></div></div></div> 100
Your order will be dispatched as soon as possible.
RT-2.0_Tak_for_din_interesse_reference_modal_tekst
You can expect to hear from us shortly
Your order will be dispatched as soon as possible.
We will send you the addresses as soon as possible. You are welcome to take a tour in our inspiration universe while you wait.