Exception in template (Designs/NORRIQ/_parsed/StandardPage.parsed.cshtml): System.NullReferenceException: Object reference not set to an instance of an object.
   at CompiledRazorTemplates.Dynamic.fdbfcacbbaaed.Execute()
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context)
   at RazorEngine.Templating.TemplateService.Run(ITemplate template, DynamicViewBag viewBag)
   at RazorEngine.Templating.TemplateService.Parse(String razorTemplate, Object model, DynamicViewBag viewBag, String cacheName)
   at RazorEngine.Razor.Parse[T](String razorTemplate, T model, DynamicViewBag viewBag, String cacheName)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()
@using Dynamicweb.Frontend; @using Dynamicweb.Content; @using NORRIQ.Common8.Factory @using System.Web @using System.Web.Hosting @using Dynamicweb.Admin @using Dynamicweb.Ecommerce.International @using Dynamicweb.EmailMarketing @using NORRIQ.Common8.Context @using Page = Dynamicweb.Content.Page @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> @{ var areaColor = !string.IsNullOrEmpty(Model.Item.GetValue<ListViewModel>("SubNavigationColor").SelectedValue) ? Model.Item.GetValue<ListViewModel>("SubNavigationColor").SelectedValue : "theme-0"; var FooterParagraph = 0; var showScrollDown = false; try { showScrollDown = Model.Item.GetBoolean("ShowScrollDown"); } catch (Exception ex) { showScrollDown = false; } if (!string.IsNullOrEmpty(Pageview.Area.Item["Footer"] as string)) { Int32.TryParse(Pageview.Area.Item["Footer"].ToString().Split('#').Last(), out FooterParagraph); } var navigationTag = Pageview.Page.NavigationTag.ToString(); string canonical = null; if (System.Web.HttpContext.Current.Response.StatusCode == 200) { canonical = HttpContext.Current.Request.Url.Scheme + "://" + HttpContext.Current.Request.Url.Host + "/"; } var logoLightPath = ""; var logoDarkPath = ""; var defaultimage = ""; if (Model.Area.Item.GetFile("LogoLight") != null) { logoLightPath = Model.Area.Item.GetFile("LogoLight").Path; } if (Model.Area.Item.GetFile("LogoDark") != null) { logoDarkPath = Model.Area.Item.GetFile("LogoDark").Path; } if (Model.Area.Item.GetFile("DefaultImage") != null) { defaultimage = Model.Area.Item.GetFile("DefaultImage").Path; } var urlstart = HttpContext.Current.Request.Url.Scheme + "://" + HttpContext.Current.Request.Url.Host; var getimg = Pageview.Page.Item["Image"].ToString(); var someimg = (Pageview.Page.Item["SocialImage"] == null) ? getimg : Pageview.Page.Item["SocialImage"].ToString(); var subspace = Model.Item.GetBoolean("AddSubmenuSpace") ? "subspace" : ""; var brandTitle = !string.IsNullOrEmpty(Model.Area.Item.GetString("BrandTitle")) ? " - " + Model.Area.Item.GetString("BrandTitle") : ""; var languageVariants = Model.PropertyItem.GetItems("LanguageVariants"); var pageService = ObjectFactory.GetInstance<PageService>(); var areaService = ObjectFactory.GetInstance<AreaService>(); var domain = Pageview.Area.DomainLock; // Primary domain must be selected for the website var href = Pageview.Item.Sort > 1 ? SearchEngineFriendlyURLs.GetFriendlyUrl("Default.aspx?ID=" + Pageview.ID) : ""; // Assuming Home is always the first page var scheme = Pageview.Area.SslMode == 1 ? "https://" : "http://"; // 1 equals "Force SSL" var culture = Pageview.Area.Culture.ToLower() != "en-us" ? Pageview.Area.CultureInfo.TwoLetterISOLanguageName.ToLower() : "x-default"; bool removeNavigation = Model.PropertyItem.GetBoolean("RemoveNavigation"); bool hideCare = Model.Area.Item.GetBoolean("HideCare"); } <!DOCTYPE html> <html lang="@Pageview.Area.Culture"> <head> <title>@Model.Title@brandTitle</title> @if (Model.Area.Item.GetBoolean("NoIndex")) { <meta name="robots" content="noindex, nofollow" /> } <meta charset='utf-8' /> <meta name="description" content="@Model.Description" /> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=3, user-scalable=yes, shrink-to-fit=no" /> <meta http-equiv="x-ua-compatible" content="ie=edge" /> <meta http-equiv="content-language" content="@Pageview.Area.Culture.ToLower()" /> @if (languageVariants != null && languageVariants.Any()) { <link rel="alternate" href="@string.Format("{0}{1}{2}", scheme, domain, href)" hreflang="@culture" /> foreach (var languageVariant in languageVariants) { if (languageVariant.GetItem("LanguageVariantLink") != null) { var lvPage = pageService.GetPage(languageVariant.GetItem("LanguageVariantLink").PageID); var lvArea = areaService.GetArea(lvPage.Area.ID); var lvDomain = lvArea.DomainLock; // Primary domain must be selected for the website var lvHref = lvPage.Sort > 1 ? SearchEngineFriendlyURLs.GetFriendlyUrl("Default.aspx?ID=" + lvPage.ID) : ""; // Assuming Home is always the first page var lvScheme = lvArea.SslMode == 1 ? "https://" : "http://"; // 1 equals "Force SSL" var lvCulture = lvArea.Culture.ToLower() != "en-us" ? lvArea.CultureInfo.TwoLetterISOLanguageName.ToLower() : "x-default"; <link rel="alternate" href="@string.Format("{0}{1}{2}", lvScheme, lvDomain, lvHref)" hreflang="@lvCulture" /> } } } <link rel="shortcut icon" href="/Files/Images/Website/Favicons/favicon.ico" /> <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link href="https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,300;0,400;0,700;1,300;1,400;1,700&display=swap" rel="stylesheet"> <link href="https://fonts.googleapis.com/icon?family=Material+Icons&display=swap" rel="stylesheet" /> <link rel="preload" href="@NORRIQ.Common8.Razor.TimestampSource.GetSourceWithTimestamp("/Files/dist/css/master-min.css")" as="style" /> <link rel="stylesheet" href="@NORRIQ.Common8.Razor.TimestampSource.GetSourceWithTimestamp("/Files/dist/css/master-min.css")" /> @*<link href="/Files/dist/css/master-min.css" rel="stylesheet" />*@ @if (!string.IsNullOrEmpty(canonical) && Pageview.Page.NavigationTag.Contains("home")) { <link rel="canonical" href="@System.Web.HttpUtility.HtmlAttributeEncode(canonical)" /> } else if (!string.IsNullOrEmpty(canonical)) { <link rel="canonical" href="@System.Web.HttpUtility.HtmlAttributeEncode(HttpContext.Current.Request.Url.Scheme + "://" + HttpContext.Current.Request.Url.Host + SearchEngineFriendlyURLs.GetFriendlyUrl("Default.aspx?ID=" + Pageview.ID))" /> } @if (!string.IsNullOrEmpty(someimg)) { @*<meta property="og:image" content="@urlstart@someimg" />*@ <meta property="og:image" content="/Admin/Public/GetImage.ashx?Image=@someimg&amp;Width=1200&amp;Crop=5&amp;Compression=85" /> } <meta property="og:type" content="website"> <meta property="og:title" content="@Model.Title"> <meta property="og:description" content="@Model.Description"> @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FacebookDomain"))) { <meta name="facebook-domain-verification" content="@Model.Area.Item.GetString("FacebookDomain")" /> } <link rel="apple-touch-icon" sizes="180x180" href="/Files/Images/Website/Favicons/apple-touch-icon.png" /> <link rel="icon" type="image/png" sizes="32x32" href="/Files/Images/Website/Favicons/favicon-32x32.png" /> <link rel="icon" type="image/png" sizes="16x16" href="/Files/Images/Website/Favicons/favicon-16x16.png" /> <meta name="msapplication-TileColor" content="#00bcdd" /> <meta name="theme-color" content="#ffffff" /> @RenderCookieinformation() @RenderSleekNote() @RenderTagManagerHead() @RenderGoogleAnalytics() </head> <body id="top" class="@areaColor @subspace"> @RenderTagManagerBody() @if (!removeNavigation) { <header class="header"> <div class="header-main"> <div class="header-logo"> <a href="/" title="@Translate("Norriq")"> @*<img class="img-fluid logo-white" alt="@Translate("Norriq logo")" src="@logoLightPath" />*@ <img class="img-fluid logo-dark" alt="@Translate("Norriq logo")" src="@logoDarkPath" /> </a> </div> @if (!PageView.Current().Page.NavigationTag.Contains("cleanHead")) { <nav class="header-nav" id="headerNavigation"> <div class="nav-overflow"> @RenderNavigation(new { Template = "Primary.xslt", Expandmode = "all", StartLevel = 1, EndLevel = 3 }) </div> </nav> <div class="header-icons"> <form role="search" action="/default.aspx" method="get" class="dropleft header-search header-icon"> <button type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="btn-search-toggle"> <i class="material-icons">search</i> </button> <button type="submit" class="btn-search"> <i class="material-icons">search</i> </button> <div class="dropdown-menu"> <input name="ID" type="hidden" value="@NORRIQ.Common8.Razor.Navigation.GetPageIdByNavigationTag("searchresult")"> <div class="form-group"> <input type="search" name="q" placeholder="@Translate("Søg")" autocomplete="off"> </div> </div> </form> <div class="dropdown header-language header-icon"> <button type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <i class="material-icons">language</i> </button> <ul class="dropdown-menu dropdown-menu-right"> @if (Model.Area.Item.GetItems("Websites").Any()) { foreach (var i in Model.Area.Item.GetItems("Websites")) { var siteText = i.GetString("Text"); var siteLink = i.GetString("Link"); <li> <a href="@siteLink" title="@siteText">@siteText</a> </li> } } </ul> </div> @if (!hideCare) { <div class="dropdown header-language header-login header-icon"> <button type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <i class="material-icons">support_agent</i> </button> <ul class="dropdown-menu dropdown-menu-right"> @if (Model.Area.Item.GetItems("Login").Any()) { foreach (var i in Model.Area.Item.GetItems("Login")) { var siteText = i.GetString("Text"); var siteLink = i.GetString("Link"); <li> <a href="@siteLink" title="@siteText" style="white-space:nowrap;">@siteText</a> </li> } } </ul> </div> } <button class="btn-burger header-icon" data-toggle="slideout" data-target="#headerNavigation" title="Menu"> <span></span> <span></span> <span></span> </button> </div> } </div> @RenderNavigation(new { Template = "Secondary.xslt", Expandmode = "all", StartLevel = 3, EndLevel = 5 }) </header> } else { <header class="header-minimal"> <div class="header-main"> <div class="header-logo"> <a href="/" title="@Translate("Norriq")"> @*<img class="img-fluid logo-white" alt="@Translate("Norriq logo")" src="@logoLightPath" />*@ <img class="img-fluid logo-dark" width="160" height="60" alt="@Translate("Norriq logo")" src="@logoDarkPath" /> </a> </div> <a href="javascript:history.back()" class="btn btn-sm btn-outline-dark"> @Translate("Tilbage") </a> </div> </header> } @using Dynamicweb.Frontend; @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> @Title("Stadard Page") @Description("Standard page template") @{ var topBgImage = Model.Item.GetFile("Image") != null && !Model.Item.GetBoolean("DisableBackgroundImage") ? " style=\"background-image:url(" + "/Admin/Public/GetImage.ashx?Image=" + Model.Item.GetFile("Image").Path + "&amp;width=1600&amp;Compression=85" + ")\"" : ""; var topSkewStyle = !string.IsNullOrEmpty(Model.Item.GetValue<ListViewModel>("SkewStyle").SelectedValue) ? Model.Item.GetValue<ListViewModel>("SkewStyle").SelectedValue : "skew-bottom-white"; var heroHeight = !string.IsNullOrEmpty(Model.Item.GetValue<ListViewModel>("Height").SelectedValue) ? Model.Item.GetValue<ListViewModel>("Height").SelectedValue : "full"; bool isUsingSplash = Model.Item.GetBoolean("SplashIntro") && Model.Item.GetFile("SplashLogo") != null; //var heroDark = Model.Item.GetBoolean("DarkenImage") ? "darken-image" : ""; var bgfilter = Model.Item.GetBoolean("BlueBgFilter") ? "bgfilter" : ""; var noOverlay = Model.Item.GetBoolean("DisableOverlay") ? "no-overlay" : ""; var darkText = Model.Item.GetBoolean("DarkText") ? "text-dark" : ""; bool noBgImage = Model.Item.GetBoolean("DisableBackgroundImage"); heroHeight = !noBgImage ? heroHeight : "auto"; } <div class="banner-hero @heroHeight @topSkewStyle @darkText" @topBgImage> @if (!noBgImage) { <div class="banner-hero-content @bgfilter @noOverlay @darkText"> <div class="banner-hero-container"> @if (Model.Item.GetFile("Watermark") != null) { <img src="@Model.Item.GetFile("Watermark").Path" class="watermark" alt="Image" /> } @RenderHeadline(isUsingSplash) @if (!string.IsNullOrEmpty(Model.Item.GetString("Text")) || !string.IsNullOrEmpty(Model.Item.GetString("SubHeadline")) || !string.IsNullOrEmpty(Model.Item.GetItem("Button").GetString("ButtonText")) && !string.IsNullOrEmpty(Model.Item.GetItem("Button").GetString("ButtonLink"))) { string bannerTextareaClass = isUsingSplash ? "animate-after-splash" : "fade-in"; string bannerTextareaData = isUsingSplash ? "fade-in" : null; <div class="row"> <div class="col-12 col-lg-9 col-xl-7"> <div class="banner-hero-textarea @bannerTextareaClass" data-animation-swap-class="@bannerTextareaData" data-aos="fade"> @RenderHeroContent() </div> </div> @if (!string.IsNullOrEmpty(Model.Item.GetString("InfoBox")) || Model.Item.GetFile("CaseLogo") != null) { <div class="col-12 col-lg-3 col-xl-4 offset-xl-1 .d-none .d-md-block"> @if (Model.Item.GetFile("CaseLogo") != null) { <div class="hero-logo-wrap"> <img src="/Admin/Public/GetImage.ashx?Image=@Model.Item.GetFile("CaseLogo").Path&amp;Width=375&amp;Crop=5&amp;Compression=85" class="img-fluid" /> </div> } @if (!string.IsNullOrEmpty(Model.Item.GetString("InfoBox"))) { <div class="banner-hero-info"> @Model.Item.GetString("InfoBox") </div> } </div> } </div> } </div> </div> if (!string.IsNullOrEmpty(Model.Item.GetString("Video")) && Pageview.Device.ToString() != "Mobile") { <div class="banner-hero-video"> <video muted="" autoplay="" loop="" id="vid"> <source src="@Model.Item.GetString("Video")" type="video/mp4"> Your browser does not support the video tag. </video> </div> } } else { <figure class="banner-hero-gradient@(!string.IsNullOrEmpty(Model.Item.GetString("Video")) ? " has-video" : "")"> @if (!string.IsNullOrEmpty(Model.Item.GetString("Video")) && Pageview.Device.ToString() != "Mobile") { <video class="banner-hero-image" muted="" autoplay="" loop="" id="vid" poster="/Admin/Public/GetImage.ashx?Width=1280&amp;Height=720&amp;Image=/Files/Images/videoposter.png"> <source src="@Model.Item.GetString("Video")" type="video/mp4"> Your browser does not support the video tag. </video> } else { if (Model.Item.GetFile("Image") != null & Model.Item.GetFile("ImageMobile") == null) { <div class="banner-hero-image"> <img src="/Admin/Public/GetImage.ashx?Image=@(Model.Item.GetFile("Image").Path)&amp;width=1600&amp;Compression=85" loading="lazy" class="img-fluid" alt="@Model.Item.GetString("Headline")" /> </div> } else if (Model.Item.GetFile("Image") != null & Model.Item.GetFile("ImageMobile") != null) { <picture class="banner-hero-image"> <source media="(max-width:767.98px) and (orientation:portrait)" srcset="/Admin/Public/GetImage.ashx?Image=@(Model.Item.GetFile("ImageMobile").Path)&amp;width=800&amp;Compression=85" /> <source srcset="/Admin/Public/GetImage.ashx?Image=@(Model.Item.GetFile("Image").Path)&amp;width=1600&amp;Compression=85" /> <img src="/Admin/Public/GetImage.ashx?Image=@(Model.Item.GetFile("Image").Path)&amp;width=1600&amp;Compression=85" loading="lazy" class="img-fluid" alt="@Model.Item.GetString("Headline")" /> </picture> } } <figcaption> @RenderHeadline(isUsingSplash) <div class="banner-hero-textarea"> <div class="banner-hero-captions"> @RenderHeroContent() </div> @if (Model.Item.GetFile("CaseLogo") != null) { <div class="hero-logo-wrap"> <img src="/Admin/Public/GetImage.ashx?Image=@Model.Item.GetFile("CaseLogo").Path&amp;Width=375&amp;Crop=5&amp;Compression=85" class="img-fluid" /> </div> } @if (!string.IsNullOrEmpty(Model.Item.GetString("InfoBox"))) { <div class="banner-hero-info"> @Model.Item.GetString("InfoBox") </div> } </div> </figcaption> </figure> } <div class="polygon-bottom"> <svg preserveAspectRatio="none" viewBox="0 0 100 100"> <polygon points="100,100 100,0 0,100" opacity="1"></polygon> </svg> </div> </div> <main> @Model.Placeholder("content", "Content Default", "unwrap:true;default:true") </main> @helper RenderHeadline(bool isUsingSplash) { if (!string.IsNullOrEmpty(Model.Item.GetString("Headline"))) { bool animate = !string.IsNullOrEmpty(Model.Item.GetValue<ListViewModel>("HeadlineAnimation").SelectedValue); string animationValue = Model.Item.GetValue<ListViewModel>("HeadlineAnimation").SelectedValue; var xlheadfontsize = Model.Item.GetBoolean("XLHeadlineFontSize") ? "xlheadfontsize" : ""; if (isUsingSplash) { string headlineClass = animate ? "banner-hero-heading break-words animate-after-splash" : "banner-hero-heading break-words"; <h1 class="@headlineClass @xlheadfontsize" data-animation-swap-class="@animationValue">@Model.Item.GetString("Headline")</h1> } else { string headlineClass = animate ? "banner-hero-heading " + animationValue : "banner-hero-heading"; <h1 class="@headlineClass @xlheadfontsize" data-aos="fade-up">@Model.Item.GetString("Headline")</h1> } } } @helper RenderHeroContent() { if (!string.IsNullOrEmpty(Model.Item.GetString("SubHeadline"))) { <p class="banner-hero-sub"> @Model.Item.GetString("SubHeadline") </p> } if (!string.IsNullOrEmpty(Model.Item.GetString("Text"))) { <div class="banner-hero-text"> @Model.Item.GetString("Text") </div> } if (!string.IsNullOrEmpty(Model.Item.GetItem("Button").GetString("ButtonText")) && !string.IsNullOrEmpty(Model.Item.GetItem("Button").GetString("ButtonLink")) || !string.IsNullOrEmpty(Model.Item.GetItem("Button").GetString("ButtonVideoId"))) { var buttonStyle = !string.IsNullOrEmpty(Model.Item.GetItem("Button").GetList("ButtonStyle").SelectedValue) ? " " + Model.Item.GetItem("Button").GetList("ButtonStyle").SelectedValue : " btn-action"; //var buttonSize = !string.IsNullOrEmpty(Model.Item.GetItem("Button").GetList("ButtonSize").SelectedValue) ? " " + Model.Item.GetItem("Button").GetList("ButtonSize").SelectedValue : ""; //var buttonOutline = Model.Item.GetItem("Button").GetBoolean("ButtonOutline") ? "-outline" : ""; //var buttonColor = !string.IsNullOrEmpty(Model.Item.GetItem("Button").GetList("ButtonColor").SelectedValue) ? " btn" + buttonOutline + "-" + Model.Item.GetItem("Button").GetList("ButtonColor").SelectedValue : ""; //buttonStyle = buttonStyle != " btn-action" && Model.Item.GetBoolean("DisableBackgroundImage") && Model.Item.GetValue<ListViewModel>("SkewStyle").SelectedValue != "skew-bottom-white" ? " btn-outline-dark" : " btn-outline-light"; //if (!string.IsNullOrEmpty(Model.Item.GetItem("Button").GetList("ButtonColor").SelectedValue)) //{ // buttonStyle = ""; //} if (!string.IsNullOrEmpty(Model.Item.GetItem("Button").GetString("ButtonLink"))) { if (Model.Item.GetItem("Button").GetString("ButtonText").ToLower().Contains("download")) { <a href="@Model.Item.GetItem("Button").GetString("ButtonLink")" target="_blank" class="btn @buttonStyle"> @Model.Item.GetItem("Button").GetString("ButtonText") </a> } else { <a href="@Model.Item.GetItem("Button").GetString("ButtonLink")" class="btn @buttonStyle"> @Model.Item.GetItem("Button").GetString("ButtonText") </a> } } else if (!string.IsNullOrEmpty(Model.Item.GetItem("Button").GetString("ButtonVideoId"))) { <a data-fancybox href="@Model.Item.GetItem("Button").GetString("ButtonVideoId")" class="btn @buttonStyle"> @Model.Item.GetItem("Button").GetString("ButtonText") </a> } }} @RenderParagraphContent(FooterParagraph) @if (showScrollDown) { <a href="" scrollto="" class="scroll-to-bottom" style=""> <i class="material-icons">expand_more</i> </a> } <a href="#top" class="scroll-to-top" style="display:none;"> <i class="material-icons">expand_less</i> </a> <div class="overlay"></div> <script src="@NORRIQ.Common8.Razor.TimestampSource.GetSourceWithTimestamp("/Files/dist/scripts/polyfills-min.js")"></script> <script src="@NORRIQ.Common8.Razor.TimestampSource.GetSourceWithTimestamp("/Files/dist/scripts/bundle.min.js")"></script> <script append="replace"></script> @RenderChat() @RenderCdAnalytics() @RenderAditionalScripts() </body> </html> @helper RenderChat() { if (Model.Area.Item.GetBoolean("EnableChat")) { <!-- begin SnapEngage code - SCRIPT MOVED TO GTM for gdpr-opt. --> @*<script type="text/javascript"> (function () { var se = document.createElement('script'); se.type = 'text/javascript'; se.async = true; se.src = '//storage.googleapis.com/code.snapengage.com/js/a8c966a1-a665-431e-a9d9-d598cbf09a62.js'; var done = false; se.onload = se.onreadystatechange = function () { if (!done && (!this.readyState || this.readyState === 'loaded' || this.readyState === 'complete')) { done = true; /* Place your SnapEngage JS API code below */ /* SnapEngage.allowChatSound(true); Example JS API: Enable sounds for Visitors. */ } }; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(se, s); })(); </script>*@ <span style="display:none;">@Pageview.Area.Culture</span> <!-- end SnapEngage code --> <div class="d-none d-lg-block" style="position: fixed; z-index: 10000; bottom: 0; left: 10px;"> <a href="#" onclick="return SnapEngage.startLink();"><img src="https://www.snapengage.com/statusImage?w=a8c966a1-a665-431e-a9d9-d598cbf09a62" alt="@Translate("Kontakt os")" border="0"></a> </div> } } @helper RenderTagManagerHead() { if (Model.Area.Item.GetBoolean("EnableGoogleTagManager") && !string.IsNullOrEmpty(Model.Area.Item.GetString("GoogleTagManagerId"))) { <!-- 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', '@Model.Area.Item.GetString("GoogleTagManagerId")'); </script> <!-- End Google Tag Manager --> } } @helper RenderTagManagerBody() { if (Model.Area.Item.GetBoolean("EnableGoogleTagManager") && !string.IsNullOrEmpty(Model.Area.Item.GetString("GoogleTagManagerId"))) { <!-- Google Tag Manager (noscript) --> var gtmId = Model.Area.Item.GetString("GoogleTagManagerId"); <noscript> <iframe src="https://www.googletagmanager.com/ns.html?id=@gtmId" height="0" width="0" style="display:none;visibility:hidden"></iframe> </noscript> <!-- End Google Tag Manager (noscript) --> } } @helper RenderGoogleAnalytics() { if (Model.Area.Item.GetBoolean("EnableGoogleAnalytics") && !string.IsNullOrEmpty(Model.Area.Item.GetString("GoogleAnalyticsId"))) { var gaId = Model.Area.Item.GetString("GoogleAnalyticsId"); <script async src="https://www.googletagmanager.com/gtag/js?id=@gaId"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', '@gaId'); </script> } } @helper RenderCdAnalytics() { if (Model.Area.Item.GetBoolean("EnableClickDimension") && !string.IsNullOrEmpty(Model.Area.Item.GetString("ClickDimensionScript"))) { @Model.Area.Item.GetString("ClickDimensionScript") } } @helper RenderCookieinformation() { if (!string.IsNullOrEmpty(Model.Area.Item.GetString("CookieinformationScript"))) { @Model.Area.Item.GetString("CookieinformationScript") } } @helper RenderSleekNote() { if (Model.Area.Item.GetBoolean("EnableSleeknote") && !string.IsNullOrEmpty(Model.Area.Item.GetString("SleeknoteScript"))) { @Model.Area.Item.GetString("SleeknoteScript") } } @helper RenderAditionalScripts() { if (!string.IsNullOrEmpty(Model.Area.Item.GetString("AdditionalScripts"))) { @Model.Area.Item.GetString("AdditionalScripts") } } @SnippetStart("DefaultImage") @defaultimage @SnippetEnd("DefaultImage")