Error executing template "Designs/Ege/_parsed/ProductList.parsed.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
at CompiledRazorTemplates.Dynamic.RazorEngine_46a3ae081f914cd08a42f4d57caad5c4.Execute() in E:\Solutions\egecarpets.dk\Files\Templates\Designs\Ege\_parsed\ProductList.parsed.cshtml:line 624
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 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel>
2
3 @using EGE.Website.CustomModules;
4 @using EGE.Website.CustomModules.Helpers
5 @using EGE.Website.CustomModules.ViewModels
6 @using EGE.Website.CustomModules.Extensions
7 @using Dynamicweb.Frontend
8 @using System.Text.RegularExpressions
9 @using System.Web
10
11
12 @{
13 var httpRequest = System.Web.HttpContext.Current.Request;
14 var host = httpRequest.Url.Host;
15 var currentUrl = httpRequest.Url.AbsoluteUri;
16 var canonicalUrl = TemplateHelper.GetCanonical(httpRequest, Pageview.ID);
17
18 var rootNodes = Dynamicweb.Services.Pages.GetAreaNavigationTree(Model.Area.ID).RootNodes.Where(x => x.IsPublished);
19
20 var isBrowserIe = httpRequest.Browser != null && httpRequest.Browser.Browser.ToLower().Trim() == "internetexplorer";
21 var websiteProperties = Model.Area.Item;
22 var showNewsletterSticky = Model.GetPageProperty("NewsletterSticky");
23 var newsletterSignupPage = Model.GetAreaProperty("NewsletterSignupPage");
24 var searchPageId = GetPageIdByNavigationTag(Constants.SearchPageNavigationTag);
25 var searchPageUrl = SearchEngineFriendlyURLs.GetFriendlyUrl(searchPageId);
26 bool hasParent = Pageview.Page.ParentPageId != 0;
27 var productId = System.Web.HttpContext.Current.Request.Params["productid"] ?? null;
28 var highlights = Model.GetAreaList("BlogHighlightsList");
29 var pageLanguages = Model.GetLanguages();
30 string pageTitle = Model.Title;
31 string pageDescription = Model.Description;
32
33 bool isOutletSite = PageExtensions.IsOutletArea(Pageview.AreaID);
34 bool isFundSite = PageExtensions.IsFundArea(Pageview.AreaID);
35 bool isContractSite = PageExtensions.IsContractArea(Pageview.AreaID);
36 bool isMasterHomePageUrl = currentUrl.EndsWith("/");
37
38 if (!string.IsNullOrEmpty(productId))
39 {
40 var ecomLanguageId = Pageview.Area.EcomLanguageId;
41 if (!string.IsNullOrEmpty(ecomLanguageId))
42 {
43 var product = Dynamicweb.Ecommerce.Services.Products.GetProductById(productId, null, ecomLanguageId);
44
45 if (product != null)
46 {
47 pageTitle = product.Name;
48 if (!string.IsNullOrEmpty(product.LongDescription))
49 {
50 pageDescription = Regex.Replace(product.LongDescription, @"<[^>]*>", "");
51 }
52
53 if (product.Meta != null)
54 {
55 if (!string.IsNullOrEmpty(product.Meta.Title))
56 {
57 pageTitle = product.Meta.Title;
58 }
59 if (!string.IsNullOrEmpty(product.Meta.Description))
60 {
61 pageDescription = product.Meta.Description;
62 }
63 }
64 }
65 }
66 }
67 else if (Pageview.Meta != null && !string.IsNullOrEmpty(Pageview.Meta.Title))
68 {
69 pageTitle = Pageview.Meta.Title;
70 }
71 var isB2cArea = Model.IsB2CArea();
72 }
73
74 @{
75 @functions {
76 public static string RemoveQueryParam(string url, string paramToRemove)
77 {
78 var uriBuilder = new UriBuilder(url);
79 var query = HttpUtility.ParseQueryString(uriBuilder.Query);
80 query.Remove(paramToRemove);
81 uriBuilder.Port = -1;
82 uriBuilder.Query = query.ToString();
83 return uriBuilder.Uri.AbsoluteUri;
84 }
85 }
86 }
87
88 <!DOCTYPE html>
89
90 <html lang="@Pageview.Area.CultureInfo" xmlns:xlink="http://www.w3.org/1999/xlink">
91 <head>
92 @if (!host.Contains("stagingsite") && !host.Contains(".local."))
93 {
94 @Model.GetAreaProperty("GTM_Head")
95 }
96 <meta charset="utf-8" />
97 <meta name="viewport" content="width=device-width, initial-scale=1" />
98 @if (host.Contains("local") || host.Contains("stagingsite") || host.Contains("ditnyewebsite"))
99 {
100 <meta name="robots" content="noindex, nofollow" />
101 }
102 @if (!string.IsNullOrEmpty(canonicalUrl))
103 {
104 string updatedCanonicalUrl = RemoveQueryParam(canonicalUrl, "productID");
105
106 <link rel="canonical" href="@updatedCanonicalUrl" />
107 }
108 @if (!string.IsNullOrEmpty(pageDescription))
109 {
110 <meta name="description" content="@pageDescription" />
111 }
112 <meta property="og:image" content="@TemplateHelper.GetAbsoluteUrl(Constants.DistPath + "/images/logo.svg")" />
113 <link rel="shortcut icon" href="@Constants.DistPath/favicons/favicon-16x16.png" type="image/x-icon">
114 <link rel="icon" href="@Constants.DistPath/favicons/favicon-16x16.png" type="image/x-icon">
115 <link media="all" href="@TemplateHelper.GetRevisionNumber(@Constants.DistPath + "/css/master.min.css")" rel="stylesheet" />
116 <link rel="preload" as="font" href="@Constants.DistPath/fonts/Graphik-Light-Web.woff2" type="font/woff2" crossorigin />
117 <link rel="preload" as="font" href="@Constants.DistPath/fonts/Graphik-Semibold_gdi.woff" type="font/woff" crossorigin />
118
119 @if (isMasterHomePageUrl)
120 {
121 foreach (var language in pageLanguages)
122 {
123 string cleanUrl = TemplateHelper.GetCleanHreflangUrl(language.Url);
124
125 if (language.Culture == "en-GB")
126 {
127 <link rel="alternate" hreflang="x-default" href="@cleanUrl" />
128 }
129 else
130 {
131 <link rel="alternate" hreflang="@language.Culture" href="@cleanUrl" />
132 }
133 }
134 }
135 else
136 {
137 foreach (var language in pageLanguages)
138 {
139 string cleanUrl = TemplateHelper.GetCleanHreflangUrl(language.Url);
140 bool isHomePageUrl = cleanUrl.EndsWith("/");
141
142 if (isHomePageUrl)
143 {
144 continue;
145 }
146 if (language.Culture == "en-GB")
147 {
148 <link rel="alternate" hreflang="x-default" href="@cleanUrl" />
149 }
150 else
151 {
152 <link rel="alternate" hreflang="@language.Culture" href="@cleanUrl" />
153 }
154 }
155 }
156
157
158 <title>@pageTitle</title>
159 <script src="@TemplateHelper.GetRevisionNumber(Constants.ProjectPath + "/Scripts/Feeds.js")"></script>
160 <script src="@TemplateHelper.GetRevisionNumber(Constants.ProjectPath + "/Scripts/Custom.js")"></script>
161
162 </head>
163
164 <body>
165 @if (!host.Contains("stagingsite") && !host.Contains(".local."))
166 {
167 @Model.GetAreaProperty("GTM_Body")
168 }
169
170 <!-- Languages for language selector -->
171 @{
172 var areaCulture = Pageview.Area.Culture;
173 }
174 <script>
175 var languages = [
176 @foreach (var language in pageLanguages)
177 {
178 @:{
179 @:'lang': '@language.Id',
180 @:'link': '@language.Url',
181 @:'culture': '@language.Culture'
182 @:},
183 }
184 ];
185 var selectedLang = languages.find(x => x.culture === '@areaCulture');
186 </script>
187 <div class="navigation navigation--closed" id="js-navigation">
188 <div class="container navigation__main-container">
189 <div class="row">
190 @if (pageLanguages.Count > 1)
191 {
192 <div class="col-xs-12 col-sm-6 col-lg-8">
193 <form action="@searchPageUrl" method="get" class="search-field js-search-field search-field--in-navigation" id="">
194 <svg class="icon icon--search">
195 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="@Constants.DistPath/icons/icons.svg#search">
196 </use>
197 </svg>
198 <input type="text" name="query" class="search-field__input" placeholder="@Translate("Search", "Search")">
199 <div class="search-field__label">@Translate("Search", "Search")</div>
200 </form>
201 </div>
202 <div class="col-xs-12 col-sm-6 col-lg-4 language-select-wrapper-nav">
203 <div class="container language-select">
204 <div class="row language-select__content">
205 <div class="language-select__content-text">@Translate("Global | Choose Language", "Choose Language")</div>
206 <div class="language-select__content-icon" v-if="selectedLang" @@click="toggleLangDropdown">
207 <div class="language-select__content-tag">
208 {{selectedLang.lang}}
209 </div>
210 </div>
211 <figure class="language-select__content-icon-arrow-container" v-bind:class="{ 'language-select__content-icon-arrow-container-active': showDropdown}" @@click="toggleLangDropdown">
212 <svg class="svg-icon language-select__content-icon-arrow">
213 <use xlink:href="@Constants.DistPath/icons/icons.svg#arrow"></use>
214 </svg>
215 </figure>
216 </div>
217 <div class="language-select__dropdown" v-bind:class="{ 'language-select__dropdown-active': showDropdown}" v-if="showDropdown">
218 <div class="language-select__dropdown-arrow"></div>
219 <div class="language-select__dropdown-list">
220 <div class="language-select__dropdown-list-item" v-for="lang in languages">
221 <a :href="lang.link" class="language-select__content-icon dropdown-icon" @@click="selectLang(lang)">
222 <div class="language-select__content-tag">
223 {{lang.lang}}
224 </div>
225 </a>
226 </div>
227 </div>
228 </div>
229 </div>
230 </div>
231 }
232 else
233 {
234 if (!isFundSite)
235 {
236 <div class="col-xs-12 col-sm-12 col-lg-12">
237 <form action="@searchPageUrl" method="get" class="search-field js-search-field search-field--in-navigation" id="">
238 <svg class="icon icon--search">
239 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="@Constants.DistPath/icons/icons.svg#search">
240 </use>
241 </svg>
242 <input type="text" name="query" class="search-field__input" placeholder="@Translate("Search", "Search")">
243 <div class="search-field__label">@Translate("Search", "Search")</div>
244 </form>
245 </div>
246 }
247 <!-- Logout -->
248 if (isOutletSite && Pageview.User != null)
249 {
250 <div class="logout-btn">
251 <a href="/Admin/Public/ExtranetLogoff.aspx?redirect=@System.Web.HttpUtility.UrlEncode("/Default.aspx?Id="+Pageview.Page.ID)" class="logout-btn__text">
252 <span>Log out</span>
253 </a>
254 </div>
255 }
256 }
257 </div>
258 <div class="row">
259 <nav class="navigation__navigation navigation__navigation--has-active-item" id="js-navigation__navigation" v-bind:class="{ 'navigation__navigation--has-active-item': isHoverMainNavigation }">
260 <ul class="navigation__list">
261 @{ int i = 0; }
262 @foreach (var node in rootNodes)
263 {
264 var children = node.Children.Where(x => x.IsPublished).OrderBy(x => x.Sort).ToList();
265 bool hasChildren = children.Count > 0;
266 string subNavAttribute = hasChildren ? "data-has-subnavigation=\"true\"" : "";
267
268 /* ads target="_blank" if true - issue egedr-593 */
269 var nodePageLinkTargetValue = "_self";
270 var nodeNewTabString = PageExtensions.GetPropertyStringBool(node.ID, "NyFane");
271 if (nodeNewTabString != null && !string.IsNullOrWhiteSpace(nodeNewTabString) && nodeNewTabString == "True")
272 {
273 nodePageLinkTargetValue = "_blank";
274 }
275 <li class="navigation__item" @subNavAttribute v-bind:class="{'navigation__item--active': navigationTopLevelItems[@i] && navigationTopLevelItems[@i].active}" id="navigation-item-@i">
276 <a href="@(!hasChildren ? SearchEngineFriendlyURLs.GetFriendlyUrl(node.ID) : "#")" target="@nodePageLinkTargetValue" class="navigation__link navigation__link--level-1" ref="js-navigation-link--@i" @@click="toggleShow">
277 @node.Title
278 <span class="navigation__arrow">
279 <svg class="svg-icon navigation__svg">
280 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="@Constants.DistPath/icons/icons.svg#arrow"></use>
281 </svg>
282 </span>
283 </a>
284
285 @if (hasChildren)
286 {
287 var menuText = PageExtensions.GetPropertyString(node.ID, "MenuText");
288
289 <div class="navigation__sub-navigation" v-show="navigationTopLevelItems[@i] && navigationTopLevelItems[@i].active">
290 <ul class="navigation__sub-list">
291 @foreach (var grandnode in children)
292 {
293 /* ads target="_blank" if true - issue egedr-593 */
294 var grandnodePageLinkTargetValue = "_self";
295 var grandnodeNewTabString = PageExtensions.GetPropertyStringBool(grandnode.ID, "NyFane");
296 if (grandnodeNewTabString != null && !string.IsNullOrWhiteSpace(grandnodeNewTabString) && grandnodeNewTabString == "True")
297 {
298 grandnodePageLinkTargetValue = "_blank";
299 }
300
301 <li class="navigation__item">
302 <a href="@SearchEngineFriendlyURLs.GetFriendlyUrl(grandnode.ID)" target="@grandnodePageLinkTargetValue" class="navigation__link navigation__link--level-2">@grandnode.Title</a>
303 </li>
304 }
305 </ul>
306
307 @if (!string.IsNullOrWhiteSpace(menuText))
308 {
309 <a href="@SearchEngineFriendlyURLs.GetFriendlyUrl(node.ID)">
310 <button type="button" class="button" data-text="@menuText">
311 <span class="button__content">
312 <span class="button__icon">
313 <svg class="svg-icon button__svg">
314 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="@Constants.DistPath/icons/icons.svg#overview"></use>
315 </svg>
316 </span>
317 <span class="button__text" v-if="selectedLang && selectedLang.lang == 'En'" style="min-width: 120px">@menuText</span>
318 <span class="button__text" v-if="selectedLang && selectedLang.lang == 'Da'" style="min-width: 120px">@menuText</span>
319 <span class="button__text" v-if="selectedLang && selectedLang.lang == 'De'" style="min-width: 160px">@menuText</span>
320 <span class="button__text" v-if="selectedLang && selectedLang.lang == 'Fr'" style="min-width: 180px">@menuText</span>
321 </span>
322 </button>
323 </a>
324 }
325 </div>
326 }
327 </li>
328 i++;
329 }
330 </ul>
331 </nav>
332 <div class="navigation__highlights">
333 @if (highlights.Any())
334 {
335 <div class="highlights__header">@Translate("Highlights", "Highlights")</div>
336
337 <ul class="highlights">
338 @foreach (var highlight in highlights.OrderBy(x => x.GetInt32("BlogHightlightSort")))
339 {
340 var image = highlight.GetFile("Image")?.Path;
341
342 <li class="highlights__item">
343 <a href="@highlight.GetString("Link")" class="highlights__link" target="_blank">
344 <span class="highlights__image">
345 <figure class="highlights__image-inner">
346 <img class="lazyload a-image lazyload-measure lazyload-bg "
347 src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="
348 alt="@highlight.GetString("Text").Replace("\"", "")"
349 property="contentUrl"
350 data-src="@image?mode=crop"
351 data-query-obj='{ }'>
352 <noscript v-if="false">
353 <img src="@image?mode=crop&width="
354 alt="@highlight.GetString("Text").Replace("\"", "")">
355 </noscript>
356 </figure>
357 </span>
358 <span class="highlights__text">@highlight.GetString("Text")</span>
359 </a>
360 </li>
361 }
362 </ul>
363 }
364 </div>
365 </div>
366 </div>
367
368 <div class="navigation__close-holder">
369 <button class="close-button " @@click="close">
370 <span class="close-button__icon">
371 <svg class="svg-icon close-button__svg">
372 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="@Constants.DistPath/icons/icons.svg#cross"></use>
373 </svg>
374 </span>
375 <span class="close-button__text">@Translate("Close menu", "Close menu")</span>
376 </button>
377 </div>
378
379 <div class="navigation__close-holder-top">
380 <button class="close-button " @@click="close">
381 <span class="close-button__icon">
382 <svg class="svg-icon close-button__svg">
383 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="@Constants.DistPath/icons/icons.svg#cross"></use>
384 </svg>
385 </span>
386 <span class="close-button__text">@Translate("Close menu", "Close menu")</span>
387 </button>
388 </div>
389 </div>
390
391 <div class="mobile-header" v-bind:class="{ 'mobile-header--white-bg': isWhite, 'mobile-header--dark-text':hasDarkText}" id="mobile-header">
392 <a href="/" class="logo">
393 <svg class="icon icon--logo">
394 <use xmlns:xlink="http://www.w3.org/1999/xlink"
395 xlink:href="@Constants.DistPath/icons/icons.svg#logo">
396 </use>
397 </svg>
398 </a>
399 </div>
400
401 <div class="global-header" v-bind:class="{ 'hide-on-loginpage': loginPage, 'global-header--show': showHeader, 'global-header--dark-text':hasDarkText, 'global-header--white-bg': isWhite, 'global-header--scroll-started': scrollStarted, 'global-header--sticky':isSticky }" id="global-header">
402 <div class="global-header__dropdown-container">
403 <div class="container" v-cloak>
404 <div class="dropdown dropdown--not-standalone dropdown--language-selector" v-if="selectedLang">
405 <div class="dropdown__header" v-bind:class="{ 'dropdown__header-active': showLanguageDropdown}" @@click="toggleLanguageDropdown">
406 {{selectedLang.lang}}
407 <span class="dropdown__direction">
408 <figure class="dropdown__icon" v-bind:class="{ 'dropdown__icon-active': showLanguageDropdown}">
409 <svg class="svg-icon dropdown__icon-arrow"><use xlink:href="@Constants.DistPath/icons/icons.svg#arrow-down-in-circle"></use></svg>
410 </figure>
411 </span>
412 </div>
413 <div class="dropdown__body" v-bind:class="{ 'dropdown__body-active': showLanguageDropdown}" v-if="showLanguageDropdown != undefined">
414 <div class="dropdown__body-header"
415 v-bind:class="{ 'dropdown__body-header-active': showLanguageDropdown}"
416 @@click="toggleLanguageDropdown">
417 {{selectedLang.lang}}
418 <span class="dropdown__direction">
419 <figure class="dropdown__icon dropdown_icon" v-bind:class="{ 'dropdown__icon-active': showLanguageDropdown}">
420 <svg class="svg-icon dropdown__icon-arrow"><use xlink:href="@Constants.DistPath/icons/icons.svg#arrow-down-in-circle"></use></svg>
421 </figure>
422 </span>
423 </div>
424 <hr class="dropdown__body-hr">
425 <div class="dropdown__select-container">
426 <div class="dropdown__select-list">
427 <div class="dropdown__select-list-item" v-for="lang in languages" @@click="selectLang(lang)">
428 <a :href="lang.link" class="dropdown__select-label" @@click="selectLang(lang)">{{lang.lang}}</a>
429 </div>
430 </div>
431 </div>
432 </div>
433 </div>
434 <!-- Logout -->
435 @if (isOutletSite && Pageview.User != null)
436 {
437 <div class="logout-btn">
438 <a href="/Admin/Public/ExtranetLogoff.aspx?redirect=@System.Web.HttpUtility.UrlEncode("/Default.aspx?Id="+Pageview.Page.ID)" class="logout-btn__text">
439 <span>Log out</span>
440 </a>
441 </div>
442 }
443 </div>
444 </div>
445
446 <div class="container global-header-container">
447 <div class="global-header-bar">
448 <!-- changed href from @SearchEngineFriendlyURLs.GetFriendlyUrl(Model.Area.FirstPage.ID) to / -->
449 <a href="/" class="logo" v-bind:class=" { 'logo--move-up' : scrollStarted }">
450 <svg class="icon icon--logo">
451 <use xmlns:xlink="http://www.w3.org/1999/xlink"
452 xlink:href="@Constants.DistPath/icons/icons.svg#logo">
453 </use>
454 </svg>
455 </a>
456 <div class="global-header-bar__search-field">
457 @if (!isFundSite)
458 {
459 <form action="@searchPageUrl" method="get" class="search-field js-search-field " id="">
460 <svg class="icon icon--search">
461 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="@Constants.DistPath/icons/icons.svg#search">
462 </use>
463 </svg>
464 <input type="text" name="query" class="search-field__input" placeholder="@Translate("Search", "Search")">
465 <div class="search-field__label">@Translate("Search", "Search")</div>
466 </form>
467 }
468 </div>
469 <div class="global-header-list" v-bind:class="{ 'global-header-list--collapsed': isCollapsed }">
470
471 @foreach (var node in rootNodes.Take(5))
472 {
473 var isActive = node.ID == PageView.Current().ID;
474
475 var globalHeaderLinkChildren = node.Children.Where(x => x.IsPublished).OrderBy(x => x.Sort).ToList();
476 bool globalHeaderLinkHasChildren = globalHeaderLinkChildren.Count > 0;
477 string clickEvent = "";
478 string itemLink = SearchEngineFriendlyURLs.GetFriendlyUrl(node.ID);
479
480 if (globalHeaderLinkHasChildren && !node.IsShortcut)
481 {
482 clickEvent = "@click=\"triggerNavigationOverlay\"";
483 itemLink = "#";
484 }
485
486 <a href="@itemLink" @clickEvent class="global-header-list__item @(isActive ? "global-header-list__item--active" : "") " v-bind:class="{ 'global-header-list__item--collapsed': isCollapsed }">@node.GetDisplayName()</a>
487
488 }
489 @if (!isOutletSite)
490 {
491 <a href="#" @@click="triggerNavigationOverlay" class="global-header-list__item global-header-list__item--more" v-bind:class="{ 'global-header-list__item--collapsed': isCollapsed }">+@Translate("More", "More")</a>
492 }
493 </div>
494 <div class="global-header-bar__burger" v-bind:class="{ 'global-header-bar__burger--collapsed': isCollapsed }" @@click="triggerNavigationOverlay">
495 <svg class="icon icon--burger">
496 <use xmlns:xlink="http://www.w3.org/1999/xlink"
497 xlink:href="@Constants.DistPath/icons/icons.svg#burger">
498 </use>
499 </svg>
500 </div>
501 <div class="global-header-bar__burger-combi" @@click="triggerNavigationOverlay">
502 @if (!isFundSite) {
503 <svg class="icon icon--burger-combi">
504 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="@Constants.DistPath/icons/icons.svg#burger-combi"></use>
505 </svg>
506 }
507 else{
508 <svg class="icon icon--burger-no-search">
509 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="@Constants.DistPath/icons/icons.svg#burger"></use>
510 </svg>
511 }
512 <div class="global-header-bar__label">@Translate("Menu", "Menu")</div>
513 </div>
514 @if (!isB2cArea && !isFundSite && !isContractSite)
515 {
516 <div class="global-header-bar__samples" @@click="showBasket">
517 <svg class="icon icon--samples">
518 <use xmlns:xlink="http://www.w3.org/1999/xlink"
519 xlink:href="@Constants.DistPath/icons/icons.svg#samples">
520 </use>
521 </svg>
522
523 <div class="global-header-bar__label">
524 @if (isOutletSite)
525 {
526 @Translate("Your orders", "Your orders")
527 }
528 else
529 {
530 @Translate("Your samples", "Your samples")
531 }
532 <span class="global-header-bar__samples-amount" id="js-cart-amount-indicator">@Model.Cart.ProductsCount</span>
533 </div>
534 </div>
535 }
536 </div>
537 </div>
538 </div>
539
540 @if ( hasParent || !string.IsNullOrEmpty(productId))
541 {
542 <nav class="breadcrumb" id="js-breadcrumb" v-bind:class="{'hide-on-loginpage': loginPage, 'breadcrumb--white':isWhite, 'breadcrumb--dark-text':hasDarkText}">
543 <a class="breadcrumb__link" href="/">...</a>
544 @foreach (var page in TemplateHelper.GetBreadcrumbs(Model.ID, productId))
545 {
546 <span class="breadcrumb__separator">/</span>
547 <a class="breadcrumb__link" href=@page.Item1>@page.Item2</a>
548 }
549 </nav>
550 }
551
552 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel>
553
554 @Title("Product list template")
555
556
557 @Model.Placeholder("dwcontent", "content", "default:true;sort:1")
558
559
560 <footer class="global-footer" id="js-global-footer">
561 <div class="container global-footer__container">
562 <div class="global-footer__logo">
563 <a href="/" class="logo" v-bind:class=" { 'logo--move-up' : scrollStarted }">
564 <svg class="icon icon--logo">
565 <use xmlns:xlink="http://www.w3.org/1999/xlink"
566 xlink:href="@Constants.DistPath/icons/icons.svg#logo">
567 </use>
568 </svg>
569 </a>
570 </div>
571 <div class="global-footer__some">
572 <div class="global-footer__some-header js-alt-color">
573 @Translate("Footer | Header", "We are social")
574 </div>
575 <ul class="global-footer__some-list">
576 @if (Model.Area.Item != null)
577 {
578 if (!string.IsNullOrWhiteSpace(Model.Area.Item.GetField("Instagram").GetString()))
579 {
580 <li class="global-footer__some-item">
581 <a title="Ege on Instagram" href="@Model.Area.Item.GetField("Instagram").GetValue()" class="global-footer__some-link">
582 <svg class="svg-icon global-footer__some-svg">
583 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="@Constants.DistPath/icons/icons.svg#some-instagram"></use>
584 </svg>
585 </a>
586 </li>
587 }
588 if (!string.IsNullOrWhiteSpace(Model.Area.Item.GetField("Pinterest").GetString()))
589 {
590 <li class="global-footer__some-item">
591 <a title="Ege on Pinterest" href="@Model.Area.Item.GetField("Pinterest").GetValue()" class="global-footer__some-link">
592 <svg class="svg-icon global-footer__some-svg">
593 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="@Constants.DistPath/icons/icons.svg#some-pinterest"></use>
594 </svg>
595 </a>
596 </li>
597 }
598 if (!string.IsNullOrWhiteSpace(Model.Area.Item.GetField("Facebook").GetString()))
599 {
600 <li class="global-footer__some-item">
601 <a title="Ege on Facebook" href="@Model.Area.Item.GetField("Facebook").GetValue()" class="global-footer__some-link">
602 <svg class="svg-icon global-footer__some-svg">
603 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="@Constants.DistPath/icons/icons.svg#some-facebook"></use>
604 </svg>
605 </a>
606 </li>
607 }
608 if (!string.IsNullOrWhiteSpace(Model.Area.Item.GetField("Linkedin").GetString()))
609 {
610 <li class="global-footer__some-item">
611 <a title="Ege on LinkedIn" href="@Model.Area.Item.GetField("Linkedin").GetValue()" class="global-footer__some-link">
612 <svg class="svg-icon global-footer__some-svg">
613 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="@Constants.DistPath/icons/icons.svg#some-linkedin"></use>
614 </svg>
615 </a>
616 </li>
617 }
618 }
619 </ul>
620 </div>
621 @if (Model.Area.Item != null)
622 {
623 var customFooterLinkName = !string.IsNullOrEmpty(Model.Area.Item.GetField("FooterLinkName").GetValue().ToString()) ? Model.Area.Item.GetField("FooterLinkName").GetValue() : "";
624 var customFooterLinkName2 = !string.IsNullOrEmpty(Model.Area.Item.GetField("FooterLinkName_2").GetValue().ToString()) ? Model.Area.Item.GetField("FooterLinkName_2").GetValue() : "";
625 var isFooterLinkFirst = !string.IsNullOrEmpty(Model.Area.Item.GetField("FooterLinkName_2").GetValue().ToString()) ? "global-footer__second-links" : "global-footer__links";
626
627 <div class="global-footer__address">
628
629 <p>@Model.Area.Item.GetField("CompanyName").GetValue()</p>
630 <p>@Model.Area.Item.GetField("Road").GetValue()</p>
631 <p>@Model.Area.Item.GetField("ZipcodeAndCity").GetValue()</p>
632 <p><a href="tel:@Model.Area.Item.GetField("Phone").GetValue().ToString().Replace(" ", " ")">@Model.Area.Item.GetField("Phone").GetValue()</a></p>
633 <p><a href="mailto:@Model.Area.Item.GetField("Email").GetValue().ToString().Replace(" ", " ")">@Model.Area.Item.GetField("Email").GetValue()</a></p>
634 <p>@Model.Area.Item.GetField("CVR").GetValue()</p>
635 </div>
636 if (customFooterLinkName2.ToString() != "")
637 {
638 <div class="global-footer__links">
639 <p><a href="@Model.Area.Item.GetField("FooterLink_2").GetValue()">@customFooterLinkName2</a></p>
640 </div>
641 }
642 <div class="@isFooterLinkFirst">
643 <p class="footer-link"><a href="@Model.Area.Item.GetField("CookieAndPrivacyLink").GetValue()">@Translate("Cookiepolicy and privacy", "Cookiepolicy and privacy")</a></p>
644 @if (customFooterLinkName.ToString() != "")
645 {
646 <p class="footer-link"><a href="@Model.Area.Item.GetField("FooterLink").GetValue()">@customFooterLinkName</a></p>
647 }
648 </div>
649 }
650 </div>
651 </footer>
652
653 @if (showNewsletterSticky && !string.IsNullOrWhiteSpace(newsletterSignupPage))
654 {
655 <div class="cta-newsletter">
656 @TemplateHelper.RenderPartial(Constants.ButtonPartialPath, ButtonFactory.CreateButton(newsletterSignupPage, Translate("Global | Nyhedssticky tekst", "Sign up for newsletter"), "button button--ghost button--gold button--cta-newsletter", "arrow"))
657 </div>
658 }
659 @if (!isB2cArea)
660 {
661 @TemplateHelper.RenderPartial("Partials/Ege_Cart.cshtml", Model.Cart)
662 }
663
664 @if (websiteProperties != null && !string.IsNullOrWhiteSpace(websiteProperties.GetString("InternetExplorerMessageTitle")))
665 {
666 <!-- Internet Explorer message -->
667 <div class="stop-ie" id="js-stop-ie" style="display: none;">
668 <section class="spotlight-section spotlight-section--dark-bg spotlight-section--img-right spotlight-section--stop-ie">
669 <div class="spotlight-section__bg"></div>
670 <div class="container spotlight-section__container">
671 <div class="row">
672 <div class="col-lg-10 col-lg-offset-1">
673 <div class="spotlight-section__main-elems">
674 <figure class="spotlight-section__image" ref="spotlightSectionImage">
675 <img src="@Constants.DistPath/images/logo.svg" alt="Egecarpets Logo" class="spotlight-section__image-ie">
676 </figure>
677
678 <div class="spotlight-section__content">
679 <div class="spotlight-section__content-headline">
680 @websiteProperties.GetString("InternetExplorerMessageTitle")
681 </div>
682 <div class="spotlight-section__content-subtitle">
683 <span class="spotlight-section__content--hr"></span> @websiteProperties.GetString("InternetExplorerMessageSubtitle")
684 </div>
685 <div class="spotlight-section__content-text">
686 @websiteProperties.GetString("InternetExplorerMessageText")
687 </div>
688 <div class="spotlight-section__content-button">
689 <div class="spotlight-section__content-text spotlight-section__content-text--edge-button" style="display: none;" id="js-spotlight-section__content-text--edge-button">
690 <a href="microsoft-edge:@currentUrl" title="" property="url" class="button button--ghost button--gold button--ie " data-text="@websiteProperties.GetString("InternetExplorerMessageButtonText")">
691 <span class="button__content">
692 <span class="button__icon">
693 <span class="button__ie-arrow"></span>
694 </span>
695 <span class="button__text">@websiteProperties.GetString("InternetExplorerMessageButtonText")</span>
696 </span>
697 </a>
698 </div>
699 </div>
700 </div>
701 </div>
702 </div>
703 </div>
704 </div>
705 </section>
706 </div><!-- #js-stop-ie -->
707 }
708
709 @if (isBrowserIe)
710 {
711 <script src="@TemplateHelper.GetRevisionNumber(Constants.DistPath + "/scripts/noIE.js")"></script>
712 }
713 else
714 {
715 <script src="@TemplateHelper.GetRevisionNumber(Constants.DistPath + "/scripts/manifest.bundle.js")"></script>
716 <script src="@TemplateHelper.GetRevisionNumber(Constants.DistPath + "/scripts/vendor.bundle.js")"></script>
717 <script src="@TemplateHelper.GetRevisionNumber(Constants.DistPath + "/scripts/app.bundle.js")"></script>
718 }
719 <p>@websiteProperties.GetString("navn")</p>
720 </body>
721 </html>