Exception in template (Designs/EasyCamp/_parsed/ModulePageItem.parsed.cshtml): System.NullReferenceException: Object reference not set to an instance of an object.
   at OaseOutdoors.Core.Extensions.GroupExtenstion.GetAncestors(Group group, List`1 ancestors) in C:\projects\oase\src\Core\Extensions\GroupExtenstion.cs:line 26
   at OaseOutdoors.Core.Extensions.GroupExtenstion.GetAncestors(Group group) in C:\projects\oase\src\Core\Extensions\GroupExtenstion.cs:line 12
   at OaseOutdoors.Services.NavigationService.NavigationService.GetGroupStatus(String groupId) in C:\projects\oase\src\Services\NavigationService\NavigationService.cs:line 171
   at OaseOutdoors.Services.NavigationService.NavigationService.GetNavigationForGroups(IEnumerable`1 groups, Int32 level) in C:\projects\oase\src\Services\NavigationService\NavigationService.cs:line 109
   at OaseOutdoors.Services.NavigationService.NavigationService.GetNavigationLevel(IEnumerable`1 pages) in C:\projects\oase\src\Services\NavigationService\NavigationService.cs:line 80
   at OaseOutdoors.Components.EasyCamp.Layout.ECMaster.ModelBuilders.ECMasterViewModelBuilder.GetViewModel(Int32 areaId) in C:\projects\oase\src\Components\EasyCamp\Layout\ECMaster\ModelBuilders\ECMasterModelBuilder.cs:line 78
   at CompiledRazorTemplates.Dynamic.badedafdc.Execute()
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context) in c:\Users\abbottm\Documents\GitHub\RazorEngine\src\Core\RazorEngine.Core\Templating\TemplateBase.cs:line 126
   at RazorEngine.Templating.TemplateService.Run(ITemplate template, DynamicViewBag viewBag) in c:\Users\abbottm\Documents\GitHub\RazorEngine\src\Core\RazorEngine.Core\Templating\TemplateService.cs:line 608
   at RazorEngine.Templating.TemplateService.Parse(String razorTemplate, Object model, DynamicViewBag viewBag, String cacheName) in c:\Users\abbottm\Documents\GitHub\RazorEngine\src\Core\RazorEngine.Core\Templating\TemplateService.cs:line 439
   at RazorEngine.Razor.Parse[T](String razorTemplate, T model, DynamicViewBag viewBag, String cacheName) in c:\Users\abbottm\Documents\GitHub\RazorEngine\src\Core\RazorEngine.Core\Razor.cs:line 290
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()
@using System.Linq @using System.Web @using System.Web.Hosting @using Dynamicweb.Extensibility @using Dynamicweb.Frontend @using OaseOutdoors.Components.EasyCamp.Layout.ECMaster.ModelBuilders @using OaseOutdoors.Services.StaticResourceService.Initialization @using OaseOutdoors.Components.EasyCamp.Layout.ECMaster.Models @using OaseOutdoors.Components.Shared.Modules.Ecom.ModelBuilders @using OaseOutdoors.Core.Extensions @using OaseOutdoors.Services.MiniCartService.Initialization @using OaseOutdoors.Services.NavigationService.Models @using OaseOutdoors.Services.StaticResourceService.Interfaces @using OaseOutdoors.Services.ImageService.Initialization @using OaseOutdoors.Services.ImageService.Enums @using OaseOutdoors.Services.EcomUrlService.Initialization @using OaseOutdoors.Services.UrlParserService.Initialization; @inherits Dynamicweb.Rendering.ViewModelTemplate<PageViewModel> @{ var area = PageView.Current().Area; var areas = Dynamicweb.Services.Areas.GetAreas().Where(x => x.Active && x.Item["ShopPublished"] != null && (bool)x.Item["ShopPublished"] && x.Name.ToLower().Contains(area.Name.Split(':')[0].Trim().ToLower())).ToList(); var masterStaticResourceService = ServiceLocator.Current.GetStaticResourceService(); var masterViewModelService = new ECMasterViewModelBuilder(); var masterViewModel = masterViewModelService.GetViewModel(area.ID); var productViewModelService = new ProductViewModelBuilder(); var urlService = ServiceLocator.Current.GetEcomUrlService(); var urlParserService = ServiceLocator.Current.GetUrlParserService(); var imageService = ServiceLocator.Current.GetImageService(); var miniCartService = ServiceLocator.Current.GetMiniCartService(); var miniCartProductsCount = miniCartService.GetProductsCount(area); var valutaSelector = HttpContext.Current.Request.Cookies["currencySelector"]; var userId = HttpContext.Current.Request["userid"] != null ? HttpContext.Current.Request["userid"] : ""; var currentDatetime = DateTime.Now; var googleId = area.Item["GoogleManagerId"]; masterStaticResourceService.ActivityId = masterViewModel.NewsletterPopup.ActivityId; } @helper RenderChildren(NavigationViewModel entity, string gotoTranslation, IStaticResourceService masterStaticResourceService) { var currentDatetime = DateTime.Now; if (entity.Children == null || !entity.Children.Any()) { return; } <ul class="navigation__submenu-links"> @foreach (var child in entity.Children.Where(x => x.PublishedDateFrom <= currentDatetime && x.PublishedDateTo >= currentDatetime)) { if (child.Children != null && child.Children.Any()) { <li class="@child.LinkStatus.GetDescription() parent"> <div class="navigation__submenu-links-main"> <a href="@child.Link"> <span>@child.LinkTitle @(child.IsEcommerce && child.ProductCount > 0 ? "(" + child.ProductCount + ")" : string.Empty)</span> <svg aria-hidden="true"> <use xlink:href="@masterStaticResourceService.AddTimeStamp("/static/dist/svg/_bundle.svg")#easycamp-arrow-right"></use> </svg> </a> @if (child.Children != null && child.Children.Any()) { <ul class="navigation__submenu-sublinks"> @foreach (var subChild in child.Children.Where(x => x.PublishedDateFrom <= currentDatetime && x.PublishedDateTo >= currentDatetime)) { <li> <a href="@subChild.Link"> <span>@subChild.LinkTitle @(subChild.IsEcommerce && subChild.ProductCount > 0 ? "(" + subChild.ProductCount + ")" : string.Empty)</span> <svg aria-hidden="true"><use xlink:href="@masterStaticResourceService.AddTimeStamp("/static/dist/svg/_bundle.svg")#easycamp-arrow-right"></use></svg> </a> </li> } </ul> } <div></div> @if (child.IsEcommerce) { <a href="@child.Link" class="btn btn--cta2"> <span class="btn__text">@Translate("See all", "See all") @child.LinkTitle.ToLower()</span> </a> } </div> <div class="navigation__submenu"> <div class="container"> <div class="navigation__submenu-nav"> <div class="navigation__submenu-title"> <span><span class="navigation__submenu-name">@child.LinkTitle</span> @(child.IsEcommerce && child.ProductCount > 0 ? "(" + child.ProductCount + ")" : string.Empty)</span> </div> @RenderChildren(child, gotoTranslation, masterStaticResourceService) </div> </div> </div> </li> } else { <li class="@child.LinkStatus.GetDescription()"> <div class="navigation__submenu-links-main"> <a href="@child.Link"> <span>@child.LinkTitle @(child.IsEcommerce && child.ProductCount > 0 ? "(" + child.ProductCount + ")" : string.Empty)</span> <svg aria-hidden="true"> <use xlink:href="@masterStaticResourceService.AddTimeStamp("/static/dist/svg/_bundle.svg")#easycamp-arrow-right"></use> </svg> </a> </div> </li> } } </ul> } <!DOCTYPE html> <html lang="@masterViewModel.TwoLetterIsoLanguageName" class="no-js"> <head data-settings="disableparsing:true;"> @using Dynamicweb.Extensibility @using Dynamicweb.Frontend @using OaseOutdoors.Services.StaticResourceService.Initialization @inherits Dynamicweb.Rendering.ViewModelTemplate<PageViewModel> @{ var headStaticResourceService = ServiceLocator.Current.GetStaticResourceService(); var modernizerPath = "~/static/dist/js/modernizr.js"; var modernizerContent = headStaticResourceService.GetFileContent(modernizerPath); } @* todo: !!! REMOVE THIS LINE WHEN GOING LIVE !!! *@ @*<meta name="robots" content="noindex, nofollow">*@ <meta charset="utf-8"> @* Add to web.config *@ <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title> @if (!string.IsNullOrEmpty(PageView.Current().Page.MetaTitle)) { @PageView.Current().Page.MetaTitle } else { @(PageView.Current().Page.MenuText + " - Easycamp") } </title> @* Use this format for CSS instead if you want to use preloading: <link rel="preload" href="/static/dist/css/main.min.css" as="style" onload="this.rel='stylesheet'"> Remember to *inline* polyfills for preload-format in page footer: https://github.com/filamentgroup/loadCSS *@ <link rel="stylesheet" href="@headStaticResourceService.AddTimeStamp("/static/dist/css/easycamp.min.css")" type="text/css"> <meta name="description" content="@Pageview.Page.Description"> <meta name="keywords" content="@Pageview.Page.Keywords"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="format-detection" content="telephone=no"> <link rel="icon" href="@headStaticResourceService.AddTimeStamp("/static/dist/media/favicon_ec.ico")" type="image/x-icon" /> @if (!headStaticResourceService.IsProduction) { <meta name="robots" content="noindex, nofollow"> } @RenderSnippet("canonical") @if (headStaticResourceService.IsProduction) { <!-- Google Tag Manager --> <script> (function (w, d, s, l, i) { w[l] = w[l] || []; w[l].push({ 'gtm.start': new Date().getTime(), event: 'gtm.js' }); var f = d.getElementsByTagName(s)[0], j = d.createElement(s), dl = l != 'dataLayer' ? '&l=' + l : ''; j.async = true; j.src = 'https://www.googletagmanager.com/gtm.js?id=' + i + dl; f.parentNode.insertBefore(j, f); })(window, document, 'script', 'dataLayer', '@PageView.Current().Area.Item["GoogleManagerId"]');</script> <!-- End Google Tag Manager --> <!-- Facebook Pixel Code --> <script> !function (f, b, e, v, n, t, s) { if (f.fbq) return; n = f.fbq = function () { n.callMethod ? n.callMethod.apply(n, arguments) : n.queue.push(arguments) }; if (!f._fbq) f._fbq = n; n.push = n; n.loaded = !0; n.version = '2.0'; n.queue = []; t = b.createElement(e); t.async = !0; t.src = v; s = b.getElementsByTagName(e)[0]; s.parentNode.insertBefore(t, s) }(window, document, 'script', 'https://connect.facebook.net/en_US/fbevents.js'); fbq('init', '597291744021660'); fbq('track', 'PageView'); </script> <noscript> <img height="1" width="1" src="https://www.facebook.com/tr?id=597291744021660&ev=PageView &noscript=1" /> </noscript> <!-- End Facebook Pixel Code --> } @* You can use "prefetch" to preload all important assets if you're not using HTTP/2 push *@ <link rel="prefetch" href="@headStaticResourceService.AddTimeStamp("/static/dist/js/main.min.js")"> <script> @if (!string.IsNullOrWhiteSpace(modernizerContent)) { @modernizerContent } </script> <script type="text/javascript" src="//fast.fonts.net/jsapi/42748720-1a39-4588-9048-0483fd14d4a8.js"></script> @SnippetStart("canonical") @if (PageView.Current().Page.NavigationTag != "ecommerce") { <link rel="canonical" href="@masterViewModel.Canonical" /> foreach (var hrefLang in masterViewModel.HrefLangs) { <link rel="alternate" hreflang="@hrefLang.HrefLang" href="@hrefLang.Href" /> } } @SnippetEnd("canonical") </head> <body data-area-id="@Pageview.AreaID" data-area-currencyCode="@Pageview.Area.EcomCurrencyId" data-search-see-all="@Translate("SearchSeeAll", "See all")" data-search-results="@Translate("SearchResults", "search results")"> @if (masterStaticResourceService.IsProduction) { <!-- Google Tag Manager (noscript) --> <noscript> <iframe src="https://www.googletagmanager.com/ns.html?id=@googleId" height="0" width="0" style="display:none;visibility:hidden"></iframe> </noscript> <!-- End Google Tag Manager (noscript) --> } @if (HttpContext.Current.IsDebuggingEnabled) { <script id="__bs_script__"> document.write("<script async src='http://localhost:3000/browser-sync/browser-sync-client.js?v=2.18.13'><\/script>"); </script> } <input type="checkbox" name="header__expand-search" id="header__expand-search" class="hidden" /> <div class="header" data-module="header"> <div class="header__main"> <div class="container-fluid"> <div class="header__main-content"> <div class="header__expand-menu"> <button><span><span></span></span></button> <div class="header__expand-menu-title">MENU</div> </div> @if (!string.IsNullOrWhiteSpace(masterViewModel.CheckoutPageLink) && !string.IsNullOrWhiteSpace(masterViewModel.CartContext)) { if (valutaSelector == null || PageView.Current().AreaID != 1) { <a href="@masterViewModel.CheckoutPageLink" class="header__cart"> <span>@Translate("Shop", "Shop")</span> <svg role="img" aria-label="Kurv"><use xlink:href="@masterStaticResourceService.AddTimeStamp("/static/dist/svg/_bundle.svg")#easycamp-shop"></use></svg> <div class="header__cart-amount"> <div>@miniCartProductsCount</div> </div> </a> } } <div class="header__logo"> <a href="@masterViewModel.Logo.LogoLink"> <div class="header__logo-icon header__logo-icon--detailed"> <svg aria-hidden="true"><use xlink:href="@masterStaticResourceService.AddTimeStamp("/static/dist/svg/_bundle.svg")#easycamp-logo"></use></svg> </div> <div class="header__logo-icon header__logo-icon--simple"> <svg aria-hidden="true"><use xlink:href="@masterStaticResourceService.AddTimeStamp("/static/dist/svg/_bundle.svg")#easycamp-logo"></use></svg> </div> </a> </div> </div> </div> </div> <div class="header__search"> <button><span><svg role="img" aria-label="Søg"><use xlink:href="@masterStaticResourceService.AddTimeStamp("/static/dist/svg/_bundle.svg")#easycamp-search"></use></svg></span></button> </div> <div class="header__menus"> <div class="header__menus-inside"> <div class="navigation"> <div class="container"> @if (masterViewModel.Navigation.Any()) { <button class="navigation__back"> <svg aria-hidden="true"><use xlink:href="@masterStaticResourceService.AddTimeStamp("/static/dist/svg/_bundle.svg")#easycamp-arrow-right"></use></svg> <span></span> </button> <ul class="navigation__mainmenu"> @foreach (var item in masterViewModel.Navigation.Where(x => x.PublishedDateFrom <= currentDatetime && x.PublishedDateTo >= currentDatetime)) { if (item.Children.Any()) { <li class="navigation__mainmenu-item @item.LinkStatus.GetDescription() parent"> <div class="navigation__mainmenu-link"> <a href="@item.Link"> <span>@item.LinkTitle</span> <svg aria-hidden="true"><use xlink:href="@masterStaticResourceService.AddTimeStamp("/static/dist/svg/_bundle.svg")#easycamp-arrow-right"></use></svg> </a> <div></div> </div> <div class="navigation__submenu @(item.IsEcommerce && item.CallToAction != null ? string.Empty : "navigation__submenu--no-detail")"> <div class="container"> <div class="navigation__submenu-nav"> <span class="navigation__submenu-nav-title"> @item.LinkTitle </span> @if (item.IsEcommerce) { <a href="@item.Link" class="btn btn--filled" style="background:#3e3c42;"> <span class="btn__text">@Translate("See all", "See all") @item.LinkTitle</span> </a> } @RenderChildren(item, Translate("NavigationGoToTranslation", "Go to"), masterStaticResourceService) @if (item.IsEcommerce && item.CallToAction != null) { @RenderParagraphContent(item.CallToAction.Id); } </div> @* @if (item.IsEcommerce && item.CallToAction != null) { <article class="navigation__submenu-detail"> @if (!string.IsNullOrWhiteSpace(item.CallToAction.Image) && !string.IsNullOrWhiteSpace(item.CallToAction.ImageAlt)) { <figure> <img src="@item.CallToAction.Image" alt="@item.CallToAction.ImageAlt" /> </figure> } <div> <div> @if (!string.IsNullOrWhiteSpace(item.CallToAction.Heading)) { <h1>@item.CallToAction.Heading</h1> } @if (!string.IsNullOrWhiteSpace(item.CallToAction.Text)) { <p>@item.CallToAction.Text</p> } </div> <div> @if (!string.IsNullOrWhiteSpace(item.CallToAction.Link) && !string.IsNullOrWhiteSpace(item.CallToAction.LinkTitle)) { <a class="btn btn--filled" href="@item.CallToAction.Link"> <span class="btn__icon"> <svg aria-hidden="true"> <use xlink:href="@masterStaticResourceService.AddTimeStamp("/static/dist/svg/_bundle.svg")#arrow-right"></use> </svg> </span> <span class="btn__text">@item.CallToAction.LinkTitle</span> </a> } </div> </div> </article> } *@ </div> </div> </li> } else { <li class="navigation__mainmenu-item @item.LinkStatus.GetDescription()"> <div class="navigation__mainmenu-link @item.LinkStatus.GetDescription()"> <a href="@item.Link"> <span>@item.LinkTitle</span> <svg aria-hidden="true"><use xlink:href="@masterStaticResourceService.AddTimeStamp("/static/dist/svg/_bundle.svg")#easycamp-arrow-right"></use></svg> </a> </div> </li> } } </ul> } </div> @if (masterViewModel.Languages.Any()) { <div class="country-picker"> <header> <div class="container"> <span>@Translate("ChooseAnotherCountry", "Choose another country")</span> <button class="country-picker__close"> <svg aria-hidden="true"> <use xlink:href="@masterStaticResourceService.AddTimeStamp("/static/dist/svg/_bundle.svg")#close"></use> </svg> </button> </div> </header> <div class="container"> <div class="country-picker__list"> <h3><span>@Translate("ChooseCountry", "Choose country")</span></h3> @RenderSnippet("languageSelector") @SnippetStart("languageSelector") @if (PageView.Current().Page.NavigationTag != "ecommerce") { <ul> @foreach (var languageArea in areas) { var hrefLang = masterViewModel.HrefLangs.FirstOrDefault(x => x.HrefAreaId == languageArea.ID); if (hrefLang == null || hrefLang.Href.ToLower().Contains("page-not-found")) { hrefLang = new ECHrefLangViewModel(); hrefLang.HrefName = languageArea.Item["ShopLanguageName"].ToString() ?? string.Empty; hrefLang.HrefLang = languageArea.CultureInfo.Name; hrefLang.Href = "/Default.aspx?areaid=" + languageArea.ID; hrefLang.HrefAreaId = languageArea.ID; } if (hrefLang != null && hrefLang.HrefLang != "x-default") { <li class="country-picker__item @(hrefLang.HrefAreaId == Pageview.AreaID ? "country-picker__item--current" : string.Empty)"> <a href="@hrefLang.Href"> <svg aria-hidden="true"> <use xlink:href="@masterStaticResourceService.AddTimeStamp("/static/dist/svg/_bundle.svg")#easycamp-arrow-right"></use> </svg> <span>@hrefLang.HrefName</span> </a> </li> } } </ul> } @SnippetEnd("languageSelector") </div> </div> </div> } </div> @{ var noBasket = "service-menu--no-basket"; if (!string.IsNullOrWhiteSpace(masterViewModel.CheckoutPageLink) && !string.IsNullOrWhiteSpace(masterViewModel.CartContext)) { if (valutaSelector == null || Pageview.AreaID != 1) { noBasket = ""; } } } <div class="service-menu @noBasket"> <div class="container"> <ul class="service-menu__navigation"> @if (masterViewModel.Languages.Any()) { <li> <div class="service-menu__language"> <span class="service-menu__language-flag"><svg aria-hidden="true"><use xlink:href="@masterStaticResourceService.AddTimeStamp("/static/dist/svg/_bundle.svg")#flag-@masterViewModel.Languages.First(x => x.IsCurrent).ISOCode"></use></svg></span> <span class="service-menu__language-title">@Translate("Language", "Language")</span> <span class="service-menu__language-value">@masterViewModel.Languages.First(x => x.IsCurrent).Name</span> <div class="service-menu__language-list"> @RenderSnippet("languageDropdownSelector") @SnippetStart("languageDropdownSelector") @if (PageView.Current().Page.NavigationTag != "ecommerce") { <ul> @foreach (var languageArea in areas) { var hrefLang = masterViewModel.HrefLangs.FirstOrDefault(x => x.HrefAreaId == languageArea.ID); if (hrefLang == null || hrefLang.Href.ToLower().Contains("page-not-found")) { hrefLang = new ECHrefLangViewModel(); hrefLang.HrefName = languageArea.Item["ShopLanguageName"].ToString() ?? string.Empty; hrefLang.HrefLang = languageArea.CultureInfo.Name; hrefLang.Href = "/Default.aspx?areaid=" + languageArea.ID; hrefLang.HrefAreaId = languageArea.ID; } if (hrefLang != null && hrefLang.HrefLang != "x-default" && hrefLang.HrefAreaId != Pageview.AreaID) { <li class="country-picker__item @(hrefLang.HrefAreaId == Pageview.AreaID ? "country-picker__item--current" : string.Empty)"> <a href="@hrefLang.Href"> <span class="service-menu__language-flag"><svg aria-hidden="true"><use xlink:href="@masterStaticResourceService.AddTimeStamp("/static/dist/svg/_bundle.svg")#flag-@hrefLang.HrefLang.Split('-')[0]"></use></svg></span> <span class="service-menu__language-list-text">@hrefLang.HrefName</span> </a> </li> } } </ul> } @SnippetEnd("languageDropdownSelector") </div> </div> </li> } <li> <div class="header__search--desktop"> <span>@Translate("Search", "Search")</span> </div> </li> @foreach (ECPageLinkItem linkItem in masterViewModel.ServiceMenu.MenuItems) { <li> <a href="@linkItem.PageLink">@linkItem.PageLinkTitle</a> </li> } </ul> </div> </div> </div> </div> <div class="search-overlay" data-search-url="@masterViewModel.SearchResultsPageLink" data-no-results="@Translate("SearchNoResults", "Sorry no results were found")" data-products-title="@Translate("SearchProducts", "Products")" data-categories-title="@Translate("SearchCategories", "Categories")"> <div class="container-fluid"> <div class="search-overlay__container"> <div class="search-overlay__input"> <input type="search" name="search" id="search" placeholder="@Translate("Search here -", "Search here -") @Translate("tent, sleepingbags...", "tent, sleepingbags...")"/> <button class="search-overlay__close"> <svg aria-hidden="true"> <use xlink:href="@masterStaticResourceService.AddTimeStamp("/static/dist/svg/_bundle.svg")#close"></use> </svg> </button> </div> <div class="container"> <div class="search-overlay__results"></div> </div> </div> </div> </div> </div> <main> @using Dynamicweb.Frontend; @using Dynamicweb.Rendering; @using OaseOutdoors.Components.EasyCamp.Layout.ECMaster.ModelBuilders; @inherits ViewModelTemplate<PageViewModel> @Title("Content page template") @{ var masterService = new ECMasterViewModelBuilder(); var masterModel = masterService.GetViewModel(PageView.Current().Area.ID); } @Model.Placeholder("Body", "Body", "items-allowed:EcomRibbonItem,ECFeaturedProductsRibbonItem;unwrap:true") @RenderParagraphContent(masterModel.NewsletterAndConsentSubscriptionPargraphId) </main> @{ var footerBackgroundImage = masterViewModel.Footer.BottomBackground; if (!string.IsNullOrEmpty(footerBackgroundImage)) { footerBackgroundImage = " " + "data-src-xxs='" + imageService.Begin(footerBackgroundImage).SetWidth(940).SetHeight(400).SetCrop(CropType.Center).SetCompression(50).SetAlternativeImage().GetCrop() + "'" + "data-src-xs='" + imageService.Begin(footerBackgroundImage).SetWidth(1514).SetHeight(600).SetCrop(CropType.Center).SetCompression(50).SetAlternativeImage().GetCrop() + "'" + "data-src-sm='" + imageService.Begin(footerBackgroundImage).SetWidth(1962).SetHeight(850).SetCrop(CropType.Center).SetCompression(50).SetAlternativeImage().GetCrop() + "'" + "data-src-md='" + imageService.Begin(footerBackgroundImage).SetWidth(1142).SetHeight(790).SetCrop(CropType.Center).SetCompression(70).SetAlternativeImage().GetCrop() + "'" + "data-src-lg='" + imageService.Begin(footerBackgroundImage).SetWidth(1462).SetHeight(790).SetCrop(CropType.Center).SetCompression(70).SetAlternativeImage().GetCrop() + "'" + "data-src-xl='" + imageService.Begin(footerBackgroundImage).SetWidth(1762).SetHeight(790).SetCrop(CropType.Center).SetCompression(70).SetAlternativeImage().GetCrop() + "'" + "data-src-xxl='" + imageService.Begin(footerBackgroundImage).SetWidth(2483).SetHeight(790).SetCrop(CropType.Center).SetCompression(70).SetAlternativeImage().GetCrop() + "'"; } } <footer class="footer container-fluid" data-module="footer"> @if (!string.IsNullOrEmpty(footerBackgroundImage)) { <div class="footer__image"> <div @footerBackgroundImage class="footer__image-img lazy-bg"></div> </div> } <div class="container"> <div class="footer__newsletter--container"> @if (masterViewModel.Footer.CallToActionNewsletterParagraphId != null) { if (!string.IsNullOrEmpty(masterViewModel.Footer.CallToActionNewsletterParagraphId)) { @RenderParagraphContent(Int32.Parse(masterViewModel.Footer.CallToActionNewsletterParagraphId.Split('#')[1])) } } </div> <div class="footer__content"> <input type="checkbox" id="footer-toggle" checked> <div class="footer__navigation"> @if (!string.IsNullOrEmpty(masterViewModel.Footer.FindDealerLinkTitle) && !string.IsNullOrEmpty(masterViewModel.Footer.FindDealerLink)) { <a href="@masterViewModel.Footer.FindDealerLink" class="btn"> <span class="btn__text"> @masterViewModel.Footer.FindDealerLinkTitle <svg aria-hidden="true"> <use xlink:href="@masterStaticResourceService.AddTimeStamp("/static/dist/svg/_bundle.svg")#easycamp-arrow-right"></use> </svg> </span> </a> } @if (!string.IsNullOrEmpty(masterViewModel.Footer.CustomerServiceLink) && !string.IsNullOrEmpty(masterViewModel.Footer.CustomerServiceLinkTitle)) { <h3> <a href="@masterViewModel.Footer.CustomerServiceLink"> @masterViewModel.Footer.CustomerServiceLinkTitle </a> </h3> } @if (!string.IsNullOrEmpty(masterViewModel.Footer.ContactUsEmail)) { <ul class="footer__information-link-collection"> <li class="footer__information-link footer__information-link--fullwidth"> <a href="mailto:@masterViewModel.Footer.ContactUsEmail" target="_blank">@masterViewModel.Footer.ContactUsEmail</a> </li> </ul> } <div> @if (!string.IsNullOrEmpty(masterViewModel.Footer.AboutLinkTitle) && !string.IsNullOrEmpty(masterViewModel.Footer.AboutLink)) { <h3> <a href="@masterViewModel.Footer.AboutLink"> @masterViewModel.Footer.AboutLinkTitle </a> </h3> } @if (masterViewModel.Footer.AboutLinks.Any()) { <ul class="footer__information-link-collection"> @foreach (var link in masterViewModel.Footer.AboutLinks) { <li class="footer__information-link"><a href="@link.PageLink">@link.PageLinkTitle</a></li> } </ul> } </div> </div> <div class="footer__information" itemscope itemtype="http://schema.org/LocalBusiness"> <div class="footer__information-inner"> <div class="footer__information-column"> @if (!string.IsNullOrEmpty(masterViewModel.Footer.CustomerServiceLink) && !string.IsNullOrEmpty(masterViewModel.Footer.CustomerServiceLinkTitle)) { <h3> @masterViewModel.Footer.AddressTitle </h3> } <link itemprop="image" content="@masterStaticResourceService.GetAbsoluteUrl("~/static/dist/svg/easycamp-logo.svg")"> <div class="footer__information-link" itemprop="name">@masterViewModel.Footer.AddressCompany</div> <ul class="footer__information-link-collection" itemprop="address" itemscope itemtype="http://schema.org/PostalAddress"> <li class="footer__information-link" itemprop="streetAddress">@masterViewModel.Footer.AddressStreet</li> <li class="footer__information-link"> <span itemprop="postalCode">@masterViewModel.Footer.AddressPostcode</span> <span itemprop="addressLocality">@masterViewModel.Footer.AddressCity</span></li> <li class="footer__information-link" itemprop="addressCountry">@masterViewModel.Footer.AddressCountry</li> <li class="footer__information-link">&nbsp;</li> </ul> <ul class="footer__information-link-collection"> <li class="footer__information-link" itemprop="telephone"><h3>@masterViewModel.Footer.ContactUsPhone</h3></li> </ul> </div> <div class="footer__information-column footer__information-column--desktop"> @if (!string.IsNullOrEmpty(masterViewModel.Footer.AboutLinkTitle) && !string.IsNullOrEmpty(masterViewModel.Footer.AboutLink)) { <h3> <a href="@masterViewModel.Footer.AboutLink"> @masterViewModel.Footer.AboutLinkTitle </a> </h3> } @if (masterViewModel.Footer.AboutLinks.Any()) { <ul class="footer__information-link-collection"> @foreach (var link in masterViewModel.Footer.AboutLinks) { <li class="footer__information-link"><a href="@link.PageLink">@link.PageLinkTitle</a></li> } </ul> } </div> </div> </div> <div class="footer__social"> @if (!string.IsNullOrEmpty(masterViewModel.Footer.SocialMediaTitle)) { <h3>@masterViewModel.Footer.SocialMediaTitle</h3> } @if (!string.IsNullOrEmpty(masterViewModel.Footer.SocialMediaFacebookLink)) { <a href="@masterViewModel.Footer.SocialMediaFacebookLink" class="footer__social-icon" title="@masterViewModel.Footer.SocialMediaFacebookLinkTitle"> <span> <svg aria-hidden="true"> <use xlink:href="@masterStaticResourceService.AddTimeStamp("/static/dist/svg/_bundle.svg")#some-facebook-round"></use> </svg> </span> </a> } @if (!string.IsNullOrEmpty(masterViewModel.Footer.SocialMediaInstagramLink)) { <a href="@masterViewModel.Footer.SocialMediaInstagramLink" class="footer__social-icon" title="@masterViewModel.Footer.SocialMediaInstagramLinkTitle"> <span> <svg aria-hidden="true"> <use xlink:href="@masterStaticResourceService.AddTimeStamp("/static/dist/svg/_bundle.svg")#some-instagram-round"></use> </svg> </span> </a> } @if (!string.IsNullOrEmpty(masterViewModel.Footer.SocialMediaTwitterLink)) { <a href="@masterViewModel.Footer.SocialMediaTwitterLink" class="footer__social-icon" title="@masterViewModel.Footer.SocialMediaTwitterLinkTitle"> <span> <svg aria-hidden="true"> <use xlink:href="@masterStaticResourceService.AddTimeStamp("/static/dist/svg/_bundle.svg")#some-twitter-round"></use> </svg> </span> </a> } @if (!string.IsNullOrEmpty(masterViewModel.Footer.SocialMediaYoutubeLink)) { <a href="@masterViewModel.Footer.SocialMediaYoutubeLink" class="footer__social-icon" title="@masterViewModel.Footer.SocialMediaYoutubeLinkTitle"> <span> <svg aria-hidden="true"> <use xlink:href="@masterStaticResourceService.AddTimeStamp("/static/dist/svg/_bundle.svg")#some-youtube-round"></use> </svg> </span> </a> } </div> @if (masterViewModel.Footer.BottomPaymentLogos != null && masterViewModel.Footer.BottomPaymentLogos.Any()) { <div class="footer__payments"> <h3>@masterViewModel.Footer.BottomPaymentText</h3> <div class="footer__payments-container"> @foreach (var paymentName in masterViewModel.Footer.BottomPaymentLogos) { var paymentstyle = (paymentName.ToLower() == "mastercard") ? "footer__payment-icon--long" : ""; <span class="footer__payment-icon @paymentstyle"> <svg aria-hidden="true"> <use xlink:href="@masterStaticResourceService.AddTimeStamp("/static/dist/svg/_bundle.svg")#easycamp-pay-@paymentName.ToLower()"></use> </svg> </span> } </div> </div> } </div> <div class="footer__logo--container" > <svg aria-hidden="true" class="footer__logo--icon"> <use xlink:href="@masterStaticResourceService.AddTimeStamp("/static/dist/svg/_bundle.svg")#easycamp-logo"></use> </svg> </div> <div class="footer__scroll"> <svg aria-hidden="true" class="footer__scroll--icon"> <use xlink:href="@masterStaticResourceService.AddTimeStamp("/static/dist/svg/_bundle.svg")#easycamp-arrow-right"></use> </svg> </div> </div> <div class="footer__bottom"> <div class="footer__bottom-column"> <svg class="bottom-bird" aria-hidden="true" > <use xlink:href="@masterStaticResourceService.AddTimeStamp("/static/dist/svg/_bundle.svg")#easycamp-bird"></use> </svg> @if (!string.IsNullOrEmpty(masterViewModel.Footer.BottomCopyrightText)) { <span> @masterViewModel.Footer.BottomCopyrightText </span> } </div> </div> </footer> <div class="search-overlay__backdrop"></div> @SnippetStart("jarvis") @{ var raptorArea = PageView.Current().Area; var settingsRaptorApiKey = raptorArea.Item["SettingsRaptorApiKey"]; } @if (settingsRaptorApiKey != null) { if (PageView.Current().Page.NavigationTag != "ecommerce" && PageView.Current().Device == Dynamicweb.Frontend.Devices.DeviceType.Desktop && !string.IsNullOrEmpty(settingsRaptorApiKey.ToString())) { var jarvis = (HttpContext.Current.Request.Cookies["jarvis"] != null) ? HttpContext.Current.Request.Cookies["jarvis"].Value : "1"; var jarvisBoxStatus = (jarvis == "1") ? "jarvis--open" : string.Empty; var jarvisBtnStatus = (jarvis == "1") ? "" : "jarvis-btn--open"; var raptorAreaId = raptorArea.ID; var raptorBrandId = (raptorArea.Item["SettingsRaptorUserId"] != null) ? raptorArea.Item["SettingsRaptorUserId"].ToString() : string.Empty; var raptorCookieId = (HttpContext.Current.Request.Cookies[raptorBrandId + "rsa"] != null) ? HttpContext.Current.Request.Cookies[raptorBrandId + "rsa"].Value : ""; var raptorContent1 = masterViewModel.JarvisHistory; var raptorContent2 = masterViewModel.JarvisRecommendations; var settingsShopId = raptorArea.Item["SettingsShopId"].ToString(); var ecomPageId = urlParserService.GetPageId(settingsShopId); if (!string.IsNullOrEmpty(raptorCookieId)) { <div data-module="jarvis"> <div class="jarvis @jarvisBoxStatus"> <div class="jarvis__header"> <span class="your">@Translate("Your", "Your")</span> <span class="guide">@Translate("Guide", "Guide")</span> <span class="logo"></span> </div> <div class="jarvis__guide"> <button class="jarvis__close"><span class="round"><svg viewBox="0 0 100 100"><path d="M 10,50 L 60,100 L 70,90 L 30,50 L 70,10 L 60,0 Z" class="arrow"></path></svg></span> @Translate("Hide the wizard", "Hide the wizard")</button> <div class="jarvis__text"> <p> @Translate("The guide follows you around and finds new recommendations based on what you're looking at.", "The guide follows you around and finds new recommendations based on what you're looking at.") </p> </div> </div> <div class="jarvis__alternatives"> <section class="featured-products container-ribbon ribbon"> <h3>@Translate("Good alternatives", "Good alternatives")</h3> <div class="featured-products__container" data-url="/webservices/jarvis.ashx?areaId=@raptorAreaId&raptorFunction=GetCookieRecommendations"> @foreach (var raptorProduct in raptorContent2) { var raptorProductView = productViewModelService.GetViewModel(raptorProduct); if (raptorProductView.MainImage != null) { raptorProductView.RaptorImage = raptorProductView.MainImage.SetWidth(500).SetHeight(300).SetCrop(CropType.KeepAspectRatio).SetCompression(50).GetCrop(); } raptorProductView.RaptorUrl = urlService.GetUrl(raptorProductView.GroupId, raptorProductView.Id, ecomPageId.GetValueOrDefault()); <article itemscope itemtype="http://schema.org/Product\" class="product-item"> <a itemprop="url" href="@raptorProductView.RaptorUrl"> <div class="product-item__header"> <figure> <img src="@raptorProductView.RaptorImage" itemprop="image" content="OaseOutdoors.Services.ImageService.ImageService" alt="@raptorProductView.Name"> </figure> </div> <div class="product-item__body"> <div class="product-item__headline"> <h3 itemprop="name" class="h-1">@raptorProductView.Name</h3> </div> <div itemprop="offers" itemscope itemtype="http://schema.org/Offer" class="product-item__price"> <div class="price"><span itemprop=\"priceCurrency\" content="@raptorProductView.Currency">@raptorProductView.CurrencySymbol</span> <span itemprop="price" content="@raptorProductView.UnformatedPrice">@raptorProductView.Price</span></div> </div> </div> </a> </article> } </div> </section> </div> <div class="jarvis__suggest"> <section class="featured-products container-ribbon ribbon"> <h3>@Translate("You have previously looked at", "You have previously looked at")</h3> <div class="featured-products__container" data-url="/webservices/jarvis.ashx?areaId=@raptorAreaId&raptorFunction=GetCookieHistory"> @foreach (var raptorProduct in raptorContent1) { var raptorProductView = productViewModelService.GetViewModel(raptorProduct); if (raptorProductView.MainImage != null) { raptorProductView.RaptorImage = raptorProductView.MainImage.SetWidth(500).SetHeight(300).SetCrop(CropType.KeepAspectRatio).SetCompression(50).GetCrop(); } raptorProductView.RaptorUrl = urlService.GetUrl(raptorProductView.GroupId, raptorProductView.Id, ecomPageId.GetValueOrDefault()); <article itemscope itemtype="http://schema.org/Product\" class="product-item"> <a itemprop="url" href="@raptorProductView.RaptorUrl"> <div class="product-item__header"> <figure> <img src="@raptorProductView.RaptorImage" itemprop="image" content="OaseOutdoors.Services.ImageService.ImageService" alt="@raptorProductView.Name"> </figure> </div> <div class="product-item__body"> <div class="product-item__headline"> <h3 itemprop="name" class="h-1">@raptorProductView.Name</h3> </div> <div itemprop="offers" itemscope itemtype="http://schema.org/Offer" class="product-item__price"> <div class="price"><span itemprop=\"priceCurrency\" content="@raptorProductView.Currency">@raptorProductView.CurrencySymbol</span> <span itemprop="price" content="@raptorProductView.UnformatedPrice">@raptorProductView.Price</span></div> </div> </div> </a> </article> } </div> </section> </div> </div> <div class="jarvis-btn @jarvisBtnStatus"> <img src="/static/dist/img/jarvis/jarvis-small.png"> </div> </div> } } } @SnippetEnd("jarvis") @RenderSnippet("jarvis") <script> var scriptLoaderSettings = { mainScriptSrc: [ '/static/dist/js/main.min.js' ], polyfills: 'default-3.6,fetch' }; var loadMainScript = function () { function a(a) { var b = document.createElement("script"); b.async = !0, b.src = a, document.body.appendChild(b) } if ("object" == typeof scriptLoaderSettings.mainScriptSrc) for (var b = 0; b < scriptLoaderSettings.mainScriptSrc.length; b++)a(scriptLoaderSettings.mainScriptSrc[b]); else a(scriptLoaderSettings.mainScriptSrc) }; !function (a, b) { var c, d = [/^(.+)(\[.+MessengerForiOS.+\][ ]*)/, /^(.+)(\[.+FBIOS.+\][ ]*)/, /^(.+)( Twitter for iPhone)/]; for (c = 0; c < d.length; ++c) { var e = d[c], f = a.match(e); if (f) { b = b + "&ua=" + encodeURIComponent(f[1] + " Safari"); break } } var g = document.createElement("script"); g.src = b, document.body.appendChild(g) }(navigator.userAgent, "https://cdn.polyfill.io/v2/polyfill.min.js?features=" + scriptLoaderSettings.polyfills + "&callback=loadMainScript"); </script> </body> </html>