Exception in template (Designs/bleau-solutionset/_parsed/left-nav-subpage.parsed.cshtml): System.NullReferenceException: Object reference not set to an instance of an object.
   at CompiledRazorTemplates.Dynamic.fdeebfbdbadecd.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.Rendering @using Dynamicweb.Content; @{ // Code to get info for linkcrawler PageService ps = new PageService(); var cmspageID = GetInteger("DwPageID"); var cmspageCreated = GetDate("DwPageCreatedDate").ToString("yyyy-MM-dd HH:mm:ss"); var cmspageUpdated = GetDate("DwPageUpdatedDate").ToString("yyyy-MM-dd HH:mm:ss"); var cmseditorID = GetString("Item.Page.Editor.Value"); var cmseditorIDstring =""; if(cmseditorID!=""){ var ActualUser = Dynamicweb.Security.UserManagement.User.GetUserByID(Convert.ToInt16(cmseditorID)); cmseditorIDstring = ActualUser.Email; cmseditorIDstring = Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(cmseditorIDstring)); } var cmsresponsibleID = GetString("Item.Page.PageResponsible.Value"); var cmsresponsibleIDstring =""; if(cmsresponsibleID!=""){ var ActualUser = Dynamicweb.Security.UserManagement.User.GetUserByID(Convert.ToInt16(cmsresponsibleID)); cmsresponsibleIDstring = ActualUser.Email; cmsresponsibleIDstring = Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(cmsresponsibleIDstring)); } var thisPage = ps.GetPage(cmspageID); var cmsactiveTo = ""; if(thisPage!=null){ cmsactiveTo = thisPage.ActiveTo.ToString("yyyy-MM-dd HH:mm:ss"); } } <!DOCTYPE html> <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--> <!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]--> <!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]--> <!--[if gt IE 8]><!--> <html class="no-js" xmlns="http://www.w3.org/1999/xhtml" lang="da-DK" xml:lang="da-DK"> <!--<![endif]--> <head> <meta charset="utf-8"> <meta name="cmspageid" content="@cmspageID"> <meta name="cmspageactiveto" content="@cmsactiveTo"> <meta name="cmseditorid" content="@cmseditorID"> <meta name="cmspagecreated" content="@cmspageCreated"> <meta name="cmspageupdated" content="@cmspageCreated"> <meta name="cmseditor" content="@cmseditorIDstring"> <meta name="cmsresponsible" content="@cmsresponsibleIDstring"> <meta name="viewport" content="width=device-width, initial-scale = 1.0"> <title>@GetValue("Title")</title> @GetValue("MetaTags") @GetValue("CopyRightNotice") <script src="https://cookiecontrol.bleau.dk/scripts/cookieconsent.js"></script> <script id="cookiecontrolfunctions" src="https://cookiecontrol.bleau.dk/scripts/Cookiecontrolfunctions.js" data-cname="Fanø" data-defaultset="dwdefault"></script> <script src="https://moliricdn.azurewebsites.net/fanoe/appinsights/bleauborger.js"></script> <meta property="og:type" content="website"> @if(!string.IsNullOrWhiteSpace(GetString("Item.PageName"))) { <meta property="og:title" content='@GetString("Item.PageName")'> } else { <meta property="og:title" content='@GetString("Item.Title")'> } <meta property="og:url" content='@GetGlobalValue("Global:Request.Url")'> @if (!string.IsNullOrWhiteSpace(GetString("Item.News_Teaser_Text"))) { <meta property="og:description" content='@GetString("Item.News_Teaser_Text")'> } else { <meta property="og:description" content='@GetString("Meta.Description")'> } @if (!string.IsNullOrWhiteSpace(GetString("Item.DetailImage"))) { <meta property="og:image" content='@GetGlobalValue("Global:Request.Host")/Admin/Public/GetImage.ashx?Image=@GetValue("Item.DetailImage")&Height=400&Crop=5'> } else { <meta property="og:image" content='@GetGlobalValue("Global:Request.Host")/Files/Images/fanoe_logoV3.png'> } <meta name="google-site-verification" content="rS8xvyP1iowa6AM5Mf7rrJCTsCGksMDzjOLCjfBSrvE"> <link rel="stylesheet" href="/Files/Templates/Designs/bleau-solutionset/assets/stylesheets/bleau-styles.min.css?v=2" media="screen"> <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/bleau-solutionset/assets/socicon/socicon.css"> <!--funktioner Start--> <script type="text/javascript" src="/Files/Templates/Designs/bleau-solutionset/assets/javascripts/svg-inject.min.js"></script> <!--funktioner Slut--> <link rel="stylesheet" href="/Files/Templates/Designs/bleau-solutionset/assets/stylesheets/print.min.css" media="print"> <link rel="stylesheet" href="/Files/Templates/Designs/bleau-solutionset/assets/stylesheets/font-awesome.min.css" media="none"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/bxslider/4.2.12/jquery.bxslider.css"> <script type="text/javascript" src="//webkort.fanoe.dk/clientapi/minimap2/mmloader.js"></script> <script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script> @RenderSnippet("StyleSheetHead") @RenderSnippet("StyleSheet") @if (!string.IsNullOrEmpty(GetString("DwNavigation(topMenu)"))) { <link href='@GetString("Item.Area.Custom_CSS_Url")' rel="stylesheet"> } @if (!string.IsNullOrWhiteSpace(GetString("Item.Area.GTMID"))) { <!-- 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', '@GetString("Item.Area.GTMID")');</script> <!-- End Google Tag Manager --> } <link rel="shortcut icon" href='/Admin/Public/GetImage.ashx?Image=@GetString("Item.Area.Favicon")&amp;Width=16&amp;Height=16&amp;Crop=5&amp;format=png'> <link rel="apple-touch-icon" href='/Admin/Public/GetImage.ashx?Image=@GetString("Item.Area.Apple_touch_icon")&amp;Width=16&amp;Height=16&amp;Crop=5&amp;format=png'> @GetValue("Stylesheets") @GetValue("Javascripts") </head> @{ var bodyclass = ""; string Cpage = GetString("DwPageName"); if (Cpage.Contains("Forside")) { bodyclass = "frontpage "; } if (!string.IsNullOrWhiteSpace(GetString("Item.Area.Color"))) { bodyclass += GetString("Item.Area.Color"); } bodyclass = bodyclass.Trim(); } <body class="@bodyclass"> @if (!string.IsNullOrWhiteSpace(GetString("Item.Area.GTMID"))) { <!-- Google Tag Manager (noscript) --> <noscript><iframe src='https://www.googletagmanager.com/ns.html?id=@GetString("Item.Area.GTMID")' height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> <!-- End Google Tag Manager (noscript) --> } <div class="body-wrapper"> <header> <section class="service-navigation" style='display:@(String.IsNullOrEmpty(System.Web.HttpContext.Current.Request["ispdf"]) ? "block" : "none")' aria-label="service menu"> <nav aria-label="Service menu"> <ul class="container text-right hidden-print"> @GetValue("DwNavigation(servicenavigation)") <li class=""><a href="http://www.adgangforalle.dk/" target="_blank" class="read-more-icon" rel="noreferrer">Læs op</a></li> <li class=""><a href="javascript:void(0);" id="printicon" class="print-icon">Print</a></li> </ul> </nav> </section> <div class="navbar hidden-print" role="navigation" aria-label="Hoved menu" style='display:@(String.IsNullOrEmpty(System.Web.HttpContext.Current.Request["ispdf"]) ? "block" : "none")'> <div class="container top-nav" id="nav-wrapper"> <button class="navbar-toggle collapsed" aria-expanded="false" aria-label="Mobile Menu" data-target="#mobile-menu" data-toggle="collapse" type="button"> </button> <nav aria-label="Mobile Menu"> @GetValue("DwNavigation(mobilemenu)") </nav> <div class="navbar-header col-xs-6 col-md-4"> @if (!string.IsNullOrWhiteSpace(GetGlobalValue("Global:Device.IsDesktop")) || !string.IsNullOrWhiteSpace(GetGlobalValue("Global:Device.IsTablet"))) { if (!string.IsNullOrWhiteSpace(GetString("Item.Area.Logo_Image"))) { <!-- WCAG --> <a class="navbar-brand" href="/" aria-label='@GetString("Item.Area.NameOrganisation")'> <img src='@GetString("Item.Area.Logo_Image")' alt='@Translate("Sitename", "Bleauprint government")' onload="SVGInject(this)"> </a> <!-- WCAG --> } } else { if (!string.IsNullOrWhiteSpace(GetString("Item.Area.LogoMobile"))) { <a class="navbar-brand" href="/" aria-label='@Translate("Sitename", "Bleauprint government")'> <img src='@GetString("Item.Area.LogoMobile")' alt='@Translate("Sitename", "Bleauprint government")' onload="SVGInject(this)"> </a> } else { <a class="navbar-brand logo-image" href="/" title=""></a> } } </div> <nav class="col-sm-5 col-md-7 nav-top hidden-print" aria-label="Desktop Menu"> @GetValue("DwNavigation(menu)") </nav><!-- /.nav-collapse --> @inherits RazorTemplateBase< RazorTemplateModel < Template > > @using Dynamicweb.Rendering <div class="search-nav pull-right col-xs-5 col-md-1 search-navFull"> <a href="" class="collapsed" title="Søg" aria-label="Indholdssøgning"></a> </div> <div id="search-boxTop" class="search-drop search-form"> @SnippetStart("StyleSheetHead") <link type="text/css" href="/Files/Templates/Designs/bleau-solutionset/assets/stylesheets/weightedSearch.min.css" rel="stylesheet"> <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.5.0/css/all.css" integrity="sha384-B4dIYHKNBt8Bc12p+WXckhzcICo0wtJAoU8YZTY5qE0Id1GSseTk6S+L3BlXeVIU" crossorigin="anonymous"> @SnippetEnd("StyleSheetHead") <form action="/Default.aspx" accept-charset="utf-8" id="SearchFormTop"> <input type="hidden" name="ID" value='@GetValue("Item.Area.Search_Result")'> <div class="search-area"> <input aria-label="Topmenu søge felt" id="searchSubmit" autocomplete="off" size="10" spellcheck="false" dir="ltr" class="search-input" placeholder='@Translate("search", "Skriv her hvad du s&oslash;ger...")' data-error='@Translate("searchText", "S&oslash;g p&aring; sitet")' type="text" name="q" value='@GetValue("DwSearchPhrase")'> <input type="submit" value="Søg" class="search-button" title="Søg"> </div> </form> </div> </div><!-- /.container --> </div><!-- /.navbar --> </header> <div class="navbar visible-print"> <div class="container top-nav"> <div class="navbar-header col-xs-6 col-md-4"> <div class="visible-print"> <div class="navbar-brand"> @if (!string.IsNullOrWhiteSpace(GetString("Item.Area.Logo_Image"))) { <img src='@GetString("Item.Area.Logo_Image")' alt='@GetString("DwAreaName")'> } </div> </div> </div> </div> </div> @{ string Tpage = GetGlobalValue("Global:Pageview.LayoutTemplate"); if (Tpage != ("frontpage.cshtml")) { <div class="selvbetjening-wrapper selvbetjening-mobil hidden-print" role="navigation" aria-label="selvbetjeningsmenu"> <button class="selv-btn collapsed" aria-controls="Selvbetjeningsmenu" aria-expanded="false" id="selvbetjening-btn">@Translate("Selvbetjening", "Selvbetjening")</button> <div class="selvbetjening-links clearfix collapse dont-collapse-sm" id="Selvbetjeningsmenu"> <ul id="selfservice-green"> @{ var entriesList = GetLoop("Item.Area.Entries_Item_List"); foreach (var e in entriesList) { var title = e.GetString("Item.Area.Entries_Item_List.Title.Value"); var type = e.GetString("Item.Area.Entries_Item_List.Type.Value"); var href = e.GetString("Item.Area.Entries_Item_List.Link_Url.Value"); <li> <a href="@href" target="_self" tabindex="-1"> <img class="svg-inject" src="@type" alt="Ikon @title" onload="SVGInject(this)"> @title </a> </li> } } </ul> </div> </div> } } <!--Breadcrumb grey line--> <div class="grey-box leftSidebar"> <!--Breadcrumb--> <div class="container leftSidebar-subpage hidden-print"> <div class="breadcrumb text-right col-xs-12"> <nav aria-label="Breadcrumb navigation"> @GetValue("DwNavigation(Breadcrumb)") </nav> </div> </div> </div> <!--Left Sidebar--> <div class="leftSidebar"> <div class="container leftSidebar-subpage dagsordner"> <!--Left Sidebar menu--> <div class="col-xs-12 col-sm-4 submenu-list hidden-xs hidden-print" id="leftMenu" role="navigation" aria-label="Venstre undermenu"> @GetValue("DwNavigation(leftnav)") </div> <div class="col-xs-12 col-sm-8 page-title"> <h1 class="title" id="pageTitle">@GetString("DwPageName")</h1> <section aria-label="hoved indhold"> <div class="main-content" id="rightColumn">@GetValue("DwContent(rightColumn)")</div> </section> </div> </div> </div> <!--Purple & White Bottom Boxes--> <div class="row full-width" id="bottom-row-fluid">@GetValue("DwContent(bottomrowfluid)")</div> <!--Grey Box with custom mobile submenu--> @*<div class="grey-box leftSidebar hidden-print"> <div class="container leftSidebar-subpage"> <div class="col-xs-12 hidden-sm hidden-md hidden-lg clearfix mobile-submenu" id="GreyBox"> @GetValue("Include(navigation/MobileSubmenu.cshtml)") </div> </div> </div>*@ </div> <footer class="row"> <section class="container footer-wrapper" aria-label="footer"> <div class="row" id="footerSections"> <div class="col-xs-12 col-sm-4 col-md-3 quick-links hidden-print"> <h1>@Translate("QuickLinks", "Quick links")</h1> @GetValue("DwNavigation(quicklinks)") </div> <div class="col-xs-12 col-sm-4 col-md-3 adress-box vcard"> <span class="fn hidden"> <span class="given-name">@GetString("Item.Area.NameOrganisation")</span> <span class="additional-name"></span> <span class="family-name"></span> </span> <div class="fn org"><h1>@GetString("Item.Area.NameOrganisation")</h1></div> <div class="adress"> @if (!string.IsNullOrWhiteSpace(GetString("Item.Area.StreetAddress"))) { <div class="street-address">@GetString("Item.Area.StreetAddress")</div> } @if (!string.IsNullOrWhiteSpace(GetString("Item.Area.PostalCode")) || !string.IsNullOrWhiteSpace(GetString("Item.Area.Lacation"))) { <div class="adr"><span class="postal-code">@GetString("Item.Area.PostalCode")</span> <span class="locality">@GetString("Item.Area.Lacation")</span></div> } @if (!string.IsNullOrWhiteSpace(GetString("Item.Area.Telefon"))) { <div>@Translate("Telefon", "Telefon"): <span class="tel">@GetString("Item.Area.Telefon")</span> </div> } @if (!string.IsNullOrWhiteSpace(GetString("Item.Area.Fax"))) { <div class="tel"> <span class="type">@Translate("Fax", "Fax"): </span><span class="value">@GetString("Item.Area.Fax")</span> </div> } @if (!string.IsNullOrWhiteSpace(GetString("Item.Area.CVR"))) { <div class="tel"> <span class="type">@Translate("CVR", "CVR"): </span><span class="value">@GetString("Item.Area.CVR")</span> </div> } @if (!string.IsNullOrWhiteSpace(GetString("Item.Area.Email"))) { <a class="email" href='mailto:@GetValue("Item.Area.Email")'>@GetValue("Item.Area.Email")</a> } </div> </div> <div class="col-xs-12 col-sm-4 col-md-3 col-md-offset-3 work-time oh-day" itemscope="" itemtype="http://schema.org/CivicStructure"> <h1 itemprop="name">@Translate("Borgerservice", "Borgerservice åbningstider")</h1> <ul class="oh-highlight-day"> @foreach (var item in GetLoop("Item.Area.OpeningHours")) { <li><meta itemprop="openingHours" content='@item.GetValue("Item.Area.OpeningHours.Days")-@item.GetValue("Item.Area.OpeningHours.OpenHour")'>@item.GetValue("Item.Area.OpeningHours.Days")<span>@item.GetValue("Item.Area.OpeningHours.OpenHour")</span></li> } </ul> </div> </div> </section> </footer> <div class="bgr-opacity"></div> <script type="text/javascript" src="//code.jquery.com/ui/1.9.2/jquery-ui.min.js"></script> <script type="text/javascript" src="/Files/Templates/Designs/bleau-solutionset/assets/javascripts/jquery.dotdotdot.min.js"></script> <script type="text/javascript" src="/Files/Templates/Designs/bleau-solutionset/assets/vendor/bootstrap/js/bootstrap.min.js"></script> <script type="text/javascript" src="/Files/Templates/Designs/bleau-solutionset/assets/javascripts/main.min.js?v=2"></script> <script src="https://cdn.jsdelivr.net/bxslider/4.2.12/jquery.bxslider.min.js"></script> @RenderSnippet("JavaScriptBottom") @if(!string.IsNullOrWhiteSpace(GetString("Item.Area.Google_Analytics_ID"))) { <text> <script> var _gaq = [['_setAccount', '@GetValue("Item.Area.Google_Analytics_ID")'], ['_trackPageview']]; (function(d, t) { var g = d.createElement(t), s = d.getElementsByTagName(t)[0]; g.async = true; g.src = '//www.google-analytics.com/ga.js'; s.parentNode.insertBefore(g, s); })(document, 'script'); </script> </text> } </body> </html>