Error executing template "Designs/Rapido/_parsed/PageNoEcom.parsed.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
   at CompiledRazorTemplates.Dynamic.RazorEngine_5877aabcdd6a44dd9b9afcb850384610.Execute() in D:\dynamicweb.net\Solutions\Suneco\volandis.cloud.dynamicweb-cms.com\Files\Templates\Designs\Rapido\_parsed\PageNoEcom.parsed.cshtml:line 340
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader)
   at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<RunCompile>b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template)
   at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 2 3 @* Rapido version 2.0.1 *@ 4 5 @using Dynamicweb.Frontend.Devices 6 @using Dynamicweb.Extensibility 7 @using Dynamicweb.Content 8 @using Dynamicweb.Security; 9 @using System 10 @using System.Linq 11 @using System.Web 12 @using System.IO 13 14 @{ 15 //General settings 16 string favicon = Model.Area.Item.GetFile("LogoFavicon") != null ? Model.Area.Item.GetFile("LogoFavicon").Path : "/Files/Images/favicon.png"; 17 string logo = Model.Area.Item.GetFile("LogoImage") != null ? Model.Area.Item.GetFile("LogoImage").Path : "/Files/Images/logo-dynamicweb.png"; 18 if (Path.GetExtension(logo).ToLower() != ".svg") 19 { 20 logo = "/Admin/Public/GetImage.ashx?height=1&amp;crop=5&amp;Compression=75&amp;image=" + @logo; 21 } 22 bool megaMenu = Model.Area.Item.GetBoolean("NavigationMegaMenu"); 23 bool stickyMenu = Pageview.Device.ToString() == "Mobile" ? false : Model.Area.Item.GetBoolean("NavigationStickyMenu"); 24 string mobileNavigationLevels = Model.Area.Item.GetBoolean("MobileNavigationLevels") ? Model.Area.Item.GetString("MobileNavigationLevels") : "3"; 25 string searchPlaceholder = Translate("Search", "Search"); 26 string userSignedInError = !Model.LogOnFailed ? "" : "checked"; 27 string userSignedInErrorText; 28 29 switch (Model.LogOnFailedReason) 30 { 31 case Dynamicweb.Security.UserManagement.LogOnFailedReason.PasswordLengthInvalid: 32 userSignedInErrorText = Translate("Password length is invalid"); 33 break; 34 case Dynamicweb.Security.UserManagement.LogOnFailedReason.IncorrectLogin: 35 userSignedInErrorText = Translate("Invalid email or password"); 36 break; 37 case Dynamicweb.Security.UserManagement.LogOnFailedReason.ExceededFailedLogOnLimit: 38 userSignedInErrorText = Translate("You have exceeded the limit of allowed login attempts. The user account is temporarily locked"); 39 break; 40 case Dynamicweb.Security.UserManagement.LogOnFailedReason.LoginLocked: 41 userSignedInErrorText = Translate("The user account is temporarily locked"); 42 break; 43 case Dynamicweb.Security.UserManagement.LogOnFailedReason.PasswordExpired: 44 userSignedInErrorText = Translate("The password has expired and needs to be renewed"); 45 break; 46 default: 47 userSignedInErrorText = Translate("An unknown error occured"); 48 break; 49 } 50 string loggedIn = Model.CurrentUser != null ? "true" : "false"; 51 string wireframeMode = Model.Area.Item.GetBoolean("WireframeMode").ToString(); 52 53 //Font settings 54 string navigationFont = Model.Area.Item.GetItem("NavigationFont").GetGoogleFont("FontFamily").Family.Replace(" ", "+"); 55 string mobileNavigationFont = Model.Area.Item.GetItem("MobileNavigationFont").GetGoogleFont("FontFamily").Family.Replace(" ", "+"); 56 string headerFont = Model.Area.Item.GetItem("ContentLayoutHeaderFont").GetGoogleFont("FontFamily").Family.Replace(" ", "+"); 57 string subHeaderFont = Model.Area.Item.GetItem("ContentLayoutSubheaderFont").GetGoogleFont("FontFamily").Family.Replace(" ", "+"); 58 string contentFont = Model.Area.Item.GetItem("ContentLayoutBodyText").GetGoogleFont("FontFamily").Family.Replace(" ", "+"); 59 60 //Page IDs for use in the template 61 string firstPageId = Model.Area.FirstActivePage.ID.ToString(); 62 string areaId = Model.Area.ID.ToString(); 63 string autoCssLink = "/Files/Templates/Designs/Rapido/css/rapido/rapido_" + @areaId + ".min.css?ticks=" + Model.Area.UpdatedDate.Ticks; 64 int pageId = Model.TopPage.ID; 65 string newsletterSignUpPageId = GetPageIdByNavigationTag("NewsletterSignUp").ToString(); 66 string searchPageId = ""; 67 68 string stickyTop = stickyMenu ? "top-container--sticky" : ""; 69 string pagePos = stickyMenu ? "js-page-pos" : ""; 70 string topLayout = Model.Area.Item.GetList("LayoutTop").SelectedValue; 71 string megamenuPromotionImage = Model.Area.Item.GetFile("NavigationMegamenuPromotionImage") != null ? Model.Area.Item.GetFile("NavigationMegamenuPromotionImage").Path : ""; 72 bool renderPagesInToolBar = Model.Area.Item.GetBoolean("RenderPagesInToolBar"); 73 string toolbarText = Model.Area.Item.GetString("ToolbarText"); 74 75 string headerButtonText = Model.Area.Item.GetString("HeaderButtonText"); 76 string headerButtonLink = Model.Area.Item.GetString("HeaderButtonLink"); 77 78 string headerButtonType = "btn--link"; 79 } 80 81 @{ 82 switch (Model.Area.Item.GetList("HeaderButtonType").SelectedName) 83 { 84 case "Link": 85 headerButtonType = "btn--link"; 86 break; 87 case "Secondary": 88 headerButtonType = "btn--secondary"; 89 break; 90 default: 91 headerButtonType = "btn--primary"; 92 break; 93 } 94 } 95 <!DOCTYPE html> 96 97 <html> 98 <head> 99 <!-- Google Tag Manager --> 100 <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': 101 new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], 102 j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 103 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); 104 })(window,document,'script','dataLayer','GTM-54LQ9TG');</script> 105 <!-- End Google Tag Manager --> 106 107 <meta charset="utf-8" /> 108 <title>@Model.Title</title> 109 <meta name="viewport" content="width=device-width, initial-scale=1"> 110 111 <!-- Favicon --> 112 <link href="@favicon" rel="icon" type="image/png"> 113 114 <!-- Font awesome --> 115 <link rel="stylesheet" href="/Files/Templates/Designs/Rapido/css/rapido/font-awesome.min.css" type="text/css"> 116 117 <!-- Base (Default, wireframe) styles --> 118 <link rel="stylesheet" href="/Files/Templates/Designs/Rapido/css/base/base.min.css" type="text/css"> 119 120 <!-- Rapido Css from Website Settings --> 121 <link id="rapidoCss" rel="stylesheet" href="@autoCssLink" type="text/css"> 122 123 <!-- Ignite Css (Custom site specific styles) --> 124 <link id="igniteCss" type="text/css" href="/Files/Templates/Designs/Rapido/css/ignite/ignite.min.css" rel="stylesheet"> 125 126 <!-- Google fonts --> 127 @{ 128 var fonts = new string[5] { @navigationFont, @mobileNavigationFont, @headerFont, @subHeaderFont, @contentFont }; 129 var family = string.Join("%7C", fonts.Distinct().Select(x => string.Format("{0}:100,200,300,400,500,600,700,800,900", x))); 130 } 131 <link href="https://fonts.googleapis.com/css?family=@family" rel="stylesheet"> 132 </head> 133 134 <body> 135 <!-- Google Tag Manager (noscript) --> 136 <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-54LQ9TG" 137 height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> 138 <!-- End Google Tag Manager (noscript) --> 139 140 @MobileNavigation() 141 142 <main class="site dw-mod"> 143 <header class="top-container @stickyTop" id="Top"> 144 @if (renderPagesInToolBar) 145 { 146 <div class="tools-navigation dw-mod"> 147 <div class="center-container grid top-container__center-container dw-mod"> 148 <div class="grid__cell"> 149 <div class="u-pull--left u-margin-top">@toolbarText</div> 150 <div class="u-pull--right"> 151 @RenderNavigation(new 152 { 153 id = "topnavigation", 154 cssclass = "menu menu-tools dw-mod dwnavigation", 155 template = "TopMenu.xslt" 156 }) 157 </div> 158 </div> 159 </div> 160 </div> 161 } 162 163 164 @if (Pageview.Device.ToString() != "Mobile" && Pageview.Device.ToString() != "Tablet") 165 { 166 switch (topLayout) 167 { 168 case "condensed": //2 169 <!-- Main navigation --> 170 <nav class="main-navigation dw-mod"> 171 <div class="center-container top-container__center-container dw-mod"> 172 <div class="grid"> 173 174 <div class="grid__col-md-3 grid--align-self-center grid__col--bleed-y"> 175 <div class="logo u-padding--xs dw-mod"> 176 <a href="/Default.aspx?ID=@firstPageId"> 177 <img class="grid__cell-img" src="@logo" alt="@Translate("Logo")" /> 178 </a> 179 </div> 180 </div> 181 182 @* Navigation *@ 183 <div class="u-pull--left"> 184 @RenderHeaderNavigation() 185 </div> 186 187 <div class="grid__cell grid__cell--align-middle-right"> 188 <ul class="menu dw-mod u-pull--right"> 189 @RenderLanguageSelector() 190 </ul> 191 @if (!string.IsNullOrWhiteSpace(headerButtonLink)) { 192 <div class="u-pull--right"><a class="btn @headerButtonType dw-mod u-no-margin u-margin-left" href="@headerButtonLink">@headerButtonText</a></div> 193 } 194 </div> 195 </div> 196 </div> 197 </nav> 198 199 break; 200 case "minimal": //3 201 <!-- Main navigation --> 202 <nav class="main-navigation dw-mod"> 203 <div class="center-container top-container__center-container dw-mod"> 204 <div class="grid"> 205 206 <div class="grid__col-md-3 grid--align-self-center grid__col--bleed-y"> 207 <div class="logo u-padding--xs dw-mod"> 208 <a href="/Default.aspx?ID=@firstPageId"> 209 <img class="grid__cell-img" src="@logo" alt="@Translate("Logo")" /> 210 </a> 211 </div> 212 </div> 213 214 @* Navigation *@ 215 <div class="u-pull--left"> 216 @RenderHeaderNavigation() 217 </div> 218 219 <div class="grid__cell grid__cell--align-middle-right"> 220 <ul class="menu dw-mod u-pull--right"> 221 @RenderLanguageSelector() 222 </ul> 223 @if (!string.IsNullOrWhiteSpace(headerButtonLink)) { 224 <div class="u-pull--right"><a class="btn @headerButtonType dw-mod u-no-margin u-margin-left" href="@headerButtonLink">@headerButtonText</a></div> 225 } 226 </div> 227 </div> 228 </div> 229 </nav> 230 break; 231 case "splitted": //4 232 <!-- Header --> 233 <div class="header header-top dw-mod"> 234 <div class="center-container top-container__center-container dw-mod"> 235 <div class="grid"> 236 237 @* Logo *@ 238 <div class="grid__col-md-6 grid__col-sm-6 grid--align-self-center grid__col--bleed-y"> 239 <div class="grid__cell"> 240 <div class="logo u-max-w220px u-margin-top u-margin-bottom dw-mod"> 241 <a href="/Default.aspx?ID=@firstPageId"> 242 <img class="grid__cell-img" src="@logo" alt="@Translate("Logo")" /> 243 </a> 244 </div> 245 </div> 246 </div> 247 </div> 248 </div> 249 </div> 250 <!-- Main navigation --> 251 <nav class="main-navigation dw-mod"> 252 <div class="center-container top-container__center-container dw-mod"> 253 <div class="grid"> 254 <div class="u-pull--left"> 255 @RenderHeaderNavigation() 256 </div> 257 <div class="grid__cell grid__cell--align-middle-right"> 258 <ul class="menu dw-mod u-pull--right"> 259 @RenderLanguageSelector() 260 </ul> 261 @if (!string.IsNullOrWhiteSpace(headerButtonLink)) { 262 <div class="u-pull--right"><a class="btn @headerButtonType dw-mod u-no-margin u-margin-left" href="@headerButtonLink">@headerButtonText</a></div> 263 } 264 </div> 265 </div> 266 </div> 267 </nav> 268 269 break; 270 case "normal": //1 271 default: 272 <!-- Header --> 273 <div class="header header-top dw-mod"> 274 <div class="center-container top-container__center-container dw-mod"> 275 <div class="grid"> 276 277 @* Logo *@ 278 <div class="grid__col-md-3 grid__col-sm-3 grid__col-xs-12 grid--align-self-center grid__col--bleed-y"> 279 <div class="logo dw-mod"> 280 <a href="/Default.aspx?ID=@firstPageId"> 281 <img class="grid__cell-img" src="@logo" alt="@Translate("Logo")" /> 282 </a> 283 </div> 284 </div> 285 286 <div class="grid__col-md-4 grid__col-sm-4 grid__col-xs-12 grid__col--bleed-y grid--align-self-center"> 287 <div class="grid__cell grid__cell--align-middle-right"> 288 <ul class="menu dw-mod u-pull--right"> 289 @RenderLanguageSelector("outsideNavigation") 290 </ul> 291 292 @if (!string.IsNullOrWhiteSpace(headerButtonLink)) 293 { 294 <div class="u-pull--right"><a class="btn @headerButtonType dw-mod u-no-margin u-margin-left" href="@headerButtonLink">@headerButtonText</a></div> 295 } 296 </div> 297 </div> 298 </div> 299 </div> 300 </div> 301 302 <!-- Main navigation --> 303 <nav class="main-navigation dw-mod"> 304 <div class="center-container top-container__center-container dw-mod"> 305 <div class="grid"> 306 @RenderHeaderNavigation() 307 </div> 308 </div> 309 </nav> 310 311 break; 312 } 313 } 314 else 315 { 316 string style = (topLayout == "normal" || topLayout == "splitted" ? "main-navigation--top-style" : "main-navigation--nav-style"); 317 <!-- Main navigation --> 318 <nav class="main-navigation dw-mod @style"> 319 <div class="center-container top-container__center-container dw-mod"> 320 <div class="grid"> 321 @MobileNavigationTrigger() 322 323 <div class="logo u-max-w220px u-middle dw-mod"> 324 <a href="/Default.aspx?ID=@firstPageId"> 325 <img class="grid__cell-img u-w-100prc" src="@logo" alt="@Translate("Logo")" /> 326 </a> 327 </div> 328 </div> 329 </div> 330 </nav> 331 } 332 </header> 333 334 <!-- Render the content --> 335 <div id="Page" class="page @pagePos"> 336 <section class="center-container content-container dw-mod" id="content"> 337 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 338 339 340 @if (Model.PropertyItem.GetList("ShowBreadcrumb").SelectedValue == "True") 341 { 342 <div class="grid__col-12"> 343 @RenderNavigation(new 344 { 345 id = "breadcrumb", 346 template = "breadcrumb.xslt" 347 }) 348 </div> 349 } 350 351 <div class="grid"> 352 @if (Model.PropertyItem.GetList("LeftMenu").SelectedValue == "True") 353 { 354 var navigationMarkup = RenderNavigation(new 355 { 356 id = "leftnav", 357 cssclass = "menu dwnavigation", 358 startLevel = 2, 359 endlevel = 5, 360 template = "LeftNavigation.xslt" 361 }); 362 if (!string.IsNullOrEmpty(navigationMarkup)) 363 { 364 <nav class="grid__col-md-3 grid__col-sm-12 grid__col-xs-12 paragraph-container"> 365 <div class="grid__cell"> 366 @navigationMarkup 367 </div> 368 </nav> 369 } 370 } 371 <div class="grid__col-auto grid__col--bleed"> 372 <div class="grid"> 373 @Model.Placeholder("dwcontent", "content", "default:true;sort:1") 374 </div> 375 </div> 376 </div> 377 </section> 378 </div> 379 </main> 380 381 <!-- Footer section --> 382 @RenderFooter() 383 384 <!-- Helpers --> 385 @helper RenderLanguageSelector(string type = "inNavigation") 386 { 387 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"; 388 string menuLinkClass = type == "inNavigation" ? "menu__link" : "header-menu__link"; 389 390 @* Language selector *@ 391 if (Model.Languages.Count > 1) 392 { 393 <li class="@liClasses"> 394 <div class="@menuLinkClass u-w40px is-dropdown is-dropdown--no-icon dw-mod"> 395 <i class="fa fa-globe fa-1_5x"></i> 396 <div class="menu menu--dropdown u-w100px dw-mod"> 397 @foreach (var lang in Model.Languages) 398 { 399 <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> 400 } 401 </div> 402 </div> 403 </li> 404 } 405 } 406 <!-- Content rendering helpers --> 407 408 @helper MobileNavigation() 409 { 410 int pageId = Model.TopPage.ID; 411 string mobileNavigationLevels = Model.Area.Item.GetBoolean("MobileNavigationLevels") ? Model.Area.Item.GetString("MobileNavigationLevels") : "3"; 412 413 int miniCartFeedPageId = GetPageIdByNavigationTag("MiniCartFeed"); 414 int cartFeedPageId = GetPageIdByNavigationTag("CartOrderlinesFeed"); 415 416 bool renderPagesInToolBar = Model.Area.Item.GetBoolean("RenderPagesInToolBar"); 417 int startLevel = renderPagesInToolBar ? 1 : 0; 418 419 bool onlyPreview = Model.Area.Item.GetBoolean("OnlyPreviewForAnonymous") && Model.CurrentUser.ID == 0; 420 421 if (Pageview.Device.ToString() == "Mobile" || Pageview.Device.ToString() == "Tablet") 422 { 423 <!-- Trigger for mobile navigation --> 424 <input type="checkbox" id="MobileNavTrigger" class="mobile-nav-trigger" /> 425 426 <!-- Mobile navigation --> 427 <nav class="mobile-navigation dw-mod"> 428 429 @RenderNavigation(new 430 { 431 id = "mobilenavigation", 432 cssclass = "menu menu-mobile dwnavigation", 433 startLevel = @startLevel, 434 ecomStartLevel = @startLevel + 1, 435 endlevel = @mobileNavigationLevels, 436 expandmode = "all", 437 template = "BaseMenuForMobile.xslt" 438 }) 439 440 @if (Model.Area.Item.GetBoolean("RenderPagesInToolBar")) 441 { 442 @RenderNavigation(new 443 { 444 id = "topToolsMobileNavigation", 445 cssclass = "menu menu-mobile dwnavigation", 446 template = "ToolsMenuForMobile.xslt" 447 }) 448 } 449 450 <ul class="menu menu-mobile"> 451 @if (Model.Languages.Count > 0) 452 { 453 string selectedLanguage = ""; 454 foreach (var lang in Model.Languages) 455 { 456 if (lang.IsCurrent) 457 { 458 selectedLanguage = lang.Name; 459 } 460 } 461 462 <li class="menu-mobile__item dw-mod"> 463 <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> 464 <input id="MobileMenuCheck_Language" type="checkbox" class="expand-trigger"> 465 <label for="MobileMenuCheck_Language" class="menu-mobile__trigger"></label> 466 <ul class="menu-mobile menu-mobile__submenu expand-menu"> 467 @foreach (var lang in Model.Languages) 468 { 469 <li class="menu-mobile__item dw-mod"> 470 <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> 471 </li> 472 } 473 </ul> 474 </li> 475 } 476 </ul> 477 </nav> 478 <label class="mobile-nav-trigger-off" for="MobileNavTrigger"></label> 479 480 if (!onlyPreview) 481 { 482 <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> 483 } 484 } 485 } 486 487 @helper RenderHeaderNavigation() { 488 bool megaMenu = Model.Area.Item.GetList("NavigationMegaMenu").SelectedValue.ToLower() == "true" ? true : false; 489 string megamenuPromotionImage = Model.Area.Item.GetFile("NavigationMegamenuPromotionImage") != null ? Model.Area.Item.GetFile("NavigationMegamenuPromotionImage").Path : ""; 490 bool renderPagesInToolBar = Model.Area.Item.GetBoolean("RenderPagesInToolBar"); 491 int startLevel = renderPagesInToolBar ? 1 : 0; 492 493 if (Pageview.Device.ToString() != "Mobile" && Pageview.Device.ToString() != "Tablet") 494 { 495 if (!megaMenu) 496 { 497 @RenderNavigation(new 498 { 499 id = "topnavigation", 500 cssclass = "menu dw-mod dwnavigation", 501 startLevel = @startLevel, 502 ecomStartLevel = @startLevel+1, 503 endlevel = 5, 504 expandmode="all", 505 template = "BaseMenuWithDropdown.xslt" 506 }); 507 } 508 else 509 { 510 @RenderNavigation(new 511 { 512 id = "topnavigation", 513 cssclass = "menu dw-mod dwnavigation", 514 startLevel = @startLevel, 515 ecomStartLevel = @startLevel+1, 516 endlevel = 5, 517 promotionImage = megamenuPromotionImage, 518 promotionLink = Model.Area.Item.GetString("NavigationMegamenuPromotionLink"), 519 expandmode="all", 520 template = "BaseMegaMenu.xslt" 521 }); 522 } 523 } 524 } 525 526 @helper MobileNavigationTrigger() { 527 @* Mobile navigation trigger *@ 528 529 if (Pageview.Device.ToString() == "Mobile" || Pageview.Device.ToString() == "Tablet") 530 { 531 <div class="menu dw-mod u-pull--left"> 532 <div class="menu__item menu__item--horizontal menu__item--top-level dw-mod"> 533 <label for="MobileNavTrigger" class="mobile-nav-trigger-button menu__link dw-mod"></label> 534 </div> 535 </div> 536 } 537 } 538 539 @helper RenderFooter() { 540 string footerColumnOneContent = !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterColumnOne")) ? Model.Area.Item.GetString("FooterColumnOne") : ""; 541 string footerColumnTwoContent = !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterColumnTwo")) ? Model.Area.Item.GetString("FooterColumnTwo") : ""; 542 string footerColumnThreeContent = !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterColumnThree")) ? Model.Area.Item.GetString("FooterColumnThree") : ""; 543 string footerColumnOneHeader = Model.Area.Item.GetString("FooterColumnOneHeader"); 544 string footerColumnTwoHeader = Model.Area.Item.GetString("FooterColumnTwoHeader"); 545 string footerColumnThreeHeader = Model.Area.Item.GetString("FooterColumnThreeHeader"); 546 int newsletterSignUpPageId = GetPageIdByNavigationTag("NewsletterSignUp"); 547 548 <!-- Footer section --> 549 <footer class="footer dw-mod"> 550 <div class="center-container top-container__center-container dw-mod"> 551 <div class="grid"> 552 @if (!string.IsNullOrEmpty(footerColumnOneContent) || !string.IsNullOrEmpty(footerColumnOneHeader)) 553 { 554 <div class="grid__col-md-auto"> 555 <h4 class="footer__heading dw-mod">@footerColumnOneHeader</h4> 556 <div class="footer__content dw-mod"> 557 @footerColumnOneContent 558 </div> 559 </div> 560 } 561 @if (!string.IsNullOrEmpty(footerColumnTwoContent) || !string.IsNullOrEmpty(footerColumnTwoHeader)) 562 { 563 <div class="grid__col-md-auto"> 564 <h4 class="footer__heading dw-mod">@footerColumnTwoHeader</h4> 565 <div class="footer__content dw-mod"> 566 @footerColumnTwoContent 567 </div> 568 </div> 569 } 570 @if (!string.IsNullOrEmpty(footerColumnThreeContent) || !string.IsNullOrEmpty(footerColumnThreeHeader)) 571 { 572 <div class="grid__col-md-auto"> 573 <h4 class="footer__heading dw-mod">@footerColumnThreeHeader</h4> 574 <div class="footer__content dw-mod"> 575 @footerColumnThreeContent 576 </div> 577 </div> 578 } 579 @if (Model.Area.Item.GetBoolean("FooterNewsletterSignUp")) 580 { 581 <div class="grid__col-md-auto"> 582 <h4 class="footer__heading dw-mod">@Translate("Mailing list", "Mailing list")</h4> 583 <div class="footer__content dw-mod"> 584 <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> 585 <form class="form dw-mod" name="NewsletterRedirect" action='/Default.aspx' method="get" enctype="multipart/form-data"> 586 <input name="ID" id="ID" value="@newsletterSignUpPageId" type="hidden" /> 587 <div class="form__field-combi"> 588 <input name="NewsletterEmail" id="NewsletterEmail" type="text" placeholder='@Translate("Your email address", "Your email address")' /> 589 <input class="btn btn--primary dw-mod" type="submit" id="Submitter" value='@Translate("Go", "Go")' /> 590 </div> 591 </form> 592 </div> 593 </div> 594 } 595 @if (Model.Area.Item.GetItems("FooterSocialLinks").Count > 0) 596 { 597 <div class="grid__col-md-auto"> 598 <h4 class="footer__heading dw-mod">@Translate("Social links", "Social links")</h4> 599 <div class="footer__content dw-mod"> 600 <div class="collection dw-mod"> 601 @foreach (var socialitem in Model.Area.Item.GetItems("FooterSocialLinks")) 602 { 603 //Fields.FirstOrDefault(x => x.SystemName == "Icon").GetString() 604 var socialIcon = socialitem.GetValue("Icon") as Dynamicweb.Frontend.ListViewModel; 605 string socialIconClass = socialIcon.SelectedValue; 606 string socialIconTitle = socialIcon.SelectedName; 607 string socialLink = socialitem.GetString("Link"); 608 609 <a href="@socialLink" target="_blank" title="@socialIconTitle"><i class="fa @socialIconClass fa-2x"></i></a> 610 } 611 </div> 612 </div> 613 </div> 614 } 615 <div class="grid__col-12 footer__copyright dw-mod"> 616 <p>@Model.Area.Item.GetString("FooterCopyrightText")</p> 617 </div> 618 </div> 619 </div> 620 </footer> 621 } 622 623 <!-- Javascript --> 624 <script src="/Files/Templates/Designs/Rapido/js/handlebars-v4.0.11.js"></script> 625 <script src="/Files/Templates/Designs/Rapido/js/master.min.js"></script> 626 627 <script> 628 Wireframe.Init(@wireframeMode.ToLower()); 629 </script> 630 </body> 631 </html> 632 633