Error executing template "Designs/randers-tegl/eCom/Product/dw9.rt-2.0.product.mursten.cshtml" System.ArgumentOutOfRangeException: StartIndex cannot be less than zero. Parameter name: startIndex at System.String.Substring(Int32 startIndex, Int32 length) at CompiledRazorTemplates.Dynamic.RazorEngine_eb518817406e4a079914b64ead316705.Execute() in D:\dynamicweb.net\Solutions\Gotcha\randerstegl.dev.gotcha.dk\Files\Templates\Designs\randers-tegl\eCom\Product\dw9.rt-2.0.product.mursten.cshtml:line 521 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 @using System.Text.RegularExpressions; 2 3 @{ 4 string productFolder = "/Files/Images/products-v2/" + GetString("Ecom:Product.Number").Replace(" ", "").ToLower(); 5 string backgroundImageUrl = ""; 6 string productCategory = ""; 7 8 if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath(productFolder + "/gallery_main.jpg"))) { 9 backgroundImageUrl = productFolder + "/gallery_main.jpg"; 10 } 11 12 foreach (var pc in GetLoop("ProductCategories")) { 13 productCategory = pc.GetString("Ecom:Product.Category.ID").ToLower(); 14 } 15 16 if (GetString("Ecom:Product.Name").ToLower() == "ultima") { 17 string productNumberReplaced = GetString("Ecom:Product.Number").Replace(" ","-").ToLower(); 18 string link = Pageview.Area.Item["Ultima_URL"].ToString().ToLower() + productNumberReplaced; 19 20 System.Web.HttpContext.Current.Response.Status = "301 Moved Permanently"; 21 System.Web.HttpContext.Current.Response.AddHeader("Location",link); 22 } 23 24 25 if (productCategory != "mursten") { 26 string link = ""; 27 string currentUrl = GetGlobalValue("Global:Pageview.Url"); 28 29 if (productCategory == "tagsten") { 30 link = Pageview.Area.Item["TagstenProdukt_URL"].ToString().ToLower(); 31 } 32 33 if (productCategory == "belaegning") { 34 link = Pageview.Area.Item["BelaegningProdukt_URL"].ToString().ToLower(); 35 } 36 37 38 link = link + currentUrl.Substring(currentUrl.LastIndexOf("/") + 1); 39 40 System.Web.HttpContext.Current.Response.Status = "301 Moved Permanently"; 41 System.Web.HttpContext.Current.Response.AddHeader("Location",link); 42 } 43 44 string searchpattern = @"gallery_\d{2}\.jpg"; 45 string[] galleryImages = new string[0]; 46 47 if (System.IO.Directory.Exists(System.Web.HttpContext.Current.Server.MapPath("~\\Files\\Images\\products-v2\\" + @GetString("Ecom:Product.Number").Replace(" ","").ToLower() + "\\"))) { 48 galleryImages = System.IO.Directory.GetFiles(System.Web.HttpContext.Current.Server.MapPath("~\\Files\\Images\\products-v2\\" + @GetString("Ecom:Product.Number").Replace(" ","").ToLower() + "\\")).Where(path => System.Text.RegularExpressions.Regex.Match(path, searchpattern).Success).ToArray(); 49 50 if (GetInteger("Ecom:Product:Area.ID") != 1) { 51 string language = GetString("Ecom:Product:Area.Name").ToString().ToLower(); 52 string languageBackgroundImageUrl = ""; 53 54 if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath(productFolder + "/gallery_main_" + language + ".jpg"))) { 55 backgroundImageUrl = productFolder + "/gallery_main_" + language +".jpg"; 56 } 57 58 string languageSearchpattern = "gallery_0*_" + language + ".jpg"; 59 string[] languageGalleryImages = new string[0]; 60 61 try { 62 languageGalleryImages = System.IO.Directory.GetFiles(System.Web.HttpContext.Current.Server.MapPath("~\\Files\\Images\\products-v2\\" + @GetString("Ecom:Product.Number").Replace(" ","").ToLower() + "\\"), languageSearchpattern); 63 } catch { 64 65 } 66 67 if (languageBackgroundImageUrl != "") { 68 backgroundImageUrl = languageBackgroundImageUrl; 69 } 70 71 if (languageGalleryImages.Length > 0) { 72 galleryImages = languageGalleryImages; 73 } 74 } 75 } 76 77 string stackImageUrl = ""; 78 79 if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Images/products-v2/" + GetString("Ecom:Product.Number").Replace(" ","").ToLower() + "/stack.png"))) { 80 stackImageUrl = "/Files/Images/products-v2/" + GetString("Ecom:Product.Number").Replace(" ","").ToLower() + "/stack.png"; 81 } 82 if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Images/products-v2/" + GetString("Ecom:Product.Number").Replace(" ","").ToLower() + "/stack_wide.png"))) { 83 stackImageUrl = "/Files/Images/products-v2/" + GetString("Ecom:Product.Number").Replace(" ","").ToLower() + "/stack_wide.png"; 84 } 85 if (Pageview.Area.ID == 9 && System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Images/products-v2/" + GetString("Ecom:Product.Number").Replace(" ","").ToLower() + "/stack_de.png"))) { 86 stackImageUrl = "/Files/Images/products-v2/" + GetString("Ecom:Product.Number").Replace(" ","").ToLower() + "/stack_de.png"; 87 } 88 if (Pageview.Area.ID == 9 && System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Images/products-v2/" + GetString("Ecom:Product.Number").Replace(" ","").ToLower() + "/stack_wide_de.png"))) { 89 stackImageUrl = "/Files/Images/products-v2/" + GetString("Ecom:Product.Number").Replace(" ","").ToLower() + "/stack_wide_de.png"; 90 } 91 92 string wallImageUrl = ""; 93 94 if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Images/products-v2/" + GetString("Ecom:Product.Number").Replace(" ","").ToLower() + "/wall.jpg"))) { 95 wallImageUrl = "/Files/Images/products-v2/" + GetString("Ecom:Product.Number").Replace(" ","").ToLower() + "/wall.jpg"; 96 } 97 if (Pageview.Area.ID == 8 && System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Images/products-v2/" + GetString("Ecom:Product.Number").Replace(" ","").ToLower() + "/wall_se.png"))) { 98 wallImageUrl = "/Files/Images/products-v2/" + GetString("Ecom:Product.Number").Replace(" ","").ToLower() + "/wall_se.png"; 99 } 100 if (Pageview.Area.ID == 9 && System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Images/products-v2/" + GetString("Ecom:Product.Number").Replace(" ","").ToLower() + "/wall_de.png"))) { 101 wallImageUrl = "/Files/Images/products-v2/" + GetString("Ecom:Product.Number").Replace(" ","").ToLower() + "/wall_de.png"; 102 } 103 104 string productVideo = GetString("Ecom:Product:Field.Video"); 105 string YouTubeID = ""; 106 string VimeoID = ""; 107 108 if (productVideo.Contains("youtube")) { 109 int index = productVideo.IndexOf("v="); 110 YouTubeID = productVideo.Substring(index + 2); 111 } else if (productVideo.Contains("youtu.be")) { 112 int index = productVideo.LastIndexOf("/"); 113 YouTubeID = productVideo.Substring(index + 1); 114 } 115 if (productVideo.Contains("vimeo")) { 116 int index = productVideo.LastIndexOf("/"); 117 VimeoID = productVideo.Substring(index + 1); 118 } 119 120 bool greener = GetBoolean("Ecom:Product:Field.Greener"); 121 bool sample = GetBoolean("Ecom:Product:Field.DisableSample"); 122 } 123 124 @SnippetStart("Schema") 125 <script type="application/ld+json"> 126 { 127 "@@context": "http://schema.org", 128 "@@type": "Product", 129 @if (GetString("Ecom:Product.CategoryField.Mursten.ProduktSerie.OptionLabel") != @GetString("Ecom:Product.Name")) { 130 <text>"name": "@GetString("Ecom:Product.Number") @GetString("Ecom:Product.CategoryField.Mursten.ProduktSerie.OptionLabel") @GetString("Ecom:Product.Name")",</text> 131 } else { 132 <text>"name": "@GetString("Ecom:Product.Number") @GetString("Ecom:Product.Name")",</text> 133 } 134 "description": "@System.Text.RegularExpressions.Regex.Replace(GetString("Ecom:Product.LongDescription"), "<[^>]*>", String.Empty).Replace("\r", "").Replace("\n", "").Replace("\t", "")", 135 @if (wallImageUrl != "") { 136 <text>"image": "@wallImageUrl",</text> 137 } else { 138 <text>"image": "@stackImageUrl",</text> 139 } 140 "color": "@GetString("Ecom:Product.CategoryField.Mursten.ProduktFarve.Value")", 141 "brand": "@Pageview.Area.Item["SchemaName"].ToString()" 142 } 143 </script> 144 @SnippetEnd("Schema") 145 146 <div class="product-buttons"> 147 @if (galleryImages.Length > 0 || !string.IsNullOrWhiteSpace(YouTubeID) || !string.IsNullOrWhiteSpace(VimeoID)) { 148 <button class="product-button product-button-gallery"><span class="text">@Translate("RT-2.0_Produkt_se_galleri")</span><span class="icon"> 149 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-gallery.svg"))) { 150 <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-gallery.svg"))</text> 151 } 152 </span></button> 153 } 154 155 @if (Pageview.Area.ID == 8) { 156 <button class="product-button product-button-mortar" data-target="modal-24261"><span class="text">För arkitekter</span><span class="icon"> 157 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Images/product_action_icons/icon-mortar.svg"))) { 158 <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Images/product_action_icons/icon-mortar.svg"))</text> 159 } 160 </span></button> 161 } 162 163 @if (GetInteger("Ecom:Product:Area.ID") != 7) { 164 <button class="product-button product-button-orange product-button-plus"> 165 @if (!sample) { 166 <span class="description"><span class="heading">@Translate("RT-2.0_FixedCTA_Header")</span> 167 @Translate("RT-2.0_FixedCTA_Subheader") 168 </span> 169 } 170 <span class="icon"> 171 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-plus.svg"))) { 172 <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-plus.svg"))</text> 173 } 174 </span></button><div class="extras"> 175 @if (Pageview.Area.ID == 8) { 176 <button class="product-button product-button-small product-button-mortar" data-target="modal-24261"><span class="text">För arkitekter</span><span class="icon"> 177 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Images/product_action_icons/icon-mortar.svg"))) { 178 <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Images/product_action_icons/icon-mortar.svg"))</text> 179 } 180 </span></button> 181 } 182 @if (!sample && !string.IsNullOrWhiteSpace(Pageview.Page.PropertyItem["HubspotFormPage"].ToString())) { 183 <a href='/Default.aspx?ID=@Pageview.Page.PropertyItem["HubspotFormPage"].ToString()&ProductID=@GetString("Ecom:Product.ID")' class="product-button product-button-small product-button-samples"><span class="text">@Translate("RT-2.0_FixedCTA_Bestil")</span><span class="icon"> 184 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-box.svg"))) { 185 <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-box.svg"))</text> 186 } 187 </span></a> 188 } 189 @if (!sample && !string.IsNullOrWhiteSpace(Pageview.Page.PropertyItem["ProduktPr_vekasseFormularAfsnit"].ToString())) { 190 <button class="product-button product-button-small product-button-samples" data-target='modal-@Pageview.Page.PropertyItem["ProduktPr_vekasseFormularAfsnit"].ToString()'><span class="text">@Translate("RT-2.0_FixedCTA_Bestil")</span><span class="icon"> 191 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-box.svg"))) { 192 <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-box.svg"))</text> 193 } 194 </span></button> 195 } 196 <button class="product-button product-button-small product-button-phone"><span class="text"> 197 @Translate("RT-2.0_FixedCTA_Ring") 198 @if (GetInteger("Ecom:Product:Area.ID") == 1) { 199 <a href="tel:+4598122844">98 12 28 44</a> 200 } else if (GetInteger("Ecom:Product:Area.ID") == 8) { 201 <a href="tel:+460406080300">040-608 03 00</a> 202 } else if (GetInteger("Ecom:Product:Area.ID") == 9) { 203 <a href="tel:+49419287930">+49(0)4192 87930</a> 204 } else if (GetInteger("Ecom:Product:Area.ID") == 10) { 205 <a href="tel:+4598122844">DK +45 98 12 28 44</a> 206 } 207 </span><span class="icon"> 208 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-phone.svg"))) { 209 <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-phone.svg"))</text> 210 } 211 </span></button> 212 @if (!string.IsNullOrWhiteSpace(Pageview.Page.PropertyItem["ProduktSp_rgsm_lsformularAfsnit"].ToString())) { 213 <button class="product-button product-button-small product-button-question" data-target='modal-@Pageview.Page.PropertyItem["ProduktSp_rgsm_lsformularAfsnit"].ToString()'><span class="text">@Translate("RT-2.0_FixedCTA_Spoerg")</span><span class="icon"> 214 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-mail.svg"))) { 215 <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-mail.svg"))</text> 216 } 217 </span></button> 218 } 219 </div> 220 } else { 221 <button class="product-button product-button-orange product-button-contact" data-target='modal-@Pageview.Page.PropertyItem["ProduktSp_rgsm_lsformularAfsnit"].ToString()'><span class="description"><span class="heading">@Translate("RT-2.0_Har_du_spm_til_dette_produkt")</span><span class="link"><span class="arrow-link"><span> 222 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { 223 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 224 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 225 } 226 </span></span> 227 @Translate("RT-2.0_Spoerg_vores_eksperter") 228 </span></span><span class="icon"> 229 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-contact.svg"))) { 230 <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-contact.svg"))</text> 231 } 232 </span><span class="close"> 233 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))) { 234 <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))</text> 235 } 236 </span></button> 237 } 238 </div> 239 240 @if (backgroundImageUrl != "") { 241 <header id="header" class='@(!string.IsNullOrWhiteSpace(YouTubeID) || !string.IsNullOrWhiteSpace(VimeoID) ? "video" : "wrap-fluid")' data-product-number='@GetString("Ecom:Product.Number")'> 242 @if (!string.IsNullOrWhiteSpace(YouTubeID) || !string.IsNullOrWhiteSpace(VimeoID)) { 243 <div class="background-video" @(backgroundImageUrl != "" ? "style='background-image: url(" + backgroundImageUrl + ")'" : null)> 244 @if (!string.IsNullOrWhiteSpace(YouTubeID)) { 245 <iframe src='https://www.youtube-nocookie.com/embed/@YouTubeID?autoplay=1&controls=0&disablekb=1&loop=1&modestbranding=1&mute=1&playsinline=1&rel=0' frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> 246 } 247 @if (!string.IsNullOrWhiteSpace(VimeoID)) { 248 <iframe frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen data-consent-src='https://player.vimeo.com/video/@VimeoID?background=1' data-category-consent="cookie_cat_marketing"></iframe> 249 } 250 </div> 251 } 252 <div class="wrap-inner" @(backgroundImageUrl != "" ? "style='background-image: url(" + backgroundImageUrl + ")'" : null)><div class="column-xxs-24"><h1> 253 @GetString("Ecom:Product.Number") 254 <br /><span><span>@GetString("Ecom:Product.CategoryField.Mursten.ProduktSerie.OptionLabel")</span></span></h1> 255 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-down.svg"))) { 256 <span class="icon-arrow-down"> 257 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-down.svg")) 258 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-down.svg")) 259 </span> 260 } 261 </div></div> 262 @if (string.IsNullOrWhiteSpace(YouTubeID) && string.IsNullOrWhiteSpace(VimeoID)) { 263 @SnippetStart("NavigationBackground") 264 <div class="navigation__background__image-wrap"><img class="navigation__background__image" data-src="@backgroundImageUrl" alt="" /></div> 265 @SnippetEnd("NavigationBackground") 266 } 267 </header><div id="product-gallery" class="wrap-fluid"><div class="wrap-inner"><div class="gallery-item js-active" style="background-image: url(@backgroundImageUrl);"></div> 268 @for (var a = 0; a < galleryImages.Length; a++) { 269 string path = galleryImages[a].Substring(galleryImages[a].IndexOf("\\files")).Replace("\\","/"); 270 271 if (a == 0) { 272 <div class="gallery-item" style="background-image: url(@path);"></div> 273 } else { 274 <div class="gallery-item" style="background-image: url(@path);"></div> 275 } 276 } 277 </div> 278 @if (galleryImages.Length > 0) { 279 <a id="product-gallery-prev"> 280 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-gallery-arrow-left.svg"))) { 281 <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-gallery-arrow-left.svg"))</text> 282 } 283 </a><a id="product-gallery-next"> 284 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-gallery-arrow-right.svg"))) { 285 <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-gallery-arrow-right.svg"))</text> 286 } 287 </a> 288 } 289 <a class="icon icon-close" id="product-gallery-close"> 290 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))) { 291 <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))</text> 292 } 293 </a><span class="icon-rotate"> 294 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-rotate.svg"))) { 295 <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-rotate.svg"))</text> 296 } 297 </span></div> 298 } 299 <section id="product-presentation" class="wrap-fluid"><div class="wrap-inner"><div class="column-xxs-24 column-md-12"><div class="wrap-inner"><div class="column-xxs-top-4 column-xxs-bottom-8 column-xxs-left-2 column-xxs-right-2 column-sm-trbl-2 column-md-left-1 column-md-right-1 column-xl-trbl-2"> 300 @if (GetString("Ecom:Product.CategoryField.Mursten.ProduktSerie.OptionLabel") != @GetString("Ecom:Product.Name")) { 301 if (backgroundImageUrl == "") { 302 <h1 class="header">@GetString("Ecom:Product.Number") @GetString("Ecom:Product.CategoryField.Mursten.ProduktSerie.OptionLabel")</h1> 303 } else { 304 <span class="header">@GetString("Ecom:Product.Number") @GetString("Ecom:Product.CategoryField.Mursten.ProduktSerie.OptionLabel")</span> 305 } 306 <h2>@GetString("Ecom:Product.Name")</h2> 307 } else { 308 if (backgroundImageUrl == "") { 309 <h1 class="header">@GetString("Ecom:Product.Number")</h1> 310 } else { 311 <span class="header">@GetString("Ecom:Product.Number")</span> 312 } 313 <h2>@GetString("Ecom:Product.Name")</h2> 314 } 315 <div class="teaser-text"> 316 @GetString("Ecom:Product.ShortDescription") 317 </div> 318 @if (stackImageUrl != "") { 319 <div class='image-wrap @(stackImageUrl.Contains("wide") ? "wide" : null)'><img src="@stackImageUrl" alt='@GetString("Ecom:Product.Number") @GetString("Ecom:Product.CategoryField.Mursten.ProduktSerie.OptionLabel") @GetString("Ecom:Product.CategoryField.Mursten.ProduktFormat.OptionLabel")' /><a class="icon-plus" data-target="product-image-modal"> 320 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-plus.svg"))) { 321 <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-plus.svg"))</text> 322 } 323 </a></div> 324 } else if (!string.IsNullOrEmpty(GetString("Ecom:Product.ImageLarge.Default.Clean"))) { 325 <div class="image-wrap"><img src='@GetString("Ecom:Product.ImageLarge.Default.Clean")' alt='@GetString("Ecom:Product.Number") @GetString("Ecom:Product.CategoryField.Mursten.ProduktSerie.OptionLabel") @GetString("Ecom:Product.CategoryField.Mursten.ProduktFormat.OptionLabel")' /><a class="icon-plus" data-target="product-image-modal"> 326 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-plus.svg"))) { 327 <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-plus.svg"))</text> 328 } 329 </a></div> 330 } 331 <div> 332 @GetString("Ecom:Product.LongDescription") 333 334 @if (GetInteger("Ecom:Product:Area.ID") != 7) { 335 if (!sample && !string.IsNullOrWhiteSpace(Pageview.Page.PropertyItem["HubspotFormPage"].ToString())) { 336 <p><a href='/Default.aspx?ID=@Pageview.Page.PropertyItem["HubspotFormPage"].ToString()&ProductID=@GetString("Ecom:Product.ID")' class="product-button-samples-description" data-open-tracking-category="Mursten produkt - Beskrivelse CTA klik" data-open-tracking-action="Klik - bestil en gratis prøvekasse"><span class="arrow-link"><span><span><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 134.924 95.583"><path d="M134.24 46.145L87.784.687a2.328 2.328 0 0 0-3.974 1.646V34.35H9.95C4.478 34.35 0 37.826 0 43.3v7.98a9.98 9.98 0 0 0 9.952 9.953H83.81V93.25a2.328 2.328 0 0 0 3.973 1.65l46.458-45.458a2.327 2.327 0 0 0 0-3.297z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 134.924 95.583"><path d="M134.24 46.145L87.784.687a2.328 2.328 0 0 0-3.974 1.646V34.35H9.95C4.478 34.35 0 37.826 0 43.3v7.98a9.98 9.98 0 0 0 9.952 9.953H83.81V93.25a2.328 2.328 0 0 0 3.973 1.65l46.458-45.458a2.327 2.327 0 0 0 0-3.297z"></path></svg></span></span></span> 337 @Translate("RT-2.0_FixedCTA_Bestil") 338 </a></p> 339 } 340 if (!sample && !string.IsNullOrWhiteSpace(Pageview.Page.PropertyItem["ProduktPr_vekasseFormularAfsnit"].ToString())) { 341 <p><a data-target='modal-@Pageview.Page.PropertyItem["ProduktPr_vekasseFormularAfsnit"].ToString()' class="product-button-samples-description" data-open-tracking-category="Mursten produkt - Beskrivelse CTA klik" data-open-tracking-action="Klik - bestil en gratis prøvekasse"><span class="arrow-link"><span><span><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 134.924 95.583"><path d="M134.24 46.145L87.784.687a2.328 2.328 0 0 0-3.974 1.646V34.35H9.95C4.478 34.35 0 37.826 0 43.3v7.98a9.98 9.98 0 0 0 9.952 9.953H83.81V93.25a2.328 2.328 0 0 0 3.973 1.65l46.458-45.458a2.327 2.327 0 0 0 0-3.297z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 134.924 95.583"><path d="M134.24 46.145L87.784.687a2.328 2.328 0 0 0-3.974 1.646V34.35H9.95C4.478 34.35 0 37.826 0 43.3v7.98a9.98 9.98 0 0 0 9.952 9.953H83.81V93.25a2.328 2.328 0 0 0 3.973 1.65l46.458-45.458a2.327 2.327 0 0 0 0-3.297z"></path></svg></span></span></span> 342 @Translate("RT-2.0_FixedCTA_Bestil") 343 </a></p> 344 } 345 } 346 </div></div></div></div><div class="column-xxs-24 column-md-12 product-image"> 347 @if (wallImageUrl != "") { 348 <style> 349 /*@@media (min-width: 992px) { 350 .product-image { 351 display: flex !important; 352 flex-direction: column; 353 justify-content: flex-start; 354 align-items: center; 355 } 356 } 357 358 #product-presentation { 359 background-color: #fff; 360 text-align: left; 361 } 362 363 #product-presentation .column-xl-trbl-2 { 364 margin: 0 !important; 365 padding: 40px 20px !important; 366 } 367 368 @@media (min-width: 768px) { 369 #product-presentation .column-xl-trbl-2 { 370 padding: 11.08247vw 8.19588vw !important; 371 } 372 } 373 374 @@media (min-width: 992px) { 375 #product-presentation .column-xl-trbl-2 { 376 padding: 11.08247vw 8.19588vw 11.08247vw 17.42268vw !important; 377 } 378 } 379 380 @@media (min-width: 1940px) { 381 #product-presentation .column-xl-trbl-2 { 382 padding: 215px 159px 215px 338px !important; 383 } 384 } 385 386 #product-presentation .product-image__wrap { 387 margin-left: 0; 388 margin-right: 0; 389 padding: 40px 20px; 390 } 391 392 #product-presentation .image-wrap { 393 margin-left: 0; 394 margin-right: 0; 395 } 396 397 @@media (min-width: 768px) { 398 #product-presentation img { 399 margin-top: 4rem; 400 } 401 } 402 403 @@media (min-width: 768px) { 404 #product-presentation h1, 405 #product-presentation span, 406 #product-presentation h2 { 407 font-size: 4.8rem; 408 line-height: 5.6rem; 409 } 410 } 411 412 413 @@media (min-width: 768px) { 414 #product-presentation .product-image__wrap { 415 padding: 11.08247vw 8.19588vw; 416 position: sticky; 417 top: 0; 418 } 419 } 420 421 @@media (min-width: 992px) { 422 #product-presentation .product-image__wrap { 423 padding: 11.08247vw 17.42268vw 11.08247vw 2.31959vw; 424 } 425 } 426 427 @@media (min-width: 1940px) { 428 #product-presentation .product-image__wrap { 429 padding: 215px 338px 215px 45px; 430 } 431 } 432 433 .product-image__wrap-inner { 434 max-width: 525px; 435 display: block; 436 } 437 438 .product-image__wrap img { 439 margin: 0 !important; 440 } 441 442 @@media (min-width: 1200px) { 443 #product-presentation .wrap-inner { 444 font-size: 1.8rem; 445 line-height: 2.7rem; 446 } 447 }*/ 448 </style><div class="product-image__wrap"> 449 @{ 450 string productImageTitle = GetString("Ecom:Product.Number") + " " + @GetString("Ecom:Product.CategoryField.Mursten.ProduktSerie.OptionLabel"); 451 string wallLarge = "/admin/public/getimage.ashx?Image=" + wallImageUrl + "&width=595&compression=100"; 452 string wallMedium = "/admin/public/getimage.ashx?Image=" + wallImageUrl + "&width=540&compression=100"; 453 string wallSmall = "/admin/public/getimage.ashx?Image=" + wallImageUrl + "&width=851&compression=100"; 454 string wallDefault = "/admin/public/getimage.ashx?Image=" + wallImageUrl + "&width=660&compression=100"; 455 } 456 <picture class="product-image__wrap-inner"><source srcset="@wallLarge" media="(min-width: 1500px)"><source srcset="@wallMedium" media="(min-width: 992px)"><source srcset="@wallSmall" media="(min-width: 768px)"><img src="@wallDefault" alt="." class="" loading="lazy"></picture></div> 457 } 458 </div></div></section> 459 @if (backgroundImageUrl != "") { 460 <section id="mobile-gallery" class="wrap-fluid"><div class="wrap-inner"><div class="image" @if (backgroundImageUrl != "") {<text>style="background-image: url(@backgroundImageUrl)"</text>}></div><a data-target="product-gallery-modal"><span class="icon icon-gallery"> 461 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-gallery.svg"))) { 462 <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-gallery.svg"))</text> 463 } 464 </span> 465 @Translate("RT-2.0_Se_galleri") 466 </a></div></section> 467 } 468 @if (greener) { 469 @RenderSnippet("ProductGreener") 470 } 471 <section id="product-data" class="wrap-fluid"><div class="wrap-inner"><div class="data-wrap column-xxs-24 column-md-12"><div class="wrap-inner"> 472 473 @if (GetInteger("Ecom:Product:Area.ID") == 1) { 474 <div class="column-xxs-24 column-xxs-top-2 column-xxs-bottom-2 column-xxs-left-2 column-xxs-right-2 column-md-trbl-2 column-lg-left-3 column-lg-right-3" data-target="product-freigt-prices"><span class="icon-plus"> 475 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-plus.svg"))) { 476 <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-plus.svg"))</text> 477 } 478 </span><span class="header">@Translate("RT-2.0_Priser_og_levering")</span><p>Pris fra <span>@GetString("Ecom:Product.Price.PriceWithVATFormatted")</span> @Translate("RT-2.0_MurstenProduktlisteProdukt1000Sten") 479 <small>@Translate("RT-2.0_ProduktPrisTooltip")</small></p><a id="price-and-delivery"><span class="arrow-link"><span> 480 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { 481 <span> 482 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 483 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 484 </span> 485 } 486 </span></span> 487 @Translate("RT-2.0_ProduktFragtpriser") 488 </a></div> 489 } else if (GetInteger("Ecom:Product:Area.ID") == 7 || GetInteger("Ecom:Product:Area.ID") == 8 || GetInteger("Ecom:Product:Area.ID") == 9 || GetInteger("Ecom:Product:Area.ID") == 10) { 490 <div class="column-xxs-24 column-xxs-top-2 column-xxs-bottom-2 column-xxs-left-2 column-xxs-right-2 column-md-trbl-2 column-lg-left-3 column-lg-right-3" data-target='modal-@Pageview.Page.PropertyItem["ProduktSp_rgsm_lsformularAfsnit"].ToString()'><span class="header">@Translate("RT-2.0_Priser_ved_forespørgsel")</span><p>@Translate("RT-2.0_Priser_ved_forespørgsel_forklaring")</p><a id="price-at-request"><span class="arrow-link"><span> 491 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { 492 <span> 493 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 494 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 495 </span> 496 } 497 </span></span> 498 @Translate("RT-2.0_Priser_ved_forespørgsel_Kontakt_os") 499 </a></div> 500 } 501 </div></div><div class="data-wrap column-xxs-24 column-md-12"><div class="wrap-inner"><div class="column-xxs-24 column-xxs-top-2 column-xxs-bottom-2 column-xxs-left-2 column-xxs-right-2 column-md-trbl-2 column-lg-left-3 column-lg-right-3" data-target="product-technical-data-download"><span class="icon-plus"> 502 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-plus.svg"))) { 503 <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-plus.svg"))</text> 504 } 505 </span><span class="header">@Translate("RT-2.0_TekniskDataDownload")</span><p>@Translate("RT-2.0_Teknisk_data_beskrivelse")</p><a id="technical-data-and-download"><span class="arrow-link"> 506 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) { 507 <span> 508 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 509 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg")) 510 </span> 511 } 512 </span> 513 @Translate("RT-2.0_Find_datablade_links_og_downloads") 514 </a></div></div></div></div></section> 515 @if (greener) { 516 @RenderSnippet("ProductStoryTop") 517 } 518 @SnippetStart("Modals") 519 <div id="product-gallery-modal" class="product-modal"><div class="gallery-item js-active" style="background-image: url(@backgroundImageUrl);"></div> 520 @for (var a = 0; a < galleryImages.Length; a++) { 521 string path = galleryImages[a].Substring(galleryImages[a].IndexOf("\\files")).Replace("\\","/"); 522 523 if (a == 0) { 524 <div class="gallery-item js-next" style="background-image: url(@path);"></div> 525 } else if (a == 1) { 526 <div class="gallery-item js-prev" style="background-image: url(@path);"></div> 527 } else { 528 <div class="gallery-item" style="background-image: url(@path);"></div> 529 } 530 } 531 <span class="icon-close"> 532 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))) { 533 <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))</text> 534 } 535 </span><span class="icon-rotate"> 536 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-rotate.svg"))) { 537 <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-rotate.svg"))</text> 538 } 539 </span></div><div id="product-image-modal" class="product-modal" @if (wallImageUrl != "") {<text>style="background-image: url(@wallImageUrl)"</text>}><span class="icon-close"> 540 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))) { 541 <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))</text> 542 } 543 </span></div><div id="product-freigt-prices" class="product-modal"><div class="column-xxs-20 column-md-14 column-lg-12 column-xl-10 column-xxl-8 column-xxs-top-6 column-xxs-left-2 column-md-top-2 column-md-left-5 column-lg-left-6 column-xl-left-7 column-xxl-left-8 column-xxs-top-2 column-xxs-bottom-2"><div class="wrap-inner"><div class="column-xxs-24"><span class="header">@Translate("RT-2.0_Priser_og_levering")</span></div><div class="content"> 544 @GetString("Ecom:Product.CategoryField.Mursten.ProduktFragtpriser.Value.Clean") 545 </div></div></div><span class="icon-close"> 546 s @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))) { 547 <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))</text> 548 } 549 </span></div><div id="product-technical-data-download" class="product-modal"><div class="column-xxs-22 column-lg-18 column-xxs-left-1 column-lg-left-3 column-xxs-top-6 column-xxs-bottom-2 column-md-top-2"><div class="wrap-inner"><div class="column-xxs-24"><span class="header">@Translate("RT-2.0_TekniskDataDownload")</span></div><div class="column-xxs-24 column-md-8"> 550 @{ 551 string productFilesFolder = GetString("Ecom:Product.Number").Replace(" ", "").ToLower().Replace("rt",""); 552 553 if (GetBoolean("Ecom:Product:Field.DataFilesEntireProductNumber") == false) { 554 productFilesFolder = "rt-" + Regex.Match(productFilesFolder, @"\d+").Value; 555 } else { 556 productFilesFolder = "rt-" + productFilesFolder; 557 } 558 } 559 <ul data-folder="@productFilesFolder"><li><span class="subheader">@Translate("RT-2.0_TekniskDataDownloadDatablade")</span></li> 560 @{ 561 try { 562 string[] files = System.IO.Directory.GetFiles(System.Web.HttpContext.Current.Server.MapPath("~\\files\\files\\varekatalog\\mursten\\" + productFilesFolder + "\\datablade\\" + GetString("Ecom:Product:Area.Name"))); 563 int counter = 0; 564 565 foreach (string s in files) { 566 string filepath = s.Substring(s.IndexOf("\\files"), s.Length - s.IndexOf("\\files")); 567 string filename = filepath.Substring(filepath.IndexOf("datablade"), filepath.Length - filepath.IndexOf("datablade")); 568 569 <li><a href="@filepath" target="_blank">Download data sheets (@filename.Replace("datablade\\" + GetString("Ecom:Product:Area.Name") + "\\", "").Replace("-", " ").Replace("_", " ").Replace(".pdf", ""))</a></li> 570 571 counter++; 572 } 573 } catch { 574 575 } 576 } 577 </ul></div><div class="column-xxs-24 column-md-8"><ul><li><span class="subheader">@Translate("RT-2.0_ProduktRelevanteDownloads")</span></li> 578 @GetString("Ecom:Product.CategoryField.Mursten.ProduktRelevanteDownloads.Value.Clean").Replace("<ul>","").Replace("</ul>","") 579 </ul></div><div class="column-xxs-24 column-md-8"><ul><li><span class="subheader">@Translate("RT-2.0_ProduktOvrigtLinks")</span></li> 580 @GetString("Ecom:Product.CategoryField.Mursten.ProduktOvrigtLinks.Value.Clean").Replace("<ul>","").Replace("</ul>","") 581 </ul></div></div></div><span class="icon-close"> 582 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))) { 583 <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))</text> 584 } 585 </span></div> 586 @SnippetEnd("Modals") 587 @SnippetStart("JavascriptBottom") 588 <script> 589 var cl = setInterval(function() { 590 if (document.readyState == 'complete' || document.readyState == 'loaded' || document.readyState == 'interactive') { 591 clearInterval(cl); 592 593 var referencetoolProductID = document.querySelector('#reference-tool input[name="ProduktID"]'); 594 var referencetoolGroupID = document.querySelector('#reference-tool input[name="GruppeID"]'); 595 var referencetoolProductNumber = document.querySelector('#reference-tool input[name="ProduktNr"]'); 596 var referencetoolProductImage = document.querySelector('#reference-tool input[name="ProduktBillede"]'); 597 598 if (referencetoolProductID != undefined) { 599 referencetoolProductID.value = '@GetString("Ecom:Product.ID")'; 600 } 601 602 if (referencetoolGroupID != undefined) { 603 referencetoolGroupID.value = '@GetString("Ecom:Product.PrimaryOrFirstGroupID")'; 604 } 605 606 if (referencetoolProductNumber != undefined) { 607 referencetoolProductNumber.value = '@GetString("Ecom:Product.Number")'; 608 } 609 610 if (referencetoolProductImage != undefined) { 611 referencetoolProductImage.value = '@GetString("Ecom:Product.ImageMedium.Default.Clean")'; 612 } 613 } 614 },100); 615 </script> 616 @SnippetEnd("JavascriptBottom") 617
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 build
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.