Exception in template (Designs/Rapido/_parsed/PageNoEcom.parsed.cshtml): System.NullReferenceException: Object reference not set to an instance of an object.
   at CompiledRazorTemplates.Dynamic.cdfecebfaeb.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, String cacheName)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()
@inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> @using Dynamicweb.Frontend.Devices @using Dynamicweb.Extensibility @using Dynamicweb.Content @using Dynamicweb.Security; @using System @using System.Linq @using System.Web @using System.IO @using System.Text @using System.Collections @using Dynamicweb.Frontend.UrlHandling @{ //General settings string favicon = Model.Area.Item.GetFile("LogoFavicon") != null ? Model.Area.Item.GetFile("LogoFavicon").Path : "/Files/Images/favicon.png"; string logo = Model.Area.Item.GetFile("LogoImage") != null ? Model.Area.Item.GetFile("LogoImage").Path : "/Files/Images/logo-dynamicweb.png"; if (Path.GetExtension(logo).ToLower() != ".svg") { logo = "/Admin/Public/GetImage.ashx?height=40&amp;crop=5&amp;Compression=75&amp;image=" + @logo; } bool megaMenu = Model.Area.Item.GetBoolean("NavigationMegaMenu"); bool stickyMenu = Pageview.Device.ToString() == "Mobile" ? false : Model.Area.Item.GetBoolean("NavigationStickyMenu"); string mobileNavigationLevels = Model.Area.Item.GetBoolean("MobileNavigationLevels") ? Model.Area.Item.GetString("MobileNavigationLevels") : "3"; string searchPlaceholder = Translate("Search", "Search"); string userSignedInError = !Model.LogOnFailed ? "" : "checked"; string userSignedInErrorText; switch (Model.LogOnFailedReason) { case Dynamicweb.Security.UserManagement.LogOnFailedReason.PasswordLengthInvalid: userSignedInErrorText = Translate("Password length is invalid"); break; case Dynamicweb.Security.UserManagement.LogOnFailedReason.IncorrectLogin: userSignedInErrorText = Translate("Invalid email or password"); break; case Dynamicweb.Security.UserManagement.LogOnFailedReason.ExceededFailedLogOnLimit: userSignedInErrorText = Translate("You have exceeded the limit of allowed login attempts. The user account is temporarily locked"); break; case Dynamicweb.Security.UserManagement.LogOnFailedReason.LoginLocked: userSignedInErrorText = Translate("The user account is temporarily locked"); break; case Dynamicweb.Security.UserManagement.LogOnFailedReason.PasswordExpired: userSignedInErrorText = Translate("The password has expired and needs to be renewed"); break; default: userSignedInErrorText = Translate("An unknown error occured"); break; } string loggedIn = Model.CurrentUser != null ? "true" : "false"; string wireframeMode = Model.Area.Item.GetBoolean("WireframeMode").ToString(); //Font settings string navigationFont = Model.Area.Item.GetItem("NavigationFont").GetGoogleFont("FontFamily").Family.Replace(" ", "+"); string mobileNavigationFont = Model.Area.Item.GetItem("MobileNavigationFont").GetGoogleFont("FontFamily").Family.Replace(" ", "+"); string headerFont = Model.Area.Item.GetItem("ContentLayoutHeaderFont").GetGoogleFont("FontFamily").Family.Replace(" ", "+"); string subHeaderFont = Model.Area.Item.GetItem("ContentLayoutSubheaderFont").GetGoogleFont("FontFamily").Family.Replace(" ", "+"); string contentFont = Model.Area.Item.GetItem("ContentLayoutBodyText").GetGoogleFont("FontFamily").Family.Replace(" ", "+"); //Page IDs for use in the template string firstPageId = Model.Area.FirstActivePage.ID.ToString(); string areaId = Model.Area.ID.ToString(); string autoCssLink = "/Files/Templates/Designs/Rapido/css/rapido/rapido_" + @areaId + ".min.css?ticks=" + Model.Area.UpdatedDate.Ticks; int pageId = Model.TopPage.ID; string newsletterSignUpPageId = GetPageIdByNavigationTag("NewsletterSignUp").ToString(); string searchPageId = ""; string stickyTop = stickyMenu ? "top-container--sticky" : ""; string pagePos = stickyMenu ? "js-page-pos" : ""; string topLayout = Model.Area.Item.GetList("LayoutTop").SelectedValue; string megamenuPromotionImage = Model.Area.Item.GetFile("NavigationMegamenuPromotionImage") != null ? Model.Area.Item.GetFile("NavigationMegamenuPromotionImage").Path : ""; bool renderPagesInToolBar = Model.Area.Item.GetBoolean("RenderPagesInToolBar"); string toolbarText = Model.Area.Item.GetString("ToolbarText"); string demoButtonText = Model.Area.Item.GetString("HeaderButtonText"); string demoButtonLink = Model.Area.Item.GetString("HeaderButtonLink"); string demoButtonType = "btn--link"; } @{ string siteURL = Dynamicweb.Context.Current.Request.Url.Scheme + "://" + Dynamicweb.Context.Current.Request.Url.Host; string businessPhotoPath = Model.Area.Item.GetFile("BusinessPhoto") != null ? Model.Area.Item.GetFile("BusinessPhoto").PathUrlEncoded : ""; string businessName = Model.Area.Item.GetString("BusinessName"); var address = Model.Area.Item.GetItem("Address"); string streetAddress = ""; string addressLocality = ""; string addressRegion = ""; string postalCode = ""; string addressCountry = ""; if (address != null) { streetAddress = address.GetString("StreetAddress"); addressLocality = address.GetString("City"); addressRegion = address.GetString("Region"); postalCode = address.GetString("PostalCode"); addressCountry = address.GetString("Country"); } string contactEmail = Model.Area.Item.GetString("ContactEmail"); string contactNumber = Model.Area.Item.GetString("ContactNumber"); } @{ switch (Model.Area.Item.GetList("HeaderButtonType").SelectedName) { case "Link": demoButtonType = "btn--link"; break; case "Secondary": demoButtonType = "btn--secondary"; break; default: demoButtonType = "btn--primary"; break; } } <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>@Model.Title</title> <meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="description" content="@Model.Description" /> <!-- Favicon --> <link href="@favicon" rel="icon" type="image/png"> <!-- 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','GTM-PV87ZZN');</script> <!-- End Google Tag Manager --> <!-- Font awesome --> <link rel="stylesheet" href="/Files/Templates/Designs/Rapido/css/rapido/font-awesome.min.css" type="text/css"> <!-- Base (Default, wireframe) styles --> <link rel="stylesheet" href="/Files/Templates/Designs/Rapido/css/base/base.min.css" type="text/css"> <!-- Rapido Css from Website Settings --> <link id="rapidoCss" rel="stylesheet" href="@autoCssLink" type="text/css"> <!-- Ignite Css (Custom site specific styles) --> <link id="igniteCss" type="text/css" href="/Files/Templates/Designs/Rapido/css/ignite/ignite.min.css" rel="stylesheet"> <!-- Google fonts --> @{ var fonts = new string[5] { @navigationFont, @mobileNavigationFont, @headerFont, @subHeaderFont, @contentFont }; var family = string.Join("%7C", fonts.Distinct().Select(x => string.Format("{0}:100,200,300,400,500,600,700,800,900", x))); } <link href="https://fonts.googleapis.com/css?family=@family" rel="stylesheet"> @if (!string.IsNullOrEmpty(businessPhotoPath) && !string.IsNullOrEmpty(businessName) && !string.IsNullOrEmpty(streetAddress) && !string.IsNullOrEmpty(addressLocality) && !string.IsNullOrEmpty(addressRegion) && !string.IsNullOrEmpty(postalCode) && !string.IsNullOrEmpty(addressCountry)) { <script type="application/ld+json"> { "@@context": "http://schema.org", "@@type": "Store", "image": [ "@siteURL/Admin/Public/GetImage.ashx?width=400&height=400&crop=0&Compression=75&DoNotUpscale=true&image=@businessPhotoPath", "@siteURL/Admin/Public/GetImage.ashx?width=400&height=300&crop=0&Compression=75&DoNotUpscale=true&image=@businessPhotoPath", "@siteURL/Admin/Public/GetImage.ashx?width=448&height=225&crop=0&Compression=75&DoNotUpscale=true&image=@businessPhotoPath" ], "@@id": "@siteURL", "name": "@businessName", "address": { "@@type": "PostalAddress", "streetAddress": "@streetAddress", "addressLocality": "@addressLocality", "addressRegion": "@addressRegion", "postalCode": "@postalCode", "addressCountry": "@addressCountry" } @if (!string.IsNullOrEmpty(contactEmail)) { <text>,"email": "@Model.Area.Item.GetString("ContactEmail")"</text> } @if (!string.IsNullOrEmpty(contactNumber)) { <text>,"telephone": "@Model.Area.Item.GetString("ContactNumber")"</text> } } </script> } </head> <body> <!-- Google Tag Manager (noscript) --> <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-PV87ZZN" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> <!-- End Google Tag Manager (noscript) --> @MobileNavigation() <main class="site dw-mod"> <header class="top-container @stickyTop" id="Top"> @if (renderPagesInToolBar) { <div class="tools-navigation dw-mod"> <div class="center-container grid top-container__center-container dw-mod"> <div class="grid__cell"> <div class="u-pull--left u-margin-top">@toolbarText</div> <div class="u-pull--right"> @RenderNavigation(new { id = "topnavigation", cssclass = "menu menu-tools dw-mod dwnavigation", template = "TopMenu.xslt" }) </div> </div> </div> </div> } @if (topLayout == "normal") { <div class="header header-top dw-mod"> <div class="center-container top-container__center-container dw-mod"> <div class="grid"> <div class="grid__col-md-3 grid--align-self-center grid__col--bleed-y"> <div class="logo u-padding--xs dw-mod"> <a href="/Default.aspx?ID=@firstPageId"> <img class="grid__cell-img" src="@logo" alt="Logo" /> </a> </div> </div> @if (Pageview.Device.ToString() != "Mobile" && Pageview.Device.ToString() != "Tablet") { <div class="grid__cell grid__cell--align-middle-right"> <ul class="menu dw-mod u-pull--right"> @RenderLanguageSelector("outsideNavigation") </ul> @if (!string.IsNullOrWhiteSpace(demoButtonLink)) { <div class="u-pull--right"><a class="btn @demoButtonType dw-mod u-no-margin u-margin-left" href="@demoButtonLink">@demoButtonText</a></div> } </div> } </div> </div> </div> <!-- Main navigation --> <nav class="main-navigation dw-mod"> <div class="center-container top-container__center-container dw-mod"> <div class="grid"> <div class="grid__col-12 grid--align-self-center grid__col--bleed"> <div class="grid__cell"> <ul class="menu dw-mod"> @MobileNavigationTrigger() @RenderHeaderNavigation() </ul> </div> </div> </div> </div> </nav> } @if (topLayout == "splitted") { <div class="header header-top dw-mod"> <div class="center-container top-container__center-container dw-mod"> <div class="grid"> <div class="grid__col-md-3 grid--align-self-center grid__col--bleed-y"> <div class="logo u-padding--xs dw-mod"> <a href="/Default.aspx?ID=@firstPageId"> <img class="grid__cell-img" src="@logo" alt="Logo" /> </a> </div> </div> </div> </div> </div> <!-- Main navigation --> <nav class="main-navigation dw-mod"> <div class="center-container top-container__center-container dw-mod"> <div class="grid"> <div class="u-pull--left"> @MobileNavigationTrigger() @RenderHeaderNavigation() </div> <div class="grid__cell grid__cell--align-middle-right"> <ul class="menu dw-mod u-pull--right"> @RenderLanguageSelector() </ul> @if (!string.IsNullOrWhiteSpace(demoButtonLink)) { <div class="u-pull--right"><a class="btn @demoButtonType dw-mod u-no-margin u-margin-left" href="@demoButtonLink">@demoButtonText</a></div> } </div> </div> </div> </nav> } @if (topLayout == "condensed") { <nav class="main-navigation dw-mod"> <div class="center-container top-container__center-container dw-mod"> <div class="grid"> <div class="grid__col-md-2 grid--align-self-center grid__col--bleed-y"> <div class="logo u-padding--xs dw-mod"> <a href="/Default.aspx?ID=@firstPageId"> <img class="grid__cell-img" src="@logo" alt="Logo" /> </a> </div> </div> @* Navigation *@ <div class="u-pull--left"> @MobileNavigationTrigger() @RenderHeaderNavigation() </div> <div class="grid__cell grid__cell--align-middle-right"> <ul class="menu dw-mod u-pull--right"> @RenderLanguageSelector() </ul> @if (!string.IsNullOrWhiteSpace(demoButtonLink)) { <div class="u-pull--right"><a class="btn @demoButtonType dw-mod u-no-margin u-margin-left" href="@demoButtonLink">@demoButtonText</a></div> } </div> </div> </div> </nav> } @if (topLayout == "minimal") { <nav class="main-navigation dw-mod"> <div class="center-container top-container__center-container dw-mod"> <div class="grid"> <div class="grid__col-md-3 grid--align-self-center grid__col--bleed-y"> <div class="logo u-padding--xs dw-mod"> <a href="/Default.aspx?ID=@firstPageId"> <img class="grid__cell-img" src="@logo" alt="Logo" /> </a> </div> </div> @* Navigation *@ <div class="u-pull--left"> @MobileNavigationTrigger() @RenderHeaderNavigation() </div> <div class="grid__cell grid__cell--align-middle-right"> <ul class="menu dw-mod u-pull--right"> @RenderLanguageSelector() </ul> @if (!string.IsNullOrWhiteSpace(demoButtonLink)) { <div class="u-pull--right"><a class="btn @demoButtonType dw-mod u-no-margin u-margin-left" href="@demoButtonLink">@demoButtonText</a></div> } </div> </div> </div> </nav> } </header> <!-- Render the content --> <div id="Page" class="page @pagePos"> <section class="center-container content-container dw-mod" id="content"> @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> @functions { public string RegisterConsent() { //Give consent //?GiveEmailConsent=True&cemail=np@dynamicweb.com //Withdraw consent //?GiveEmailConsent=False&cemail=np@dynamicweb.com //?GiveEmailConsent=True&RecipientId={{EmailMessaging:Recipient.Id}}&RecipientSecret={{EmailMessaging:Recipient.Secret}} //Dynamicweb.Context.Current.Request.QueryString["cemail"]; if (!string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.QueryString["GiveEmailConsent"])) { Int32 recipientId = Dynamicweb.Core.Converter.ToInt32(Dynamicweb.Context.Current.Request.QueryString[Dynamicweb.EmailMarketing.Constants.UnsubscribeRecipientIdRequestName]); string recipientSecret = Dynamicweb.Context.Current.Request.QueryString[Dynamicweb.EmailMarketing.Constants.UnsubscribeRecipientSecretRequestName]; Dynamicweb.Mailing.Recipient recipient = Dynamicweb.Mailing.Recipient.GetRecipientById(recipientId); if (recipient == null || recipient.IsNew || String.IsNullOrEmpty(recipientSecret) || !recipient.Secret.Equals(recipientSecret)) { return "Secret does not match"; } string emailAddress = recipient.EmailAddress; Dynamicweb.DataProcessing.ActivityService activityService = new Dynamicweb.DataProcessing.ActivityService(); Dynamicweb.DataProcessing.Activity activity = activityService.GetActivityById("d723363c-2b56-4349-8abc-54bc8154d4d4"); Dynamicweb.DataProcessing.ConsentService consentService = new Dynamicweb.DataProcessing.ConsentService(); Dynamicweb.DataProcessing.Consent consent = consentService.GetConsentById(activity.Id, emailAddress, "Email"); if (consent != null && consent.Status == Dynamicweb.DataProcessing.ConsentStatus.Given) { if (Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Request.QueryString["GiveEmailConsent"])) { // Visitor has given consent. return "Thanks, you already gave us your consent"; } else { consentService.WithdrawConsent(activity.Id, emailAddress, "Email", Dynamicweb.DataProcessing.ConsentRequestInfo.FromRequest(Dynamicweb.Context.Current.Request)); return "Thank you - your consent has been withdrawn!"; } } else { // Visitor has not given consent - display a "Give consent button" or record that the user has given us a consent if (Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Request.QueryString["GiveEmailConsent"])) { Dynamicweb.DataProcessing.Consent givenConsent = consentService.GiveConsent(activity.Id, emailAddress, "Email", Dynamicweb.DataProcessing.ConsentRequestInfo.FromRequest(Dynamicweb.Context.Current.Request)); return "Thank you - your consent has been registered! (" + givenConsent.SubjectId + ")"; } } } return string.Empty; } } @if (Model.PropertyItem.GetList("ShowBreadcrumb").SelectedValue == "True") { <div class="grid__col-12"> @RenderNavigation(new { id = "breadcrumb", template = "breadcrumb.xslt" }) </div> } <div class="grid"> @if (Model.PropertyItem.GetList("LeftMenu").SelectedValue == "True") { var navigationMarkup = RenderNavigation(new { id = "leftnav", cssclass = "menu dwnavigation", startLevel = 2, endlevel = 5, template = "LeftNavigation.xslt" }); if (!string.IsNullOrEmpty(navigationMarkup)) { <nav class="grid__col-md-3 grid__col-sm-12 grid__col-xs-12 paragraph-container"> <div class="grid__cell"> @navigationMarkup </div> </nav> } } <div class="grid__col-auto grid__col--bleed"> <div class="grid"> @Model.Placeholder("dwcontent", "content", "default:true;sort:1") <span style="display:none;"> @RegisterConsent() </span> </div> </div> </div> </section> </div> </main> <!-- Footer section --> @RenderFooter() <!-- Helpers --> @helper RenderLanguageSelector(string type = "inNavigation") { string liClasses = type == "inNavigation" ? "menu__item menu__item--horizontal menu__item--top-level dw-mod u-hidden-xxs" : "menu__item menu__item--horizontal menu--clean u-w40px dw-mod"; string menuLinkClass = type == "inNavigation" ? "menu__link" : "header-menu__link"; @* Language selector *@ if (Model.Languages.Count > 1) { <li class="@liClasses"> <div class="@menuLinkClass u-w40px is-dropdown is-dropdown--no-icon dw-mod"> <i class="fa fa-globe fa-1_5x"></i> <div class="menu menu--dropdown u-w100px dw-mod"> @foreach (var lang in Model.Languages) { <a href="/Default.aspx?ID=@lang.Page.ID&CurrencyCode=@Dynamicweb.Services.Areas.GetArea(lang.ID).EcomCurrencyId" class="menu-dropdown__item menu-dropdown__item--link dw-mod">@lang.Name</a> } </div> </div> </li> } } <!-- Content rendering helpers --> @helper MobileNavigation() { int pageId = Model.TopPage.ID; string mobileNavigationLevels = Model.Area.Item.GetBoolean("MobileNavigationLevels") ? Model.Area.Item.GetString("MobileNavigationLevels") : "3"; int miniCartFeedPageId = GetPageIdByNavigationTag("MiniCartFeed"); int cartFeedPageId = GetPageIdByNavigationTag("CartOrderlinesFeed"); bool renderPagesInToolBar = Model.Area.Item.GetBoolean("RenderPagesInToolBar"); int startLevel = renderPagesInToolBar ? 1 : 0; bool onlyPreview = Model.Area.Item.GetBoolean("OnlyPreviewForAnonymous") && Model.CurrentUser.ID == 0; if (Pageview.Device.ToString() == "Mobile" || Pageview.Device.ToString() == "Tablet") { <!-- Trigger for mobile navigation --> <input type="checkbox" id="MobileNavTrigger" class="mobile-nav-trigger" /> <!-- Mobile navigation --> <nav class="mobile-navigation dw-mod"> @RenderNavigation(new { id = "mobilenavigation", cssclass = "menu menu-mobile dwnavigation", startLevel = @startLevel, ecomStartLevel = @startLevel + 1, endlevel = @mobileNavigationLevels, expandmode = "all", template = "BaseMenuForMobile.xslt" }) @if (Model.Area.Item.GetBoolean("RenderPagesInToolBar")) { @RenderNavigation(new { id = "topToolsMobileNavigation", cssclass = "menu menu-mobile dwnavigation", template = "ToolsMenuForMobile.xslt" }) } <ul class="menu menu-mobile"> @if (Model.Languages.Count > 0) { string selectedLanguage = ""; foreach (var lang in Model.Languages) { if (lang.IsCurrent) { selectedLanguage = lang.Name; } } <li class="menu-mobile__item dw-mod"> <label for="MobileMenuCheck_Language" class="menu-mobile__link menu-mobile__link--highlighted dw-mod"><i class="fa fa-globe menu-mobile__link-icon"></i> @selectedLanguage</label> <input id="MobileMenuCheck_Language" type="checkbox" class="expand-trigger"> <label for="MobileMenuCheck_Language" class="menu-mobile__trigger"></label> <ul class="menu-mobile menu-mobile__submenu expand-menu"> @foreach (var lang in Model.Languages) { <li class="menu-mobile__item dw-mod"> <a class="menu-mobile__link menu-mobile__link--highlighted dw-mod menu-mobile__link--level-1" href="/Default.aspx?ID=@lang.Page.ID&CurrencyCode=@Dynamicweb.Services.Areas.GetArea(lang.ID).EcomCurrencyId">@lang.Name</a> </li> } </ul> </li> } </ul> </nav> <label class="mobile-nav-trigger-off" for="MobileNavTrigger"></label> if (!onlyPreview) { <div class="u-visually-hidden js-handlebars-root js-mini-cart" id="miniCart" data-template="MiniCartContent" data-cart-id="@cartFeedPageId" data-json-feed="/Default.aspx?ID=@miniCartFeedPageId&feedType=MiniCart" data-init-onload="false"></div> } } } @helper RenderHeaderNavigation() { bool megaMenu = Model.Area.Item.GetList("NavigationMegaMenu").SelectedValue.ToLower() == "true" ? true : false; string megamenuPromotionImage = Model.Area.Item.GetFile("NavigationMegamenuPromotionImage") != null ? Model.Area.Item.GetFile("NavigationMegamenuPromotionImage").Path : ""; bool renderPagesInToolBar = Model.Area.Item.GetBoolean("RenderPagesInToolBar"); int startLevel = renderPagesInToolBar ? 1 : 0; if (Pageview.Device.ToString() != "Mobile" && Pageview.Device.ToString() != "Tablet") { if (!megaMenu) { @RenderNavigation(new { id = "topnavigation", cssclass = "menu dw-mod dwnavigation", startLevel = @startLevel, ecomStartLevel = @startLevel+1, endlevel = 5, expandmode="all", template = "BaseMenuWithDropdown.xslt" }); } else { @RenderNavigation(new { id = "topnavigation", cssclass = "menu dw-mod dwnavigation", startLevel = @startLevel, ecomStartLevel = @startLevel+1, endlevel = 5, promotionImage = megamenuPromotionImage, promotionLink = Model.Area.Item.GetString("NavigationMegamenuPromotionLink"), expandmode="all", template = "BaseMegaMenu.xslt" }); } } } @helper MobileNavigationTrigger() { @* Mobile navigation trigger *@ if (Pageview.Device.ToString() == "Mobile" || Pageview.Device.ToString() == "Tablet") { <div class="menu dw-mod u-pull--left"> <div class="menu__item menu__item--horizontal menu__item--top-level dw-mod"> <label for="MobileNavTrigger" class="mobile-nav-trigger-button menu__link dw-mod"></label> </div> </div> } } @helper RenderFooter() { string footerColumnOneContent = !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterColumnOne")) ? Model.Area.Item.GetString("FooterColumnOne") : ""; string footerColumnTwoContent = !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterColumnTwo")) ? Model.Area.Item.GetString("FooterColumnTwo") : ""; string footerColumnThreeContent = !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterColumnThree")) ? Model.Area.Item.GetString("FooterColumnThree") : ""; string footerColumnOneHeader = Model.Area.Item.GetString("FooterColumnOneHeader"); string footerColumnTwoHeader = Model.Area.Item.GetString("FooterColumnTwoHeader"); string footerColumnThreeHeader = Model.Area.Item.GetString("FooterColumnThreeHeader"); int newsletterSignUpPageId = GetPageIdByNavigationTag("NewsletterSignUp"); <!-- Footer section --> <footer class="footer dw-mod"> <div class="center-container top-container__center-container dw-mod"> <div class="grid"> @if (!string.IsNullOrEmpty(footerColumnOneContent) || !string.IsNullOrEmpty(footerColumnOneHeader)) { <div class="grid__col-md-auto"> <h4 class="footer__heading dw-mod">@footerColumnOneHeader</h4> <div class="footer__content dw-mod"> @footerColumnOneContent </div> </div> } @if (!string.IsNullOrEmpty(footerColumnTwoContent) || !string.IsNullOrEmpty(footerColumnTwoHeader)) { <div class="grid__col-md-auto"> <h4 class="footer__heading dw-mod">@footerColumnTwoHeader</h4> <div class="footer__content dw-mod"> @footerColumnTwoContent </div> </div> } @if (!string.IsNullOrEmpty(footerColumnThreeContent) || !string.IsNullOrEmpty(footerColumnThreeHeader)) { <div class="grid__col-md-auto"> <h4 class="footer__heading dw-mod">@footerColumnThreeHeader</h4> <div class="footer__content dw-mod"> @footerColumnThreeContent </div> </div> } @if (Model.Area.Item.GetBoolean("FooterNewsletterSignUp")) { <div class="grid__col-md-auto"> <h4 class="footer__heading dw-mod">@Translate("Mailing list", "Mailing list")</h4> <div class="footer__content dw-mod"> <p>@Translate("Sign up if you would like to receive occasional treats from us", "Sign up if you would like to receive occasional treats from us").</p> <form class="form dw-mod" name="NewsletterRedirect" action='/Default.aspx' method="get" enctype="multipart/form-data"> <input name="ID" id="ID" value="@newsletterSignUpPageId" type="hidden" /> <div class="form__field-combi"> <input name="NewsletterEmail" id="NewsletterEmail" type="text" placeholder='@Translate("Your email address", "Your email address")' /> <input class="btn btn--primary dw-mod" type="submit" id="Submitter" value='@Translate("Go", "Go")' /> </div> </form> </div> </div> } @if (Model.Area.Item.GetItems("FooterSocialLinks").Count > 0) { <div class="grid__col-md-auto"> <h4 class="footer__heading dw-mod">@Translate("Social links", "Social links")</h4> <div class="footer__content dw-mod"> <div class="collection dw-mod"> @foreach (var socialitem in Model.Area.Item.GetItems("FooterSocialLinks")) { //Fields.FirstOrDefault(x => x.SystemName == "Icon").GetString() var socialIcon = socialitem.GetValue("Icon") as Dynamicweb.Frontend.ListViewModel; string socialIconClass = socialIcon.SelectedValue; string socialIconTitle = socialIcon.SelectedName; string socialLink = socialitem.GetString("Link"); <a href="@socialLink" target="_blank" title="@socialIconTitle"><i class="fa @socialIconClass fa-2x"></i></a> } </div> </div> </div> } <div class="grid__col-12 footer__copyright dw-mod"> <p>@Model.Area.Item.GetString("FooterCopyrightText")</p> </div> </div> </div> </footer> } <!-- Javascript --> <script src="/Files/Templates/Designs/Rapido/js/handlebars-v4.0.11.js"></script> <script src="/Files/Templates/Designs/Rapido/js/master.min.js"></script> <script> Wireframe.Init(@wireframeMode.ToLower()); </script> </body> </html>