Exception in template (Designs/NORRIQ/_parsed/StandardPage.parsed.cshtml): System.NullReferenceException: Object reference not set to an instance of an object.
   at CompiledRazorTemplates.Dynamic.ceedacfecaa.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 NORRIQ.Common8.Factory @using System.Web @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; 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 = ""; 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; } var urlstart = HttpContext.Current.Request.Url.Scheme + "://" + HttpContext.Current.Request.Url.Host; var getimg = Pageview.Page.Item["Image"].ToString(); var getsomeimg = Pageview.Page.Item["SocialImage"].ToString(); } @{ var someimg = !string.IsNullOrEmpty(getsomeimg) ? getsomeimg : getimg; } <!DOCTYPE html> <html lang="@Pageview.Area.Culture"> <head> <title>@Model.Title</title> @if (Model.Area.Item.GetBoolean("NoIndex")) { <meta name="robots" content="noindex, nofollow" /> <!-- TODO: remove on launch--> } <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" /> <link rel="shortcut icon" href="/Files/Images/Website/favicon.ico" /> <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" /> <link href="@NORRIQ.Common8.Razor.TimestampSource.GetSourceWithTimestamp("/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)" /> } @if (!string.IsNullOrEmpty(someimg)) { <meta property="og:image" content="@urlstart@someimg" /> } <meta property="og:type" content="website"> <meta property="og:title" content="@Model.Title"> <meta property="og:description" content="@Model.Description"> @RenderSleekNote() @RenderTagManagerHead() @RenderGoogleAnalytics() <link rel="apple-touch-icon" href="/Files/Images/Website/apple-touch-120.png" /> <link rel="apple-touch-icon" sizes="180x180" href="/Files/Images/Website/apple-touch-180.png" /> </head> <body id="top" class="@areaColor"> @RenderTagManagerBody() <header class="header"> <div class="header-main"> <div class="header-logo"> <a href="/" class="hovershift" 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> <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> <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">perm_identity</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">@siteText</a> </li> } } </ul> </div> <button class="btn-burger header-icon" data-toggle="slideout" data-target="#headerNavigation"> <span></span> <span></span> <span></span> </button> </div> </div> @RenderNavigation(new { Template = "Secondary.xslt", Expandmode = "all", StartLevel = 3, EndLevel = 5 }) </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 ? " style=\"background-image:url(" + "/Admin/Public/GetImage.ashx?Image=" + Model.Item.GetFile("Image").Path + "&amp;width=1600&amp;Compression=80" + ")\"" : ""; 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" : ""; } @if (isUsingSplash && (System.Web.HttpContext.Current.Session["HasShownSplash"] as string) != "true") { <div class="splash"> <img src="@Model.Item.GetFile("SplashLogo").Path" class="img-fluid" alt="Image" /> <div class="splash-bg"></div> </div> System.Web.HttpContext.Current.Session.Add("HasShownSplash", "true"); } <div class="banner-hero @heroHeight @topSkewStyle" @topBgImage> <div class="banner-hero-content @bgfilter"> <div class="banner-hero-container"> @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"> @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"; if (!string.IsNullOrEmpty(Model.Item.GetItem("Button").GetString("ButtonLink"))) { <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> } } </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 fade-in-up .d-none .d-md-block"> @if (Model.Item.GetFile("CaseLogo") != null) { <div class="hero-logo-wrap"> <img src="@Model.Item.GetFile("CaseLogo").Path" 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"))) { <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> } <div class="banner-hero-footer"> <a href="#next" class="banner-hero-scroll"> <i class="material-icons">expand_more</i> </a> </div> <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> @*@if (Model.Item.GetBoolean("IsACase") && !string.IsNullOrEmpty(Model.Item.GetString("Client"))) { <div class="case-intro container"> <div class="row"> <table class="table"> <thead> <tr> <th>@Translate("Case:") <span>@Model.Item.GetString("Headline")</span></th> <th>@Translate("Client:") <span>@Model.Item.GetString("Client")</span></th> <th> @Translate("Area:") <span>@Model.Item.GetString("CaseType")</span> </th> </tr> </thead> </table> </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">@Model.Item.GetString("Headline")</h1> } } } @RenderParagraphContent(FooterParagraph) <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 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"); <!-- Google Tag Manager (noscript) --> <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 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") } }