Error executing template "Designs/randers-tegl/eCom/Product/dw9.rt-2.0.product.belaegning.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
at CompiledRazorTemplates.Dynamic.RazorEngine_86e21552527949e2a83e46d3fb945796.Execute() in D:\dynamicweb.net\Solutions\Gotcha\randerstegl.cloud.dynamicweb-cms.com\files\Templates\Designs\randers-tegl\eCom\Product\dw9.rt-2.0.product.belaegning.cshtml:line 145
at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader)
at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<RunCompile>b__0(TextWriter writer)
at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template)
at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template)
at Dynamicweb.Rendering.Template.RenderRazorTemplate()
1 @{
2 string productFolder = "/Files/Images/products-v2/" + GetString("Ecom:Product.Number").Replace(" ", "").ToLower();
3 string backgroundImageUrl = "";
4 string productCategory = "";
5
6 if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath(productFolder + "/gallery_main.jpg"))) {
7 backgroundImageUrl = productFolder + "/gallery_main.jpg";
8 }
9
10 foreach (var pc in GetLoop("ProductCategories")) {
11 productCategory = pc.GetString("Ecom:Product.Category.ID").ToLower();
12 }
13
14 if (productCategory != "belaegning") {
15 string link = "";
16 string currentUrl = GetGlobalValue("Global:Pageview.Url");
17
18 if (productCategory == "tagsten") {
19 link = Pageview.Area.Item["TagstenProdukt_URL"].ToString().ToLower();
20 }
21
22 if (productCategory == "mursten") {
23 link = Pageview.Area.Item["MurstenProdukt_URL"].ToString().ToLower();
24 }
25
26
27 link = link + currentUrl.Substring(currentUrl.LastIndexOf("/") + 1);
28
29 System.Web.HttpContext.Current.Response.Status = "301 Moved Permanently";
30 System.Web.HttpContext.Current.Response.AddHeader("Location",link);
31 }
32
33 string searchpattern = @"gallery_\d{2}\.jpg";
34 string[] galleryImages = new string[0];
35
36 if (System.IO.Directory.Exists(System.Web.HttpContext.Current.Server.MapPath("~\\Files\\Images\\products-v2\\" + @GetString("Ecom:Product.Number").Replace(" ","").ToLower() + "\\"))) {
37 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();
38
39 if (GetInteger("Ecom:Product:Area.ID") != 1) {
40 string language = GetString("Ecom:Product:Area.Name").ToString().ToLower();
41 string languageBackgroundImageUrl = "";
42
43 if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath(productFolder + "/gallery_main_" + language + ".jpg"))) {
44 backgroundImageUrl = productFolder + "/gallery_main_" + language +".jpg";
45 }
46
47 string languageSearchpattern = "gallery_0*_" + language + ".jpg";
48 string[] languageGalleryImages = new string[0];
49
50 try {
51 languageGalleryImages = System.IO.Directory.GetFiles(System.Web.HttpContext.Current.Server.MapPath("~\\Files\\Images\\products-v2\\" + @GetString("Ecom:Product.Number").Replace(" ","").ToLower() + "\\"), languageSearchpattern);
52 } catch {
53
54 }
55
56 if (languageBackgroundImageUrl != "") {
57 backgroundImageUrl = languageBackgroundImageUrl;
58 }
59
60 if (languageGalleryImages.Length > 0) {
61 galleryImages = languageGalleryImages;
62 }
63 }
64 }
65
66 string stackImageUrl = "";
67 string fileName = "stack";
68
69 if (GetInteger("Ecom:Product:Area.ID") == 9) {
70 fileName += "_de";
71 }
72
73 fileName += ".png";
74
75 if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath(productFolder + "/" + fileName))) {
76 stackImageUrl = productFolder + "/" + fileName;
77 }
78
79 string wallImageUrl = "";
80 string wallFileName = "wall";
81
82 if (GetInteger("Ecom:Product:Area.ID") == 9) {
83 wallFileName += "_de";
84 }
85
86 wallFileName += ".jpg";
87
88 if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath(productFolder + "/" + wallFileName))) {
89 wallImageUrl = productFolder + "/" + wallFileName;
90 } else if (GetInteger("Ecom:Product:Area.ID") == 9) {
91 wallFileName = "wall.jpg";
92
93 if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath(productFolder + "/" + wallFileName))) {
94 wallImageUrl = productFolder + "/" + wallFileName;
95 }
96 }
97
98 bool greener = GetBoolean("Ecom:Product:Field.Greener");
99 bool sample = GetBoolean("Ecom:Product:Field.DisableSample");
100 }
101
102 @SnippetStart("Schema")
103 <script type="application/ld+json">
104 {
105 "@@context": "http://schema.org",
106 "@@type": "Product",
107 @if (GetString("Ecom:Product.CategoryField.Belaegning.ProduktSerie.OptionLabel") != @GetString("Ecom:Product.Name")) {
108 <text>"name": "@GetString("Ecom:Product.Number") @GetString("Ecom:Product.CategoryField.Belaegning.ProduktSerie.OptionLabel") @GetString("Ecom:Product.Name")",</text>
109 } else {
110 <text>"name": "@GetString("Ecom:Product.Number") @GetString("Ecom:Product.Name")",</text>
111 }
112 "description": "@System.Text.RegularExpressions.Regex.Replace(GetString("Ecom:Product.LongDescription"), "<[^>]*>", String.Empty).Replace("\r", "").Replace("\n", "").Replace("\t", "")",
113 @if (wallImageUrl != "") {
114 <text>"image": "@wallImageUrl",</text>
115 } else {
116 <text>"image": "@stackImageUrl",</text>
117 }
118 "color": "@GetString("Ecom:Product.CategoryField.Belaegning.ProduktFarve.Value")",
119 "brand": "@Pageview.Area.Item["SchemaName"].ToString()"
120 }
121 </script>
122 @SnippetEnd("Schema")
123
124 <div class="product-buttons">
125 @if (galleryImages.Length > 0) {
126 <button class="product-button product-button-gallery"><span class="text">@Translate("RT-2.0_Produkt_se_galleri")</span><span class="icon">
127 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-gallery.svg"))) {
128 <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-gallery.svg"))</text>
129 }
130 </span></button>
131 }
132
133 @if (GetInteger("Ecom:Product:Area.ID") != 7) {
134 <button class="product-button product-button-orange product-button-plus">
135 @if (!sample) {
136 <span class="description"><span class="heading">@Translate("RT-2.0_FixedCTA_Header")</span>
137 @Translate("RT-2.0_FixedCTA_Subheader")
138 </span>
139 }
140 <span class="icon">
141 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-plus.svg"))) {
142 <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-plus.svg"))</text>
143 }
144 </span></button><div class="extras">
145 @if (!sample && !string.IsNullOrWhiteSpace(Pageview.Page.PropertyItem["HubspotFormPage"].ToString())) {
146 <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">
147 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-box.svg"))) {
148 <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-box.svg"))</text>
149 }
150 </span></a>
151 }
152 @if (!sample && !string.IsNullOrWhiteSpace(Pageview.Page.PropertyItem["ProduktPr_vekasseFormularAfsnit"].ToString())) {
153 <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">
154 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-box.svg"))) {
155 <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-box.svg"))</text>
156 }
157 </span></button>
158 }
159 <button class="product-button product-button-small product-button-phone"><span class="text">
160 @Translate("RT-2.0_FixedCTA_Ring")
161 @if (GetInteger("Ecom:Product:Area.ID") == 1) {
162 <a href="tel:+4598122844">98 12 28 44</a>
163 } else if (GetInteger("Ecom:Product:Area.ID") == 8) {
164 <a href="tel:+460406080300">040-608 03 00</a>
165 } else if (GetInteger("Ecom:Product:Area.ID") == 9) {
166 <a href="tel:+49419287930">+49(0)4192 87930</a>
167 } else if (GetInteger("Ecom:Product:Area.ID") == 10) {
168 <a href="tel:+4598122844">DK +45 98 12 28 44</a>
169 }
170 </span><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-phone.svg"))) {
172 <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-phone.svg"))</text>
173 }
174 </span></button><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">
175 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-mail.svg"))) {
176 <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-mail.svg"))</text>
177 }
178 </span></button></div>
179 } else {
180 <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>
181 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) {
182 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))
183 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))
184 }
185 </span></span>
186 @Translate("RT-2.0_Spoerg_vores_eksperter")
187 </span></span><span class="icon">
188 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-contact.svg"))) {
189 <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-contact.svg"))</text>
190 }
191 </span><span class="close">
192 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))) {
193 <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))</text>
194 }
195 </span></button>
196 }
197 </div>
198
199 @if (backgroundImageUrl != "") {
200 <header id="header" class="wrap-fluid" data-product-number='@GetString("Ecom:Product.Number")'><div class="wrap-inner" @if (backgroundImageUrl != "") {<text>style="background-image: url(@backgroundImageUrl);"</text>}><div class="column-xxs-24"><h1>
201 @GetString("Ecom:Product.Number")
202 <br /><span><span>@GetString("Ecom:Product.Name")</span></span></h1>
203 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-down.svg"))) {
204 <span class="icon-arrow-down">
205 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-down.svg"))
206 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-down.svg"))
207 </span>
208 }
209 </div></div>
210 @SnippetStart("NavigationBackground")
211 <div class="navigation__background__image-wrap"><img class="navigation__background__image" data-src="@backgroundImageUrl" alt="" /></div>
212 @SnippetEnd("NavigationBackground")
213 </header><div id="product-gallery" class="wrap-fluid"><div class="wrap-inner"><div class="gallery-item js-active" style="background-image: url(@backgroundImageUrl);"></div>
214 @for (var a = 0; a < galleryImages.Length; a++) {
215 string path = galleryImages[a].Substring(galleryImages[a].IndexOf("\\files")).Replace("\\","/");
216
217 if (a == 0) {
218 <div class="gallery-item" style="background-image: url(@path);"></div>
219 } else {
220 <div class="gallery-item" style="background-image: url(@path);"></div>
221 }
222 }
223 </div>
224 @if (galleryImages.Length > 0) {
225 <a id="product-gallery-prev">
226 @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"))) {
227 <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>
228 }
229 </a><a id="product-gallery-next">
230 @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"))) {
231 <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>
232 }
233 </a>
234 }
235 <a class="icon icon-close" id="product-gallery-close">
236 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))) {
237 <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))</text>
238 }
239 </a><span class="icon-rotate">
240 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-rotate.svg"))) {
241 <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-rotate.svg"))</text>
242 }
243 </span></div>
244 }
245 <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">
246 @if (GetString("Ecom:Product.CategoryField.Belaegning.ProduktSerie.OptionLabel") != @GetString("Ecom:Product.Name")) {
247 if (backgroundImageUrl != "") {
248 <h1 class="header">@GetString("Ecom:Product.Number") @GetString("Ecom:Product.CategoryField.Belaegning.ProduktSerie.OptionLabel")</h1>
249 } else {
250 <span class="header">@GetString("Ecom:Product.Number") @GetString("Ecom:Product.CategoryField.Belaegning.ProduktSerie.OptionLabel")</span>
251 }
252 <h2>@GetString("Ecom:Product.Name")</h2>
253 } else {
254 if (backgroundImageUrl != "") {
255 <h1 class="header">@GetString("Ecom:Product.Number")</h1>
256 } else {
257 <span class="header">@GetString("Ecom:Product.Number")</span>
258 }
259 <h2>@GetString("Ecom:Product.Name")</h2>
260 }
261 <div class="teaser-text"><p>@Translate("RT-2.0_BelaegningShop_Format") @GetString("Ecom:Product.ShortDescription").Replace("<p>","").Replace("</p>","")<br /> <br /></p></div><div class="product-description">
262 @GetString("Ecom:Product.LongDescription")
263 </div>
264 @if (GetInteger("Ecom:Product:Area.ID") != 8 && GetInteger("Ecom:Product:Area.ID") != 7) {
265 <div class="shop-info">
266 @{
267 double priceprm2 = Convert.ToDouble(GetString("Ecom:Product.Price.PriceWithVAT")) * Convert.ToDouble(GetString("Ecom:Product.CategoryField.Belaegning.ProduktAntalM2.Value"));
268
269 string sPriceprm2 = priceprm2.ToString("0,0.00");
270 }
271 <span class="price-info"><span>@Translate("RT-2.0_BelaegningShop_PrisPrM2")</span>
272 @if (Pageview.Area.ID == 1 || Pageview.Area.ID == 9) {
273 <span class="price">@sPriceprm2</span>
274 } else {
275 <span class="price">@GetString("Ecom:Product.Price.PriceWithVATFormatted")</span>
276 }
277 <small>@Translate("RT-2.0_BelaegningShop_PrisErInklMomsOgEksklFragt")</small></span><br /><span class="format-and-consumption">
278 @Translate("RT-2.0_BelaegningShop_ForbrugPrM2Ca") @GetString("Ecom:Product.CategoryField.Belaegning.ProduktForbrug.Value") @Translate("RT_2.0_BelaegningShop_ForbrugStk")
279 </span>
280 @if (GetInteger("Ecom:Product:Area.ID") == 1 /*|| GetInteger("Ecom:Product:Area.ID") == 9*/) {
281 string shopBelaegningPageID = "";
282
283 if (GetInteger("Ecom:Product:Area.ID") == 1) {
284 shopBelaegningPageID = "147";
285 } else if (GetInteger("Ecom:Product:Area.ID") == 9) {
286 shopBelaegningPageID = "2346";
287 }
288
289 <br /><a href='@("/Default.aspx?Id=")@shopBelaegningPageID@("&ProductID=")@GetString("Ecom:Product.ID")'><span class="arrow-link"><span>
290 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) {
291 <span>
292 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))
293 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))
294 </span>
295 }
296 </span></span>
297 @Translate("RT-2.0_BelaegningShop_KoebBelaegning")
298 </a>
299 }
300 </div>
301 }
302 </div></div></div><div class="column-xxs-24 column-md-12 product-image">
303 @if (wallImageUrl != "") {
304 <div class="product-image__wrap">
305 @{
306 string productImageTitle = GetString("Ecom:Product.Number") + " " + @GetString("Ecom:Product.CategoryField.Mursten.ProduktSerie.OptionLabel");
307 string wallLarge = "/admin/public/getimage.ashx?Image=" + wallImageUrl + "&width=595&compression=100";
308 string wallMedium = "/admin/public/getimage.ashx?Image=" + wallImageUrl + "&width=540&compression=100";
309 string wallSmall = "/admin/public/getimage.ashx?Image=" + wallImageUrl + "&width=851&compression=100";
310 string wallDefault = "/admin/public/getimage.ashx?Image=" + wallImageUrl + "&width=660&compression=100";
311 }
312 <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>
313 }
314 </div></div></section>
315 @if (backgroundImageUrl != "") {
316 <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">
317 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-gallery.svg"))) {
318 <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-gallery.svg"))</text>
319 }
320 </span>
321 @Translate("RT-2.0_Se_galleri")
322 </a></div></section>
323 }
324 @if (greener) {
325 @RenderSnippet("ProductGreener")
326 }
327 <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"><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="recommendations"><span class="icon-plus">
328 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-plus.svg"))) {
329 <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-plus.svg"))</text>
330 }
331 </span><span class="header">@Translate("RT-2.0_AnbefalingTilFugesand")</span><p>@GetString("Ecom:Product.CategoryField.Belaegning.Fugesand_teaser_tekst.Value.Clean")</p><a id="recommendations-info"><span class="arrow-link"><span>
332 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) {
333 <span>
334 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))
335 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))
336 </span>
337 }
338 </span></span>
339 @Translate("RT-2.0_LaesMereOmAnbefalingerTilFugesand")
340 </a></div></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">
341 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-plus.svg"))) {
342 <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-plus.svg"))</text>
343 }
344 </span><span class="header">@Translate("RT-2.0_TekniskDataDownload")</span><p>@Translate("RT-2.0_Teknisk_data_beskrivelse_belaegning")</p><a id="technical-data-and-download"><span class="arrow-link">
345 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))) {
346 <span>
347 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))
348 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-arrow-right.svg"))
349 </span>
350 }
351 </span>
352 @Translate("RT-2.0_Find_datablade_links_og_downloads")
353 </a></div></div></div></div></section>
354 @if (greener) {
355 @RenderSnippet("ProductStoryTop")
356 }
357 @SnippetStart("Modals")
358 <div id="product-gallery-modal" class="product-modal"><div class="gallery-item js-active" style="background-image: url(@backgroundImageUrl);"></div>
359 @for (var a = 0; a < galleryImages.Length; a++) {
360 string path = galleryImages[a].Substring(galleryImages[a].IndexOf("\\files")).Replace("\\","/");
361
362 if (a == 0) {
363 <div class="gallery-item js-next" style="background-image: url(@path);"></div>
364 } else if (a == 1) {
365 <div class="gallery-item js-prev" style="background-image: url(@path);"></div>
366 } else {
367 <div class="gallery-item" style="background-image: url(@path);"></div>
368 }
369 }
370 <span class="icon-close">
371 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))) {
372 <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))</text>
373 }
374 </span><span class="icon-rotate">
375 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-rotate.svg"))) {
376 <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-rotate.svg"))</text>
377 }
378 </span></div><div id="product-image-modal" class="product-modal" @if (wallImageUrl != "") {<text>style="background-image: url(@wallImageUrl)"</text>}><span class="icon-close">
379 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))) {
380 <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))</text>
381 }
382 </span></div><div id="recommendations" 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_AnbefalingTilFugesand")</span></div><div class="content">
383 @GetString("Ecom:Product.CategoryField.Belaegning.Fugesand_beskrivelse.Value.Clean")
384 </div></div></div><span class="icon-close">
385 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))) {
386 <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))</text>
387 }
388 </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"><ul><li><span class="subheader">@Translate("RT-2.0_TekniskDataDownloadDatablade")</span></li>
389 @{
390 try {
391 string[] files = System.IO.Directory.GetFiles(System.Web.HttpContext.Current.Server.MapPath("~\\files\\files\\varekatalog\\belaegning\\" + GetString("Ecom:Product.Number").Replace(" ", "-") + "\\datablade\\" + GetString("Ecom:Product:Area.Name")));
392 int counter = 0;
393
394 foreach (string s in files) {
395 string filepath = s.Substring(s.IndexOf("\\files"), s.Length - s.IndexOf("\\files"));
396 string filename = filepath.Substring(filepath.IndexOf("datablade"), filepath.Length - filepath.IndexOf("datablade"));
397
398 <li><a href="@filepath" target="_blank">Datenblatt herunterladen (@filename.Replace("datablade\\" + GetString("Ecom:Product:Area.Name") + "\\", "").Replace("-", " ").Replace("_", " ").Replace(".pdf", ""))</a></li>
399
400 counter++;
401 }
402 } catch {
403
404 }
405 }
406 </ul></div><div class="column-xxs-24 column-md-8"><ul><li><span class="subheader">@Translate("RT-2.0_ProduktRelevanteDownloads")</span></li>
407 @GetString("Ecom:Product.CategoryField.Belaegning.ProduktRelevanteDownloads.Value.Clean").Replace("<ul>","").Replace("</ul>","")
408 </ul></div><div class="column-xxs-24 column-md-8"><ul><li><span class="subheader">@Translate("RT-2.0_ProduktOvrigtLinks")</span></li>
409 @GetString("Ecom:Product.CategoryField.Belaegning.ProduktOvrigtLinks.Value.Clean").Replace("<ul>","").Replace("</ul>","")
410 </ul></div></div></div><span class="icon-close">
411 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))) {
412 <text>@System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images-rt-2.0/icon-close.svg"))</text>
413 }
414 </span></div>
415 @SnippetEnd("Modals")
416 @SnippetStart("JavascriptBottom")
417 <script>
418 var cl = setInterval(function() {
419 if (document.readyState == 'complete' || document.readyState == 'loaded' || document.readyState == 'interactive') {
420 clearInterval(cl);
421
422 var referencetoolProductID = document.querySelector('#reference-tool input[name="ProduktID"]');
423 var referencetoolGroupID = document.querySelector('#reference-tool input[name="GruppeID"]');
424 var referencetoolProductNumber = document.querySelector('#reference-tool input[name="ProduktNr"]');
425 var referencetoolProductImage = document.querySelector('#reference-tool input[name="ProduktBillede"]');
426
427 if (referencetoolProductID != undefined) {
428 referencetoolProductID.value = '@GetString("Ecom:Product.ID")';
429 }
430
431 if (referencetoolGroupID != undefined) {
432 referencetoolGroupID.value = '@GetString("Ecom:Product.PrimaryOrFirstGroupID")';
433 }
434
435 if (referencetoolProductNumber != undefined) {
436 referencetoolProductNumber.value = '@GetString("Ecom:Product.Number")';
437 }
438
439 if (referencetoolProductImage != undefined) {
440 referencetoolProductImage.value = '@GetString("Ecom:Product.ImageMedium.Default.Clean")';
441 }
442 }
443 },100);
444 </script>
445 @SnippetEnd("JavascriptBottom")
446