Error compiling template "Designs/Nissens_website/_parsed/Download.parsed.cshtml"
Line 339: The name 'GetAreaCultureMap' does not exist in the current context
Line 389: The name 'IsSecret' does not exist in the current context
Line 1039: The name 'GetPageForCulture' does not exist in the current context
Line 1111: The name 'Database' does not exist in the current context
Line 1111: The name 'CommandBuilder' does not exist in the current context
Line 1168: The name 'IsSecret' does not exist in the current context
Line 1206: The name 'GetAreaCultureMap' does not exist in the current context
1 @using System
2 @using System.IO
3 <!DOCTYPE html>
4 <html>
5
6 @{
7 var cacheBust = "v=27";
8
9 string currentLanguage = GetGlobalValue("Global:Area.Lang");
10 }
11
12 <head>
13 <script id="CookieConsent" src="https://policy.app.cookieinformation.com/uc.js" data-culture="@currentLanguage.ToUpper()" type="text/javascript"></script>
14
15
16 <script>
17 window.addEventListener('CookieInformationConsentGiven', function () {
18 if (CookieInformation.getConsentGivenFor('cookie_cat_statistic')) {
19 }
20 }, false);
21 </script>
22
23 <!-- Google Tag Manager -->
24 <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
25 new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
26 j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
27 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
28 })(window,document,'script','dataLayer','GTM-TFTQ9T6');</script>
29 <!-- End Google Tag Manager -->
30
31 <!-- Google Tag Manager -->
32 <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
33 new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
34 j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
35 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
36 })(window,document,'script','dataLayer','GTM-TTS6PGH');</script>
37 <!-- End Google Tag Manager -->
38
39 <meta charset="utf-8">
40 <meta http-equiv="X-UA-Compatible" content="IE=edge">
41 <title>@GetValue("Title")</title>
42 @GetValue("MetaTags")
43 @GetValue("CopyRightNotice")
44
45 <meta name="viewport" content="width=device-width, initial-scale=1">
46
47 <link href="/Files/Templates/Designs/Nissens_website/./css/styles.css?@cacheBust" type="text/css" rel="stylesheet">
48 <link href="/Files/Templates/Designs/Nissens_website/./css/cookie/cookieinformation.min.css?@cacheBust" type="text/css" rel="stylesheet">
49 <script src="/Files/Templates/Designs/Nissens_website/./scripts/lib/modernizr/modernizr-custom.js?@cacheBust"></script>
50
51 <link rel="apple-touch-icon" sizes="180x180" href="/Files/Templates/Designs/Nissens_website/apple-touch-icon.png">
52 <link rel="icon" type="image/png" href="/Files/Templates/Designs/Nissens_website/favicon-32x32.png" sizes="32x32">
53 <link rel="icon" type="image/png" href="/Files/Templates/Designs/Nissens_website/favicon-16x16.png" sizes="16x16">
54 <link rel="manifest" href="/Files/Templates/Designs/Nissens_website/manifest.json">
55 <link rel="mask-icon" href="/Files/Templates/Designs/Nissens_website/safari-pinned-tab.svg" color="#266795">
56 <meta name="facebook-domain-verification" content="c6s2qd949f1oz67l34swgaln7waxhh">
57 <meta name="theme-color" content="#ffffff">
58 <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,600,700,700i&subset=cyrillic,cyrillic-ext,greek,greek-ext,latin-ext,vietnamese" rel="stylesheet">
59 @{
60 var CountryCode = GetGlobalValue("Global:Area.Culture.CountryCode");
61 }
62
63 <script>
64 console.log("@CountryCode")
65 </script>
66
67
68 @*Danish Facebook Pixel*@
69 @if (GetGlobalValue("Global:Area.Culture.CountryCode") == "DK") {
70 <meta name="facebook-domain-verification" content="fwanltzh81rk2sjdpji4621b4jppic">
71 }
72
73 @*Czech Facebook Pixel*@
74 @if (GetGlobalValue("Global:Area.Culture.CountryCode") == "CZ") {
75 <meta name="facebook-domain-verification" content="tqoppv2jznvlt3qkp9orskjznd1euq">
76 }
77
78 @*Chinese Facebook Pixel*@
79 @if (GetGlobalValue("Global:Area.Culture.CountryCode") == "CN") {
80 <meta name="facebook-domain-verification" content="723tz6xdd0aumdhzplb33rzmzd8mfr">
81 }
82
83 @*Spanish Facebook Pixel*@
84 @if (GetGlobalValue("Global:Area.Culture.CountryCode") == "ES") {
85 <meta name="facebook-domain-verification" content="u0k1h04zr4ep7ql644b7pg0xpeyy6u">
86 }
87
88 @*French Facebook Pixel*@
89 @if (GetGlobalValue("Global:Area.Culture.CountryCode") == "FR") {
90 <meta name="facebook-domain-verification" content="d1u358w4yttbf6wypdnqlnnyxux9nx">
91 }
92
93 @*Italian Facebook Pixel*@
94 @if (GetGlobalValue("Global:Area.Culture.CountryCode") == "IT") {
95 <meta name="facebook-domain-verification" content="snifkakk8lnxz4fjk8an4cqir004ft">
96 }
97
98 @*Polish Facebook Pixel*@
99 @if (GetGlobalValue("Global:Area.Culture.CountryCode") == "PL") {
100 <meta name="facebook-domain-verification" content="r7a8x4qgk5zs4pfwd4lpn7mgk9drg2">
101 }
102
103 @*Slovakia Facebook Pixel*@
104 @if (GetGlobalValue("Global:Area.Culture.CountryCode") == "SK") {
105 <meta name="facebook-domain-verification" content="xvsqevzqrfogyl7lorhkdvvmd9mnup">
106 }
107
108 @*Russian Facebook Pixel*@
109 @if (GetGlobalValue("Global:Area.Culture.CountryCode") == "RU") {
110 <meta name="facebook-domain-verification" content="qc2ozypcggx0hc5v9pr65ayeciteos">
111 }
112
113
114
115
116 @*English Matomo*@
117 @if (GetGlobalValue("Global:Area.Culture.CountryCode") == "US") {
118 <script>
119 var _paq = window._paq = window._paq || [];
120 /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
121 _paq.push(['trackPageView']);
122 _paq.push(['enableLinkTracking']);
123 (function() {
124 var u="https://nissens.matomo.cloud/";
125 _paq.push(['setTrackerUrl', u+'matomo.php']);
126 _paq.push(['setSiteId', '11']);
127 var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
128 g.async=true; g.src='//cdn.matomo.cloud/nissens.matomo.cloud/matomo.js'; s.parentNode.insertBefore(g,s);
129 })();
130 </script>
131 }
132
133 @*Danish Matomo*@
134 @if (GetGlobalValue("Global:Area.Culture.CountryCode") == "DK") {
135 <script>
136 var _paq = window._paq = window._paq || [];
137 /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
138 _paq.push(['trackPageView']);
139 _paq.push(['enableLinkTracking']);
140 (function() {
141 var u="https://nissens.matomo.cloud/";
142 _paq.push(['setTrackerUrl', u+'matomo.php']);
143 _paq.push(['setSiteId', '13']);
144 var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
145 g.async=true; g.src='//cdn.matomo.cloud/nissens.matomo.cloud/matomo.js'; s.parentNode.insertBefore(g,s);
146 })();
147 </script>
148 }
149
150 @*Czech Matomo*@
151 @if (GetGlobalValue("Global:Area.Culture.CountryCode") == "CZ") {
152 <script>
153 var _paq = window._paq = window._paq || [];
154 /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
155 _paq.push(['trackPageView']);
156 _paq.push(['enableLinkTracking']);
157 (function() {
158 var u="https://nissens.matomo.cloud/";
159 _paq.push(['setTrackerUrl', u+'matomo.php']);
160 _paq.push(['setSiteId', '2']);
161 var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
162 g.async=true; g.src='//cdn.matomo.cloud/nissens.matomo.cloud/matomo.js'; s.parentNode.insertBefore(g,s);
163 })();
164 </script>
165 }
166
167 @*Chinese Matomo*@
168 @if (GetGlobalValue("Global:Area.Culture.CountryCode") == "CN") {
169 <script>
170 var _paq = window._paq = window._paq || [];
171 /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
172 _paq.push(['trackPageView']);
173 _paq.push(['enableLinkTracking']);
174 (function() {
175 var u="https://nissens.matomo.cloud/";
176 _paq.push(['setTrackerUrl', u+'matomo.php']);
177 _paq.push(['setSiteId', '19']);
178 var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
179 g.async=true; g.src='//cdn.matomo.cloud/nissens.matomo.cloud/matomo.js'; s.parentNode.insertBefore(g,s);
180 })();
181 </script>
182 }
183
184 @*Spanish Matomo*@
185 @if (GetGlobalValue("Global:Area.Culture.CountryCode") == "ES") {
186 <script>
187 var _paq = window._paq = window._paq || [];
188 /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
189 _paq.push(['trackPageView']);
190 _paq.push(['enableLinkTracking']);
191 (function() {
192 var u="https://nissens.matomo.cloud/";
193 _paq.push(['setTrackerUrl', u+'matomo.php']);
194 _paq.push(['setSiteId', '14']);
195 var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
196 g.async=true; g.src='//cdn.matomo.cloud/nissens.matomo.cloud/matomo.js'; s.parentNode.insertBefore(g,s);
197 })();
198 </script>
199 }
200
201 @*French Matomo*@
202 @if (GetGlobalValue("Global:Area.Culture.CountryCode") == "FR") {
203 <script>
204 var _paq = window._paq = window._paq || [];
205 /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
206 _paq.push(['trackPageView']);
207 _paq.push(['enableLinkTracking']);
208 (function() {
209 var u="https://nissens.matomo.cloud/";
210 _paq.push(['setTrackerUrl', u+'matomo.php']);
211 _paq.push(['setSiteId', '15']);
212 var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
213 g.async=true; g.src='//cdn.matomo.cloud/nissens.matomo.cloud/matomo.js'; s.parentNode.insertBefore(g,s);
214 })();
215 </script>
216 }
217
218 @*Italian Matomo*@
219 @if (GetGlobalValue("Global:Area.Culture.CountryCode") == "IT") {
220 <script>
221 var _paq = window._paq = window._paq || [];
222 /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
223 _paq.push(['trackPageView']);
224 _paq.push(['enableLinkTracking']);
225 (function() {
226 var u="https://nissens.matomo.cloud/";
227 _paq.push(['setTrackerUrl', u+'matomo.php']);
228 _paq.push(['setSiteId', '16']);
229 var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
230 g.async=true; g.src='//cdn.matomo.cloud/nissens.matomo.cloud/matomo.js'; s.parentNode.insertBefore(g,s);
231 })();
232 </script>
233 }
234
235 @*Polish Matomo*@
236 @if (GetGlobalValue("Global:Area.Culture.CountryCode") == "PL") {
237 <script>
238 var _paq = window._paq = window._paq || [];
239 /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
240 _paq.push(['trackPageView']);
241 _paq.push(['enableLinkTracking']);
242 (function() {
243 var u="https://nissens.matomo.cloud/";
244 _paq.push(['setTrackerUrl', u+'matomo.php']);
245 _paq.push(['setSiteId', '12']);
246 var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
247 g.async=true; g.src='//cdn.matomo.cloud/nissens.matomo.cloud/matomo.js'; s.parentNode.insertBefore(g,s);
248 })();
249 </script>
250 }
251
252 @*Slovakia Matomo*@
253 @if (GetGlobalValue("Global:Area.Culture.CountryCode") == "SK") {
254 <script>
255 var _paq = window._paq = window._paq || [];
256 /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
257 _paq.push(['trackPageView']);
258 _paq.push(['enableLinkTracking']);
259 (function() {
260 var u="https://nissens.matomo.cloud/";
261 _paq.push(['setTrackerUrl', u+'matomo.php']);
262 _paq.push(['setSiteId', '17']);
263 var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
264 g.async=true; g.src='//cdn.matomo.cloud/nissens.matomo.cloud/matomo.js'; s.parentNode.insertBefore(g,s);
265 })();
266 </script>
267 }
268
269 @*Russian Matomo*@
270 @if (GetGlobalValue("Global:Area.Culture.CountryCode") == "RU") {
271 <script>
272 var _paq = window._paq = window._paq || [];
273 /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
274 _paq.push(['trackPageView']);
275 _paq.push(['enableLinkTracking']);
276 (function() {
277 var u="https://nissens.matomo.cloud/";
278 _paq.push(['setTrackerUrl', u+'matomo.php']);
279 _paq.push(['setSiteId', '18']);
280 var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
281 g.async=true; g.src='//cdn.matomo.cloud/nissens.matomo.cloud/matomo.js'; s.parentNode.insertBefore(g,s);
282 })();
283 </script>
284 }
285 @GetValue("Stylesheets")
286 @GetValue("Javascripts")
287 </head>
288
289
290 <body>
291 <!-- Google Tag Manager (noscript) -->
292 <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-TFTQ9T6" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
293 <!-- End Google Tag Manager (noscript) -->
294
295
296 <script type="text/javascript" src="https://secure.leadforensics.com/js/101799.js"></script>
297 <noscript><img src="https://secure.leadforensics.com/101799.png" style="display:none;"></noscript>
298 @using Dynamicweb.Content;
299 @using Dynamicweb.Content.Items;
300 @using System;
301 @using System.Collections;
302 @using System.Collections.Generic;
303 @using System.Globalization;
304 @using System.Text.RegularExpressions;
305
306 @{
307 var color = "#FFF";
308 var hoverColor = "#02afef";
309
310 var firstAreaPage = Pageview.Area.get_Value("areafirstactivepage");
311 var navAreaMainPages = ((IEnumerable)Pageview.Area.get_Value("AreaMainPages")).Cast<int>
312 ().Select(pid => pid);
313 var navPages = Page.GetPages(navAreaMainPages.ToArray());
314 string contactUsDefaultLink = null;
315 string contactUsDefaultName = "Contact Us";
316
317 var area = Area.GetAreaById(Pageview.AreaID);
318 var currentArea = area;
319
320 var currentFlag = area.Flag32x32;
321 var twoLetterName = new RegionInfo(area.CultureInfo.LCID).TwoLetterISORegionName;
322
323 if (!area.IsMaster)
324 {
325 var oldArea = area;
326 area = area.MasterArea;
327 if (area == null)
328 {
329 area = oldArea;
330 }
331 }
332 var page = Page.GetPageById(Pageview.ID);
333
334 var areaLanguages = new List<Area>();
335 areaLanguages.Add(area);
336 areaLanguages.AddRange(area.Languages);
337
338 var languageMenu = new List<Tuple<string, string, string>>();
339 var cultureMap = GetAreaCultureMap();
340 foreach (var languageAreaId in cultureMap.Keys.OrderBy(k => k))
341 {
342 var culture = cultureMap[languageAreaId];
343 var name = culture.NativeName;
344 try
345 {
346 name = (culture.IsNeutralCulture) ? culture.NativeName : culture.Parent.NativeName;
347 }
348 catch { }
349 name = culture.TextInfo.ToTitleCase(name);
350
351 var flag = areaLanguages.First(a => a.ID == languageAreaId).Flag32x32;
352 string link;
353
354 var langPage = GetPageForCulture(Pageview.ID, culture.Name);
355 if (langPage != null)
356 {
357 link = "/Default.aspx?ID=" + langPage.ID;
358 }
359 else
360 {
361 var firstPageId = Dynamicweb.Frontend.Area.GetAreaById(languageAreaId).get_Value("areafirstactivepage");
362 link = "/Default.aspx?ID=" + firstPageId;
363 }
364
365 if (Dynamicweb.Content.Area.GetAreaById(languageAreaId).IsMaster)
366 {
367 link += "?explicitLanguage=1";
368 }
369
370 languageMenu.Add(new Tuple<string, string, string>(name, link, flag));
371 }
372
373 @*var latinAlphabet = languageMenu.Where(x => Regex.IsMatch(x.Item1, @"^[\p{L}]+$")).OrderBy(x => x.Item1).ToList();
374 var noneLatinAlphabet = languageMenu.Where(x => !Regex.IsMatch(x.Item1, @"^[a-zA-Z]+$")).OrderBy(x => x.Item1).ToList();
375
376 latinAlphabet.AddRange(noneLatinAlphabet);
377 languageMenu = latinAlphabet;
378
379 @*var languageName = languageMenu.Select(x => x.Item1).ToList();
380 languageMenu = Heyday.Nissens.Helpers.HelperFunction.OrderByLatinAlphabet(languageName);*@
381
382 languageMenu = languageMenu.OrderBy(x => x.Item1).ToList();
383
384 var websiteItem = Dynamicweb.Content.Items.ItemManager.Storage.GetById(area.ItemType, area.ItemId);
385
386
387 }
388
389 @if (!IsSecret())
390 {
391 <header id="top">
392 <nav id="top-nav">
393 <div class="container">
394
395 @{
396 var headerLogoImage = websiteItem["HeaderLogoImage"].ToString();
397 var frontpageUrl = "/Default.aspx?ID=" + firstAreaPage;
398 }
399
400 <a class="logo" href="@frontpageUrl" style="background-image:url(@System.Web.HttpUtility.UrlPathEncode(headerLogoImage))">
401 <span class="company-name">Nissens</span>
402 </a>
403 <ul id="primary-nav">
404 @{
405 int index = 1;
406 foreach (var item in navPages.Where(x => x.ItemType == "Automotive"))
407 {
408 string markedClassName = "on";
409 string currentPageStyle = null;
410
411
412 if (page.ID == item.ID || page.ParentPageID == item.ID)
413 {
414 currentPageStyle = markedClassName;
415 }
416
417 <li>
418 <a class="toggle-megadropdown @currentPageStyle" data-dropdown-id="#megadropdown-0@(index)" href="#">@item.MenuText</a>
419 </li>
420
421 index++;
422 }
423
424 @*if (navPages.FirstOrDefault(n => n.ItemType == "Automotive") != null)
425 {
426 string markedClassName = "on";
427 string currentPageStyle = null;
428
429
430 var automotive = navPages.FirstOrDefault(n => n.ItemType == "Automotive");
431 if (page.ID == automotive.ID || page.ParentPageID == automotive.ID)
432 {
433 currentPageStyle = markedClassName;
434 }
435 <li>
436 <a class="toggle-megadropdown @currentPageStyle" data-dropdown-id="#megadropdown-01" href="#">@automotive.MenuText</a>
437 </li>
438 }*@
439 foreach (var rootPage in navPages)
440 {
441 string currentPageStyle = null;
442 string markedClassName = "on";
443
444 if (rootPage.ItemType == "PowerGeneration")
445 {
446 if (page.ID == rootPage.ID || page.ParentPageID == rootPage.ID)
447 {
448 currentPageStyle = markedClassName;
449 }
450 @* <li>
451 <a class="toggle-megadropdown @currentPageStyle" data-dropdown-id="#megadropdown-03" href="#">@rootPage.MenuText</a>
452 </li> *@
453 }
454 if (rootPage.ItemType == "OnAndOffroad")
455 {
456 if (page.ID == rootPage.ID || page.ParentPageID == rootPage.ID)
457 {
458 currentPageStyle = markedClassName;
459 }
460 @* <li>
461 <a class="toggle-megadropdown @currentPageStyle" data-dropdown-id="#megadropdown-04" href="#">@rootPage.MenuText</a>
462 </li> *@
463 }
464 if (rootPage.ItemType == "AboutNissens")
465 {
466 /*if (page.ID == rootPage.ID || page.ParentPageID == rootPage.ID)
467 {
468 currentPageStyle = markedClassName;
469 }*/
470
471 <li>
472 <!--a class="@currentPageStyle" href="/Default.aspx?ID=@rootPage.ID">@rootPage.MenuText</a-->
473 <a class="toggle-megadropdown @currentPageStyle" data-dropdown-id="#megadropdown-05" href="#">@rootPage.MenuText</a>
474 </li>
475 }
476 <!-- if (rootPage.ItemType == "ContactMenuItem")
477 {
478 //if (page.ID == rootPage.ID || page.ParentPageID == rootPage.ID)
479 //{
480 // currentPageStyle = markedClassName;
481 //}
482
483 contactUsDefaultLink = rootPage.ID.ToString();
484
485 <li>
486 @*<a class="@currentPageStyle" href="/Default.aspx?ID=@rootPage.ID">@rootPage.MenuText</a>*@
487 <a class="toggle-megadropdown @currentPageStyle" data-dropdown-id="#megadropdown-06" href="#">@rootPage.MenuText</a>
488 @*<a class="@currentPageStyle" href="@contactUsLink">@contactUsName</a>*@
489 </li>
490 } -->
491 if (rootPage.ItemType == "ContactSinglePage")
492 {
493 //if (page.ID == rootPage.ID || page.ParentPageID == rootPage.ID)
494 //{
495 // currentPageStyle = markedClassName;
496 //}
497
498 contactUsDefaultLink = rootPage.ID.ToString();
499
500 <li>
501 <a class="@currentPageStyle" href="/Default.aspx?ID=@rootPage.ID">@rootPage.MenuText</a>
502 @*<a class="toggle-megadropdown @currentPageStyle" data-dropdown-id="#megadropdown-07" href="#">@rootPage.MenuText</a>*@
503 @*<a class="@currentPageStyle" href="@contactUsLink">@contactUsName</a>*@
504 </li>
505 }
506 }
507 }
508 </ul>
509
510 <div id="search-nav">
511 <button type="button" class="toggle-megadropdown" data-dropdown-id="#megadropdown-search">
512 <span class="icon-search"></span>
513 </button>
514 </div>
515
516 <div id="language-nav">
517 <button type="button" class="toggle-megadropdown" data-dropdown-id="#megadropdown-language">
518 <span class="flag"><img src="@currentFlag" alt=""></span>
519 </button>
520 </div>
521
522 <button type="button" class="burger-btn">
523 <span></span>
524 <span></span>
525 <span></span>
526 <span></span>
527 </button>
528
529 </div>
530 </nav>
531
532
533 <nav id="megadropdown-nav" class="hidden-print">
534 <div class="content">
535
536 <!--mobile-megadropdown-nav #1 start...-->
537 <div id="mobile-megadropdown-nav">
538
539 <div class="language-nav">
540 <button type="button" class="toggle-megadropdown" data-dropdown-id="#megadropdown-language">
541 <span class="country">
542 <!--DEV NOTE: add the active site language below-->
543 <span class="flag"><img src="@currentFlag" alt=""></span>
544 <span class="name">@twoLetterName</span>
545 </span>
546 <span class="icon-arrow-down"></span>
547 </button>
548 </div>
549
550 <div class="primary-nav">
551 <ul>
552
553 @{
554 int indexForMobile = 1;
555 foreach (var rootPage in navPages.Where(x => x.ItemType == "Automotive"))
556 {
557 <li>
558 <a class="toggle-megadropdown" data-dropdown-id="#megadropdown-0@(indexForMobile)" href="#">@rootPage.MenuText</a>
559 </li>
560 indexForMobile++;
561 }
562 foreach (var rootPage in navPages)
563 {
564 if (rootPage.ItemType == "AboutNissens")
565 {
566 <li>
567 @*<a href="/Default.aspx?ID=@rootPage.ID">@rootPage.MenuText</a>*@
568 <a class="toggle-megadropdown" data-dropdown-id="#megadropdown-05" href="#">@rootPage.MenuText</a>
569 </li>
570 }
571 if (rootPage.ItemType == "ContactMenuItem")
572 {
573 <li>
574 @*<a href="/Default.aspx?ID=@rootPage.ID">@rootPage.MenuText</a>*@
575 <a class="toggle-megadropdown" data-dropdown-id="#megadropdown-06" href="#">@rootPage.MenuText</a>
576 </li>
577 }
578 }
579 }
580 </ul>
581 </div>
582 </div>
583 <!--...mobile-megadropdown-nav #1 end-->
584 <!--Variables used on megadropdown -->
585 @{
586 var links = new Dictionary<string, string[]>();
587 var contactUsLink = "";
588 var contactUsName = "";
589 var suppliersPartnersLink = "";
590 var suppliersPartnersName = "";
591 }
592
593 @{
594 @*Dictionary<string, string[]> links = new Dictionary<string, string[]>();*@
595 var backgroundImage = new string[3];
596
597 var rootPageID = 0;
598 contactUsLink = string.Empty;
599 contactUsName = string.Empty;
600
601 var repo = ItemManager.Storage.Open("ProductGroup");
602 var groupingItems = repo.SelectByAreaId(Pageview.AreaID);
603 var navIndex = 1;
604 foreach (var rootPage in navPages)
605 {
606 var productOverview = new Dictionary<string, List<Tuple<string, string, string>>>();
607
608 if (rootPage.ItemType == "Automotive")
609 {
610 var rootItem = ItemManager.Storage.GetById(rootPage.ItemType, rootPage.ItemId);
611 var chosenColor = (rootItem["TextColorInHex"] as string) ?? string.Empty;
612 var chosenHover = (rootItem["HoverColorInHex"] as string) ?? string.Empty;
613
614 if (!string.IsNullOrWhiteSpace(chosenColor))
615 {
616 color = chosenColor.StartsWith("#") ? chosenColor : "#" + chosenColor;
617 }
618
619 if (!string.IsNullOrWhiteSpace(chosenHover))
620 {
621 hoverColor = chosenHover.StartsWith("#") ? chosenHover : "#" + chosenHover;
622 }
623
624
625 for (var i = 1; i <= 4; i++)
626 {
627 var link = rootItem["Link_" + i] as string;
628 var linkName = rootItem["Link_" + i + "Name"] as string;
629 var linkImage = rootItem["Link" + i + "Image"] as string;
630 var linkTarget = rootItem["Link_" + i + "_OpenInNewWindow"];
631
632 var OpenInNewWindow = "";
633 if (linkTarget.ToString().ToLower() == "true")
634 {
635 OpenInNewWindow = "_blank";
636 }
637
638 if (!string.IsNullOrEmpty(link))
639 {
640 links.Add(i.ToString(), new[] { link, linkName, linkImage, OpenInNewWindow });
641 }
642 }
643
644 contactUsLink = (rootItem["ContactUsLink"] as string) ?? "/Default.aspx?ID=" + contactUsDefaultLink;
645 contactUsName = (rootItem["ContactUs"] as string) ?? contactUsDefaultName;
646 suppliersPartnersLink = (rootItem["SuppliersPartnersLink"] as string);
647 suppliersPartnersName = (rootItem["SuppliersPartners"] as string);
648
649 for (var i = 1; i <= 3; i++)
650 {
651 var backgroundImageItem = (rootItem["BackgroundImage" + i] as string) ?? string.Empty;
652
653 backgroundImage[i - 1] = backgroundImageItem;
654 }
655
656 var pages = rootPage.Subpages;
657 foreach (var subPage in pages)
658 {
659 if (subPage.ItemType == "ProductPage")
660 {
661 rootPageID = rootPage.ID;
662 var id = subPage.ID;
663
664 var name = subPage.MenuText;
665 var link = "/Default.aspx?ID=" + id;
666
667 var productCategory = ItemManager.Storage.GetById(subPage.ItemType, subPage.ItemId);
668
669 string image = productCategory["Image"] as string;
670 string groupingOb = (productCategory["Grouping"] as string) ?? string.Empty;
671
672 var grouping = groupingItems.FirstOrDefault(g => g["Name"].ToString() == groupingOb);
673
674 if (grouping != null)
675 {
676 var group = grouping["Label"].ToString();
677 if (!productOverview.ContainsKey(group))
678 {
679 productOverview.Add(group, new List<Tuple<string, string, string>>());
680 }
681 productOverview[group].Add(new Tuple<string, string, string>(name, link, image));
682 }
683 }
684 }
685 <div id="megadropdown-0@(navIndex)" class="is-mega-dropdown">
686 <div class="container">
687 <div class="megadropdown-row automotive">
688 @{int j = 0;}
689 @foreach (var dicti in productOverview)
690 {
691 <div class="megadropdown-col col-sm-12 col-xs-12" style="color: @color !important; background-image: url(@System.Web.HttpUtility.UrlPathEncode(backgroundImage[j]));">
692 <h3>
693 @dicti.Key
694 <button type="button"></button>
695 </h3>
696 <ul>
697 @foreach (var item in dicti.Value)
698 {
699 <li>
700 <a onmouseover='this.style.color="@hoverColor"' onmouseout='this.style.color="@color"' href="@item.Item2">@item.Item1</a>
701 </li>
702 }
703 </ul>
704 </div>
705 j++;
706 }
707
708 @{
709 var backgroundImageLink = websiteItem["BackgroundImage"] as string;
710
711 var backgroundImageLink1 = websiteItem["NavItem_5_Background_Image"] as string;
712
713 }
714
715 </div>
716
717 <div class="megadropdown-row buttons">
718 @foreach (var link in links.Values)
719 {
720 <div class="col-one-fifth">
721 <a href="@link[0]" class="md-btn alt" style="background-image: url(@System.Web.HttpUtility.UrlPathEncode(link[2]));" target="@link[3]">
722 <span>@link[1]<span class="icon-arrow-line-right">@link[0]</span></span>
723 </a>
724 </div>
725 }
726 <div class="col-one-fifth col-five-fifth-xs">
727 <a href="@contactUsLink" class="md-btn contact-us"><span>@contactUsName<span class="icon-arrow-line-right"></span></span></a>
728 </div>
729 </div>
730
731 </div>
732 </div>
733 navIndex++;
734
735 }
736 }
737 }
738 <!--//megadropdown #1 end-->
739 <!--megadropdown #2 start...-->
740 <div id="megadropdown-03" class="is-mega-dropdown">
741 <div class="container">
742
743 <div class="megadropdown-row categories">
744 @{
745 links = new Dictionary<string, string[]>();
746
747 foreach (var rootPage in navPages)
748 {
749 if (rootPage.ItemType == "PowerGeneration")
750 {
751 var rootItem = ItemManager.Storage.GetById(rootPage.ItemType, rootPage.ItemId);
752
753 for (var i = 1; i <= 4; i++)
754 {
755 var link = (rootItem["Link_" + i] as string) ?? string.Empty;
756 var linkName = (rootItem["Link_" + i + "Name"] as string) ?? string.Empty;
757 var linkImage = (rootItem["Link" + i + "Image"] as string) ?? string.Empty;
758 var linkTarget = (rootItem["Link_" + i + "_OpenInNewWindow"]) ?? string.Empty;
759
760 var OpenInNewWindow = "";
761 if (linkTarget.ToString().ToLower() == "true")
762 {
763 OpenInNewWindow = "_blank";
764 }
765
766 if (!string.IsNullOrEmpty(link))
767 {
768 links.Add(i.ToString(), new[] { link, linkName, linkImage, OpenInNewWindow });
769 }
770 }
771 contactUsLink = (rootItem["ContactUsLink"] as string) ?? "/Default.aspx?ID=" + contactUsDefaultLink;
772 contactUsName = (rootItem["ContactUs"] as string) ?? contactUsDefaultName;
773
774 var pages = rootPage.Subpages;
775 foreach (var subPage in pages.OrderBy(p => p.Sort))
776 {
777 if (subPage.ItemType == "MenuItem")
778 {
779 var id = subPage.ID;
780
781 var name = subPage.MenuText;
782 var link = "/Default.aspx?ID=" + id;
783
784 var menuItem = ItemManager.Storage.GetById(subPage.ItemType, subPage.ItemId);
785
786 string image = menuItem["Image"] as string;
787
788 <div class="col-sm-3 col-xs-6">
789 <a href="@link" class="category-menu-btn">
790 <span class="h3">@name</span>
791 <div class="image">
792 <img src="@image" alt="">
793 </div>
794 </a>
795 </div>
796 }
797 }
798 }
799 }
800 }
801 </div>
802
803 <div class="megadropdown-row buttons">
804 @foreach (var link in links.Values)
805 {
806 <div class="col-one-fifth">
807 <a href="@link[0]" class="md-btn alt" style="background-image: url(@System.Web.HttpUtility.UrlPathEncode(link[2]));" target="@link[3]">
808 <span>@link[1]<span class="icon-arrow-line-right">@link[0]</span></span>
809 </a>
810 </div>
811 }
812 <div class="col-one-fifth col-five-fifth-xs">
813 <a href="@contactUsLink" class="md-btn contact-us"><span>@contactUsName<span class="icon-arrow-line-right"></span></span></a>
814 </div>
815 </div>
816
817 </div>
818 </div>
819 <!--//megadropdown #2 end-->
820 <!--megadropdown #3 start...-->
821 <div id="megadropdown-04" class="is-mega-dropdown">
822 <div class="container">
823
824 <div class="megadropdown-row categories">
825
826 @{
827 links = new Dictionary<string, string[]>();
828
829 foreach (var rootPage in navPages)
830 {
831 if (rootPage.ItemType == "OnAndOffroad")
832 {
833 var rootItem = ItemManager.Storage.GetById(rootPage.ItemType, rootPage.ItemId);
834
835 for (var i = 1; i <= 4; i++)
836 {
837 var link = (rootItem["Link_" + i] as string) ?? string.Empty;
838 var linkName = (rootItem["Link_" + i + "Name"] as string) ?? string.Empty;
839 var linkImage = (rootItem["Link" + i + "Image"] as string) ?? string.Empty;
840 var linkTarget = (rootItem["Link_" + i + "_OpenInNewWindow"]) ?? string.Empty;
841
842 var OpenInNewWindow = "";
843 if (linkTarget.ToString().ToLower() == "true")
844 {
845 OpenInNewWindow = "_blank";
846 }
847
848 if (!string.IsNullOrEmpty(link))
849 {
850 links.Add(i.ToString(), new[] { link, linkName, linkImage, OpenInNewWindow });
851 }
852 }
853 contactUsLink = (rootItem["ContactUsLink"] as string) ?? "/Default.aspx?ID=" + contactUsDefaultLink;
854 contactUsName = (rootItem["ContactUs"] as string) ?? contactUsDefaultName;
855
856 var pages = rootPage.Subpages;
857 foreach (var subPage in pages.OrderBy(p => p.Sort))
858 {
859 if (subPage.ItemType == "MenuItem")
860 {
861 var id = subPage.ID;
862
863 var name = subPage.MenuText;
864 var link = "/Default.aspx?ID=" + id;
865
866 var productCategory = ItemManager.Storage.GetById(subPage.ItemType, subPage.ItemId);
867
868 string image = productCategory["Image"] as string;
869
870 <div class="col-one-fourth">
871 <a href="@link" class="category-menu-btn">
872 <span class="h3">@name</span>
873 <div class="image">
874 <img src="@image" alt="">
875 </div>
876 </a>
877 </div>
878 }
879 }
880 }
881 }
882 }
883 </div>
884
885 <div class="megadropdown-row buttons">
886 @foreach (var link in links.Values)
887 {
888 <div class="col-one-fifth">
889 <a href="@link[0]" class="md-btn alt" style="background-image: url(@System.Web.HttpUtility.UrlPathEncode(link[2]));" target="@link[3]">
890 <span>@link[1]<span class="icon-arrow-line-right">@link[0]</span></span>
891 </a>
892 </div>
893 }
894 <div class="col-one-fifth col-five-fifth-xs">
895 <a href="@contactUsLink" class="md-btn contact-us"><span>@contactUsName<span class="icon-arrow-line-right"></span></span></a>
896 </div>
897 </div>
898
899 </div>
900 </div>
901 <!--//megadropdown #3 end-->
902 <!--megadropdown #4 start...-->
903 <div id="megadropdown-05" class="is-mega-dropdown">
904 <div class="container">
905
906 <div class="megadropdown-row categories">
907 @{
908 links = new Dictionary<string, string[]>();
909
910 foreach (var rootPage in navPages)
911 {
912 if (rootPage.ItemType == "AboutNissens")
913 {
914 var rootItem = ItemManager.Storage.GetById(rootPage.ItemType, rootPage.ItemId);
915
916 for (var i = 1; i <= 4; i++)
917 {
918 var link = (rootItem["Link_" + i] as string) ?? string.Empty;
919 var linkName = (rootItem["Link_" + i + "Name"] as string) ?? string.Empty;
920 var linkImage = (rootItem["Link" + i + "Image"] as string) ?? string.Empty;
921 var linkTarget = (rootItem["Link_" + i + "_OpenInNewWindow"]) ?? string.Empty;
922
923 var OpenInNewWindow = "";
924 if (linkTarget.ToString().ToLower() == "true")
925 {
926 OpenInNewWindow = "_blank";
927 }
928
929 if (!string.IsNullOrEmpty(link))
930 {
931 links.Add(i.ToString(), new[] { link, linkName, linkImage, OpenInNewWindow });
932 }
933 }
934 contactUsLink = (rootItem["ContactUsLink"] as string) ?? "/Default.aspx?ID=" + contactUsDefaultLink;
935 contactUsName = (rootItem["ContactUs"] as string) ?? contactUsDefaultName;
936
937 var pages = rootPage.Subpages;
938 foreach (var subPage in pages.OrderBy(p => p.Sort))
939 {
940 if (subPage.ItemType == "MenuItem")
941 {
942 var id = subPage.ID;
943
944 var name = subPage.MenuText;
945 var link = "/Default.aspx?ID=" + id;
946
947 var productCategory = ItemManager.Storage.GetById(subPage.ItemType, subPage.ItemId);
948
949 string image = productCategory["Image"] as string;
950
951 <div class="col-sm-4 col-xs-6">
952 <a href="@link" class="category-menu-btn">
953 <span class="h3">@name</span>
954 <div class="image">
955 <img src="@image" alt="">
956 </div>
957 </a>
958 </div>
959 }
960 }
961 }
962 }
963 }
964 </div>
965
966 <div class="megadropdown-row buttons">
967 @foreach (var link in links.Values)
968 {
969 <div class="col-one-fifth">
970 <a href="@link[0]" class="md-btn alt" style="background-image: url(@System.Web.HttpUtility.UrlPathEncode(link[2]));" target="@link[3]">
971 <span>@link[1]<span class="icon-arrow-line-right">@link[0]</span></span>
972 </a>
973 </div>
974 }
975 <div class="col-one-fifth col-five-fifth-xs">
976 <a href="@contactUsLink" class="md-btn contact-us"><span>@contactUsName<span class="icon-arrow-line-right"></span></span></a>
977 </div>
978 </div>
979 </div>
980 </div>
981 <!--//megadropdown #4 end-->
982 <!--megadropdown #5 start...-->
983 <div id="megadropdown-06" class="is-mega-dropdown">
984 <div class="container">
985 <div class="megadropdown-row categories">
986 @{
987 links = new Dictionary<string, string[]>();
988
989 foreach (var rootPage in navPages)
990 {
991 if (rootPage.ItemType == "ContactMenuItem")
992 {
993 var pages = rootPage.Subpages;
994 foreach (var subPage in pages.OrderBy(p => p.Sort))
995 {
996 if (subPage.ItemType == "MenuItem")
997 {
998 var id = subPage.ID;
999
1000 var name = subPage.MenuText;
1001 var link = "/Default.aspx?ID=" + id;
1002
1003 var productCategory = ItemManager.Storage.GetById(subPage.ItemType, subPage.ItemId);
1004
1005 string image = productCategory["Image"] as string;
1006
1007 <div class="col-sm-4 col-xs-6">
1008 <a href="@link" class="category-menu-btn">
1009 <span class="h3">@name</span>
1010 <div class="image">
1011 <img src="@image" alt="">
1012 </div>
1013 </a>
1014 </div>
1015 }
1016
1017 /*<div class="col-one-fifth">
1018 <a href="@link" class="category-menu-btn">
1019 <span class="h3">@name</span>
1020 <div class="image">
1021 <img src="@image" alt="">
1022 </div>
1023 </a>
1024 </div>*/
1025 }
1026 }
1027 }
1028 }
1029 </div>
1030 </div>
1031 </div>
1032
1033 <!--#megadropdown-search start...-->
1034 <div id="megadropdown-search" class="is-mega-dropdown">
1035 <div class="container">
1036 @{
1037 var searchPageId = websiteItem["SearchResultPage"].ToString().Split('=').Last();
1038 var searchCulture = Pageview.Area.get_Value("areaculture").ToString();
1039 var searchPageLocal = GetPageForCulture(Dynamicweb.Base.ChkInteger(searchPageId), searchCulture);
1040 if (searchPageLocal == null)
1041 {
1042 searchPageLocal = Pageview.Page;
1043 }
1044 var placeholderText = Translate("SearchPlaceholder", "What are you looking for?");
1045 }
1046 <form action="/Default.aspx">
1047 <input type="hidden" value="@searchPageLocal.ID" name="ID">
1048 <input type="hidden" value="@Pageview.AreaID" name="Context">
1049 <input type="text" name="freetext" class="search" role="search" placeholder="@placeholderText" aria-label="Search">
1050 <button type="submit"><span class="icon-arrow-line-right"></span></button>
1051 </form>
1052 </div>
1053 </div>
1054 <!--//#megadropdown-search end-->
1055 <!--#megadropdown-language start...-->
1056 <div id="megadropdown-language" class="is-mega-dropdown">
1057 <div class="container">
1058 <ul>
1059 @{
1060 foreach (var lang in languageMenu)
1061 {
1062 var activeFlag = (currentFlag == lang.Item3) ? "on" : "";
1063 <li class="@activeFlag">
1064 <a href="@lang.Item2" class="country">
1065 <span class="flag"><img src="@lang.Item3" alt=""></span>
1066 <span class="name">@lang.Item1</span>
1067 </a>
1068 </li>
1069 }
1070 }
1071 </ul>
1072 </div>
1073 </div>
1074 <!--//#megadropdown-language end-->
1075 </div>
1076 </nav>
1077
1078 <!--#secondary-nav start...-->
1079 <nav id="secondary-nav">
1080 <ul>
1081 @foreach (var paragraph in Paragraph.GetParagraphsByPageID(page.ID))
1082 {
1083 if (paragraph.ItemType != "Paragraph_Menu_Item" || !paragraph.ShowParagraph)
1084 {
1085 continue;
1086 }
1087
1088 <li>
1089 <a href="/Default.aspx?ID=@page.ID/#@paragraph.ID">@paragraph.Header</a>
1090 </li>
1091 }
1092 </ul>
1093 </nav>
1094
1095 </header>
1096 }
1097
1098
1099 <div class="top-spacing"></div>
1100 <main>
1101
1102 @{
1103 var inputString = System.Web.HttpContext.Current.Request.QueryString["uniqueid"];
1104 System.Guid uniqueID;
1105 var isUniqueID = Guid.TryParse(inputString, out uniqueID);
1106 var isAllowed = false;
1107 var errorMessage = "The link has expired";
1108 if(isUniqueID)
1109 {
1110 var downloadStart = new DateTime();
1111 using (var reader = Database.CreateDataReader(CommandBuilder.Create("SELECT * FROM RestrictedDownloads WHERE UniqueID = {0}", uniqueID)))
1112 {
1113 if (reader.Read())
1114 {
1115 var dateTime = (reader["DownloadStart"] != null) ? reader["DownloadStart"].ToString() : "";
1116 DateTime.TryParse(dateTime, out downloadStart);
1117 }
1118 }
1119 if((DateTime.Now - downloadStart).TotalHours < 24)
1120 {
1121 isAllowed = true;
1122 errorMessage = string.Empty;
1123 }
1124 }
1125 if(isAllowed)
1126 {
1127 //Download
1128 var root = System.Web.HttpContext.Current.Server.MapPath("/");
1129 var path = Path.Combine(root, "..", "download", "Nissens_HP_Calculator.exe");
1130 try
1131 {
1132 using(var fileStream = new FileStream(path, FileMode.Open))
1133 {
1134 var fileSize = (int)fileStream.Length;
1135 byte[] buffer = new byte[fileStream.Length];
1136 fileStream.Read(buffer, 0, fileSize);
1137
1138 var response = System.Web.HttpContext.Current.Response;
1139 response.Clear();
1140 response.ContentType = "application/x-msdownload";
1141 response.AppendHeader("Content-Disposition", "attachment; filename=Nissens_HP_Calculator.exe");
1142 response.BufferOutput = true;
1143 response.OutputStream.Write(buffer, 0, fileSize);
1144 response.End();
1145 }
1146 }
1147 catch
1148 {
1149 errorMessage = @Translate("ErrorMessageForDownload","An error occurred. Please contact us.");
1150 }
1151 }
1152 }
1153 <div>@errorMessage</div>
1154
1155 </main>
1156
1157 <div id="fullpage-overlay">
1158 <div class="content">
1159 <iframe id='fullpage-player' src="about:blank"></iframe>
1160 <button id="close-fullpage-overlay" class="close-btn" type="button"><span class="icon-close"></span></button>
1161 </div>
1162 </div>
1163
1164 @{
1165 var areaMainPages = ((System.Collections.ArrayList)Pageview.Area.get_Value("AreaMainPages")).Cast<int>().Select(pid => Dynamicweb.Content.Page.GetPageById(pid));
1166 }
1167
1168 @if (!IsSecret())
1169 {
1170 <footer id="bottom" class="hidden-print">
1171 <div class="social-bar">
1172 <a href="https://www.facebook.com/nissensautomotive/" target="_blank" title="Facebook" class="social-icon">
1173 <span class="icon-facebook">Facebook</span>
1174 </a>
1175 @*Hide YouTube if site lang is chinese*@
1176 @if (GetGlobalValue("Global:Area.LongLang") != "zh-CN")
1177 {
1178 <a href="https://www.youtube.com/user/NissensAS" target="_blank" title="YouTube" class="social-icon">
1179 <span class="icon-youtube">Youtube</span>
1180 </a>
1181 }
1182
1183 <a href="https://www.linkedin.com/company/20196" target="_blank" title="LinkedIn" class="social-icon">
1184 <span class="icon-linkedin">LinkedIn</span>
1185 </a>
1186
1187 </div>
1188
1189 <div class="bg"></div>
1190
1191 <div class="footer-container">
1192
1193 <div class="row">
1194
1195 <div>
1196 <a class="logo-white" href="/">
1197 @{
1198 @*var footerImage = @GetString("Item.Area.FooterImage.Value");*@
1199 var footerImage = websiteItem["FooterImage"];
1200 }
1201 <img src="@footerImage" alt="">
1202 </a>
1203 </div>
1204
1205 @{
1206 var currentRegion = new System.Globalization.RegionInfo(GetAreaCultureMap()[Pageview.AreaID].LCID);
1207 var aboutPage = areaMainPages.FirstOrDefault(p => p.ItemType == "AboutNissens");
1208 var divisions = Dynamicweb.Content.Items.ItemManager.Storage.GetByParentPageId("Department", aboutPage.ID);
1209
1210 Dynamicweb.Content.Items.Item regionalDivision = null;
1211 foreach (var item in divisions)
1212 {
1213 var country = item["Country"] as string;
1214 if (!string.IsNullOrEmpty(country) && country == currentRegion.Name)
1215 {
1216 regionalDivision = item;
1217 break;
1218 }
1219 }
1220
1221 if (regionalDivision == null)
1222 {
1223 regionalDivision = divisions.FirstOrDefault();
1224 }
1225
1226 if (regionalDivision != null)
1227 {
1228 var name = regionalDivision["Name"].ToString();
1229 var address1 = regionalDivision["Address_1"].ToString();
1230 var address2 = regionalDivision["Address_2"].ToString();
1231 var zip = regionalDivision["ZipCode"].ToString();
1232 var city = regionalDivision["City"].ToString();
1233 var phone = regionalDivision["Phone"].ToString();
1234 var phoneLink = "tel:" + phone;
1235 var fax = regionalDivision["Fax"].ToString();
1236 var email = regionalDivision["Email"].ToString();
1237 var emailLink = "mailto:" + email;
1238 var newLink = regionalDivision["Links"].ToString();
1239
1240
1241 <div>
1242 <h4 class="company-name">@name</h4>
1243 <p>
1244 <span>@address1</span><br>
1245 @if (!string.IsNullOrEmpty(address2))
1246 {
1247 <span>@address2</span><br>
1248 }
1249 @if (!string.IsNullOrEmpty(city))
1250 {
1251 <span>@zip @city</span><br>
1252 }
1253 @if (!string.IsNullOrEmpty(phone))
1254 {
1255 <span>Tel.: @phone</span><br>
1256 }
1257 @if (!string.IsNullOrEmpty(fax))
1258 {
1259 <span>Fax: @fax</span><br>
1260 }
1261 @if (!string.IsNullOrEmpty(email))
1262 {
1263 <span><a href="@emailLink">E-mail: @email</a></span>
1264 }
1265 </p>
1266 <div class="nissen-links">
1267 @if (!string.IsNullOrEmpty(newLink))
1268 {
1269 <span>@newLink</span>
1270 }
1271 </div>
1272 </div>
1273 <div style="margin-top:61px;">
1274 @{
1275 //Legal Disclaimer
1276 var disclaimerPage = areaMainPages.FirstOrDefault(p => p.ItemType == "LegalDisclaimer");
1277 if (disclaimerPage != null)
1278 {
1279 var disclaimerItem = Dynamicweb.Content.Items.ItemManager.Storage.GetById(disclaimerPage.ItemType, disclaimerPage.ItemId);
1280 if (disclaimerItem != null)
1281 {
1282 <p class="LegalDisclaimer" style="margin: 0;">
1283 <a href="/Default.aspx?ID=@disclaimerPage.ID" class="hd-btn tertiary">@disclaimerItem["FooterText"]</a>
1284 </p>
1285 }
1286 }
1287
1288 //Term and Conditions
1289 var termsAndConditions = areaMainPages.FirstOrDefault(p => p.ItemType == "TermsAndConditions");
1290 if (termsAndConditions != null)
1291 {
1292 var termsAndConditionsItem = Dynamicweb.Content.Items.ItemManager.Storage.GetById(termsAndConditions.ItemType, termsAndConditions.ItemId);
1293 if (termsAndConditionsItem != null)
1294 {
1295 var automotiveDownload = termsAndConditionsItem["TermsAndConditions_AutomotiveLink"];
1296 if (automotiveDownload != null && !string.IsNullOrWhiteSpace(termsAndConditionsItem["TermsAndConditions_AutomotiveText"].ToString()))
1297 {
1298 <p class="LegalDisclaimer" style="margin: 0;">
1299 <a href="@automotiveDownload" download="" class="hd-btn tertiary">@termsAndConditionsItem["TermsAndConditions_AutomotiveText"]</a>
1300 </p>
1301 }
1302
1303 var coolingSolutionsDownload = termsAndConditionsItem["TermsAndConditions_Cooling_SolutionsLink"];
1304 if (coolingSolutionsDownload != null && !string.IsNullOrWhiteSpace(termsAndConditionsItem["TermsAndConditions_Cooling_SolutionsText"].ToString()))
1305 {
1306 <p class="LegalDisclaimer" style="margin: 0;">
1307 <a href="@coolingSolutionsDownload" download="" class="hd-btn tertiary">@termsAndConditionsItem["TermsAndConditions_Cooling_SolutionsText"]</a>
1308 </p>
1309 }
1310
1311 }
1312 }
1313
1314 //Data privacy policy
1315 var datapolicyPage = areaMainPages.FirstOrDefault(p => p.ItemType == "Data_Privacy_Policy");
1316 if (datapolicyPage != null)
1317 {
1318 var datapolicyItem = Dynamicweb.Content.Items.ItemManager.Storage.GetById(datapolicyPage.ItemType, datapolicyPage.ItemId);
1319 if (datapolicyItem != null)
1320 {
1321 <p class="LegalDisclaimer" style="margin: 0;">
1322 <a style="margin: 0; padding-bottom: 0;" href="/Default.aspx?ID=@datapolicyPage.ID" class="hd-btn tertiary">@datapolicyItem["FooterText"]</a>
1323 </p>
1324 <br>
1325 @datapolicyItem["ExtraField"];
1326 }
1327 }
1328 }
1329
1330 @if (@GetString("DwPageName") == "About Nissens Automotive"){
1331
1332 if (GetGlobalValue("Global:Area.LongLang") == "en-GB")
1333 {
1334 <p class="LegalDisclaimer" style="margin: 0;">
1335 <a style="margin: 0; padding-bottom: 0;" href="/en-gb/investor-relations.aspx" class="hd-btn tertiary">Investor Relations</a>
1336 </p>
1337 }
1338 }
1339
1340 @if (@GetString("DwPageName") == "Om Nissens Automotive"){
1341
1342 if (GetGlobalValue("Global:Area.LongLang") == "da-DK")
1343 {
1344 <p class="LegalDisclaimer" style="margin: 0;">
1345 <a style="margin: 0; padding-bottom: 0;" href="/da-dk/investor-relations.aspx" class="hd-btn tertiary">Investor Relations</a>
1346 </p>
1347 }
1348 }
1349
1350 @if (GetGlobalValue("Global:Area.LongLang") == "sk-SK")
1351 {
1352 <p class="LegalDisclaimer" style="margin: 0;">
1353 kontakt na zodpovednú osobu v súvislosti so zákonom o ochrane osobých údajov je <a href="mailto:dpo10@proenergy.sk">dpo10@proenergy.sk</a>
1354 </p>
1355 }
1356
1357
1358 </div>
1359 }
1360 }
1361
1362 <!--div>
1363 @foreach (var p in areaMainPages)
1364 {
1365 var rootPage = p;
1366 if(rootPage.ItemType == "AboutNissens")
1367 {
1368 <a href="/Default.aspx?ID=@p.ID" class="hd-btn tertiary"><h4>@rootPage.MenuText</h4></a>
1369 <ul>
1370 @foreach(var paragraph in Dynamicweb.Content.Paragraph.GetParagraphsByPageID(p.ID))
1371 {
1372 //Husk lige ændre så der kommer et link ind
1373 <li><a href="/Default.aspx?ID=@p.ID/#@paragraph.ID">@paragraph.Header</a></li>
1374 }
1375 </ul>
1376 }
1377 }
1378 </div-->
1379
1380 <div class="col-shop">
1381 @*
1382 <a href="#" class="hd-btn newsletter" style="display: none;">Sign up for Newsletter</a>
1383 <h4>@Translate("Division","Division")</h4>
1384 <ul>
1385 @{
1386 foreach (var p in areaMainPages)
1387 {
1388 var rootPage = p;
1389 if(rootPage.ItemType == "Automotive" || rootPage.ItemType == "PowerGeneration" ||
1390 rootPage.ItemType == "OnAndOffroad")
1391 {
1392 <li>
1393 </li><li><a href="/Default.aspx?ID=@p.ID">@rootPage.MenuText</a></li>
1394
1395 }
1396 }
1397 }
1398 </ul>
1399 *@
1400 @{
1401 var automotivePage = areaMainPages.FirstOrDefault(p => p.ItemType == "Automotive");
1402 var automotivePageId = automotivePage != null ? automotivePage.ID : 0;
1403 if (Pageview.ID == automotivePageId || Dynamicweb.Content.Page.GetPageById(Pageview.ID).ParentPageID == automotivePageId)
1404 {
1405 <a href="http://webshop.nissens.com/" class="hd-btn tertiary">@Translate("NissensWebshopFooter", "Product Catalogue & Webshop")</a>
1406 }
1407 }
1408 </div>
1409
1410 </div>
1411 </div>
1412 </footer>
1413 }
1414
1415 <script src="/Files/Templates/Designs/Nissens_website/./scripts/lib/jquery/jquery.min.js?@cacheBust"></script>
1416 <script src="/Files/Templates/Designs/Nissens_website/./scripts/lib/polyfills/jquery.placeholder.min.js?@cacheBust"></script>
1417 <script src="/Files/Templates/Designs/Nissens_website/./scripts/lib/polyfills/matchMedia.js?@cacheBust"></script>
1418 <script src="/Files/Templates/Designs/Nissens_website/./scripts/lib/polyfills/matchMedia.addListener.js?@cacheBust"></script>
1419 <script src="/Files/Templates/Designs/Nissens_website/./scripts/lib/polyfills/polyfills.js?@cacheBust"></script>
1420 <script src="/Files/Templates/Designs/Nissens_website/./scripts/lib/enquire.js?@cacheBust"></script>
1421 <script src="/Files/Templates/Designs/Nissens_website/./scripts/lib/gsap/TweenMax.js?@cacheBust"></script>
1422 <script src="/Files/Templates/Designs/Nissens_website/./scripts/lib/gsap/ScrollMagic.min.js?@cacheBust"></script>
1423 <script src="/Files/Templates/Designs/Nissens_website/./scripts/lib/gsap/animation.gsap.js?@cacheBust"></script>
1424 <script src="/Files/Templates/Designs/Nissens_website/./scripts/lib/gsap/ScrollToPlugin.min.js?@cacheBust"></script>
1425 <script src="/Files/Templates/Designs/Nissens_website/./scripts/lib/fastclick.js?@cacheBust"></script>
1426 <script src="/Files/Templates/Designs/Nissens_website/./scripts/lib/lazy-loading-xt/jquery.lazyloadxt.min.js?@cacheBust"></script>
1427 <script src="/Files/Templates/Designs/Nissens_website/./scripts/lib/owl-carousel/owl.carousel.min.js?@cacheBust"></script>
1428 <script src="/Files/Templates/Designs/Nissens_website/./scripts/lib/js.cookie.js?@cacheBust"></script>
1429
1430 <script src="/Files/Templates/Designs/Nissens_website/./scripts/ground/ground.js?@cacheBust"></script>
1431 <script src="/Files/Templates/Designs/Nissens_website/./scripts/cookieDisclaimer.js?@cacheBust"></script>
1432 <script src="/Files/Templates/Designs/Nissens_website/./scripts/module/navigation/top.js?@cacheBust"></script>
1433 <script src="/Files/Templates/Designs/Nissens_website/./scripts/module/banner/hero.js?@cacheBust"></script>
1434 <script src="/Files/Templates/Designs/Nissens_website/./scripts/module/gallery/gallery.js?@cacheBust"></script>
1435 <script src="/Files/Templates/Designs/Nissens_website/./scripts/module/text/text.js?@cacheBust"></script>
1436 <script src="/Files/Templates/Designs/Nissens_website/./scripts/module/video/video.js?@cacheBust"></script>
1437 <script src="/Files/Templates/Designs/Nissens_website/./scripts/module/product/product.js?@cacheBust"></script>
1438 <script src="/Files/Templates/Designs/Nissens_website/./scripts/module/spot/spot.js?@cacheBust"></script>
1439 <script src="/Files/Templates/Designs/Nissens_website/./scripts/module/contact/contact.js?@cacheBust"></script>
1440 <script src="/Files/Templates/Designs/Nissens_website/./scripts/module/animation/animation.js?@cacheBust"></script>
1441 <script src="/Files/Templates/Designs/Nissens_website/./scripts/module/oilfinder/oilfinder.js?@cacheBust"></script>
1442 <script src="/Files/Templates/Designs/Nissens_website/./scripts/module/languagePicker/languagePicker.js?@cacheBust"></script>
1443
1444 </body>
1445 </html>