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_fb35a6a5324c44049e8212393182e849.Execute() in D:\Dynamicweb.net\Solutions\inextenzo\HollandControls.cloud.dynamicweb-cms.com\Files\Templates\Designs\Rapido\_parsed\PageNoEcom.parsed.cshtml:line 332
   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.b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   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=40&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 <meta charset="utf-8" /> 100 <title>@Model.TopPage.Name</title> 101 <meta name="viewport" content="width=device-width, initial-scale=1"> 102 103 <!-- Favicon --> 104 <link href="@favicon" rel="icon" type="image/png"> 105 106 <!-- Font awesome --> 107 <link rel="stylesheet" href="/Files/Templates/Designs/Rapido/css/rapido/font-awesome.min.css" type="text/css"> 108 109 <!-- Base (Default, wireframe) styles --> 110 <link rel="stylesheet" href="/Files/Templates/Designs/Rapido/css/base/base.min.css" type="text/css"> 111 112 <!-- Rapido Css from Website Settings --> 113 <link id="rapidoCss" rel="stylesheet" href="@autoCssLink" type="text/css"> 114 115 <!-- Ignite Css (Custom site specific styles) --> 116 <link id="igniteCss" type="text/css" href="/Files/Templates/Designs/Rapido/css/ignite/ignite.min.css" rel="stylesheet"> 117 118 <!-- Google fonts --> 119 @{ 120 var fonts = new string[5] { @navigationFont, @mobileNavigationFont, @headerFont, @subHeaderFont, @contentFont }; 121 var family = string.Join("%7C", fonts.Distinct().Select(x => string.Format("{0}:100,200,300,400,500,600,700,800,900", x))); 122 } 123 <link href="https://fonts.googleapis.com/css?family=@family" rel="stylesheet"> 124 </head> 125 126 <body> 127 @MobileNavigation() 128 <!-- Google Tag Manager --> 129 <!-- Google Tag Manager (noscript) --> 130 <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-KWCM694" 131 height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> 132 <!-- End Google Tag Manager (noscript) --> 133 134 <main class="site dw-mod"> 135 <header class="top-container @stickyTop" id="Top"> 136 @if (renderPagesInToolBar) 137 { 138 <div class="tools-navigation dw-mod"> 139 <div class="center-container grid top-container__center-container dw-mod"> 140 <div class="grid__cell"> 141 <div class="u-pull--left u-margin-top">@toolbarText</div> 142 <div class="u-pull--right"> 143 @RenderNavigation(new 144 { 145 id = "topnavigation", 146 cssclass = "menu menu-tools dw-mod dwnavigation", 147 template = "TopMenu.xslt" 148 }) 149 </div> 150 </div> 151 </div> 152 </div> 153 } 154 155 156 @if (Pageview.Device.ToString() != "Mobile" && Pageview.Device.ToString() != "Tablet") 157 { 158 switch (topLayout) 159 { 160 case "condensed": //2 161 <!-- Main navigation --> 162 <nav class="main-navigation dw-mod"> 163 <div class="center-container top-container__center-container dw-mod"> 164 <div class="grid"> 165 166 <div class="grid__col-md-3 grid--align-self-center grid__col--bleed-y"> 167 <div class="logo u-padding--xs dw-mod"> 168 <a href="/Default.aspx?ID=@firstPageId"> 169 <img class="grid__cell-img" src="@logo" alt="@Translate("Logo")" /> 170 </a> 171 </div> 172 </div> 173 174 @* Navigation *@ 175 <div class="u-pull--left"> 176 @RenderHeaderNavigation() 177 </div> 178 179 <div class="grid__cell grid__cell--align-middle-right"> 180 <ul class="menu dw-mod u-pull--right"> 181 @RenderLanguageSelector() 182 </ul> 183 @if (!string.IsNullOrWhiteSpace(headerButtonLink)) { 184 <div class="u-pull--right"><a class="btn @headerButtonType dw-mod u-no-margin u-margin-left" href="@headerButtonLink">@headerButtonText</a></div> 185 } 186 </div> 187 </div> 188 </div> 189 </nav> 190 191 break; 192 case "minimal": //3 193 <!-- Main navigation --> 194 <nav class="main-navigation dw-mod"> 195 <div class="center-container top-container__center-container dw-mod"> 196 <div class="grid"> 197 198 <div class="grid__col-md-3 grid--align-self-center grid__col--bleed-y"> 199 <div class="logo u-padding--xs dw-mod"> 200 <a href="/Default.aspx?ID=@firstPageId"> 201 <img class="grid__cell-img" src="@logo" alt="@Translate("Logo")" /> 202 </a> 203 </div> 204 </div> 205 206 @* Navigation *@ 207 <div class="u-pull--left"> 208 @RenderHeaderNavigation() 209 </div> 210 211 <div class="grid__cell grid__cell--align-middle-right"> 212 <ul class="menu dw-mod u-pull--right"> 213 @RenderLanguageSelector() 214 </ul> 215 @if (!string.IsNullOrWhiteSpace(headerButtonLink)) { 216 <div class="u-pull--right"><a class="btn @headerButtonType dw-mod u-no-margin u-margin-left" href="@headerButtonLink">@headerButtonText</a></div> 217 } 218 </div> 219 </div> 220 </div> 221 </nav> 222 break; 223 case "splitted": //4 224 <!-- Header --> 225 <div class="header header-top dw-mod"> 226 <div class="center-container top-container__center-container dw-mod hc_top"> 227 <div class="grid"> 228 229 @* Logo *@ 230 <div class="grid__col-md-6 grid__col-sm-6 grid--align-self-center grid__col--bleed-y"> 231 <div class="grid__cell"> 232 <div class="logo u-max-w220px u-margin-top u-margin-bottom dw-mod"> 233 <a href="/Default.aspx?ID=@firstPageId"> 234 <img class="grid__cell-img" src="@logo" alt="@Translate("Logo")" /> 235 </a> 236 </div> 237 </div> 238 </div> 239 </div> 240 </div> 241 </div> 242 <!-- Main navigation --> 243 <nav class="main-navigation dw-mod"> 244 <div class="center-container top-container__center-container dw-mod"> 245 <div class="grid"> 246 <div class="u-pull--left"> 247 @RenderHeaderNavigation() 248 </div> 249 <div class="grid__cell grid__cell--align-middle-right"> 250 <ul class="menu dw-mod u-pull--right"> 251 @RenderLanguageSelector() 252 </ul> 253 @if (!string.IsNullOrWhiteSpace(headerButtonLink)) { 254 <div class="u-pull--right"><a class="btn @headerButtonType dw-mod u-no-margin u-margin-left" href="@headerButtonLink">@headerButtonText</a></div> 255 } 256 </div> 257 </div> 258 </div> 259 </nav> 260 261 break; 262 case "normal": //1 263 default: 264 <!-- Header --> 265 <div class="header header-top dw-mod"> 266 <div class="center-container top-container__center-container dw-mod hc_top"> 267 <div class="grid"> 268 269 @* Logo *@ 270 <div class="grid__col-md-3 grid__col-sm-3 grid__col-xs-12 grid--align-self-center grid__col--bleed-y"> 271 <div class="logo dw-mod"> 272 <a href="/Default.aspx?ID=@firstPageId"> 273 <img class="grid__cell-img" src="@logo" alt="@Translate("Logo")" /> 274 </a> 275 </div> 276 </div> 277 278 <div class="grid__col-md-4 grid__col-sm-4 grid__col-xs-12 grid__col--bleed-y grid--align-self-center"> 279 <div class="grid__cell grid__cell--align-middle-right"> 280 <ul class="menu dw-mod u-pull--right"> 281 @RenderLanguageSelector("outsideNavigation") 282 </ul> 283 284 @if (!string.IsNullOrWhiteSpace(headerButtonLink)) 285 { 286 <div class="u-pull--right"><a class="btn @headerButtonType dw-mod u-no-margin u-margin-left" href="@headerButtonLink">@headerButtonText</a></div> 287 } 288 </div> 289 </div> 290 </div> 291 </div> 292 </div> 293 294 <!-- Main navigation --> 295 <nav class="main-navigation dw-mod"> 296 <div class="center-container top-container__center-container dw-mod"> 297 <div class="grid"> 298 @RenderHeaderNavigation() 299 </div> 300 </div> 301 </nav> 302 303 break; 304 } 305 } 306 else 307 { 308 string style = (topLayout == "normal" || topLayout == "splitted" ? "main-navigation--top-style" : "main-navigation--nav-style"); 309 <!-- Main navigation --> 310 <nav class="main-navigation dw-mod @style"> 311 <div class="center-container top-container__center-container dw-mod"> 312 <div class="grid"> 313 @MobileNavigationTrigger() 314 315 <div class="logo u-max-w220px u-middle dw-mod"> 316 <a href="/Default.aspx?ID=@firstPageId"> 317 <img class="grid__cell-img u-w220px" src="@logo" alt="@Translate("Logo")" /> 318 </a> 319 </div> 320 </div> 321 </div> 322 </nav> 323 } 324 </header> 325 326 <!-- Render the content --> 327 <div id="Page" class="page @pagePos"> 328 <section class="center-container content-container dw-mod" id="content"> 329 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 330 331 332 @if (Model.PropertyItem.GetList("ShowBreadcrumb").SelectedValue == "True") 333 { 334 <div class="grid__col-12"> 335 @RenderNavigation(new 336 { 337 id = "breadcrumb", 338 template = "breadcrumb.xslt" 339 }) 340 </div> 341 } 342 343 <div class="grid"> 344 @if (Model.PropertyItem.GetList("LeftMenu").SelectedValue == "True") 345 { 346 var navigationMarkup = RenderNavigation(new 347 { 348 id = "leftnav", 349 cssclass = "menu dwnavigation", 350 startLevel = 2, 351 endlevel = 5, 352 template = "LeftNavigation.xslt" 353 }); 354 if (!string.IsNullOrEmpty(navigationMarkup)) 355 { 356 <nav class="grid__col-md-3 grid__col-sm-12 grid__col-xs-12 paragraph-container"> 357 <div class="grid__cell"> 358 @navigationMarkup 359 </div> 360 </nav> 361 } 362 } 363 <div class="grid__col-auto grid__col--bleed"> 364 <div class="grid"> 365 @Model.Placeholder("dwcontent", "content", "default:true;sort:1") 366 </div> 367 </div> 368 </div> 369 </section> 370 </div> 371 </main> 372 373 <!-- Footer section --> 374 @RenderFooter() 375 376 <!-- Helpers --> 377 @helper RenderLanguageSelector(string type = "inNavigation") 378 { 379 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"; 380 string menuLinkClass = type == "inNavigation" ? "menu__link" : "header-menu__link"; 381 382 @* Language selector *@ 383 if (Model.Languages.Count > 1) 384 { 385 var pageService = new PageService(); 386 <li class="@liClasses"> 387 <div class="@menuLinkClass u-w40px is-dropdown is-dropdown--no-icon dw-mod"> 388 <i class="fa fa-globe fa-1_5x"></i> 389 <div class="menu menu--dropdown u-w100px dw-mod"> 390 @foreach (var lang in Model.Languages) 391 { 392 var pageId = lang.FirstActivePage.ID; 393 var langPage = pageService.GetPage(lang.Page.ID); 394 if (langPage.Active) 395 { 396 pageId = lang.Page.ID; 397 } 398 <a href="/Default.aspx?ID=@pageId" class="menu-dropdown__item menu-dropdown__item--link dw-mod">@lang.Name</a> 399 } 400 </div> 401 </div> 402 </li> 403 } 404 } 405 <!-- Content rendering helpers --> 406 407 @helper MobileNavigation() 408 { 409 int pageId = Model.TopPage.ID; 410 string mobileNavigationLevels = Model.Area.Item.GetBoolean("MobileNavigationLevels") ? Model.Area.Item.GetString("MobileNavigationLevels") : "3"; 411 412 int miniCartFeedPageId = GetPageIdByNavigationTag("MiniCartFeed"); 413 int cartFeedPageId = GetPageIdByNavigationTag("CartOrderlinesFeed"); 414 415 bool renderPagesInToolBar = Model.Area.Item.GetBoolean("RenderPagesInToolBar"); 416 int startLevel = renderPagesInToolBar ? 1 : 0; 417 418 bool onlyPreview = Model.Area.Item.GetBoolean("OnlyPreviewForAnonymous") && Model.CurrentUser.ID == 0; 419 420 if (Pageview.Device.ToString() == "Mobile" || Pageview.Device.ToString() == "Tablet") 421 { 422 <!-- Trigger for mobile navigation --> 423 <input type="checkbox" id="MobileNavTrigger" class="mobile-nav-trigger" /> 424 425 <!-- Mobile navigation --> 426 <nav class="mobile-navigation dw-mod"> 427 428 @RenderNavigation(new 429 { 430 id = "mobilenavigation", 431 cssclass = "menu menu-mobile dwnavigation", 432 startLevel = @startLevel, 433 ecomStartLevel = @startLevel + 1, 434 endlevel = @mobileNavigationLevels, 435 expandmode = "all", 436 template = "BaseMenuForMobile.xslt" 437 }) 438 439 @if (Model.Area.Item.GetBoolean("RenderPagesInToolBar")) 440 { 441 @RenderNavigation(new 442 { 443 id = "topToolsMobileNavigation", 444 cssclass = "menu menu-mobile dwnavigation", 445 template = "ToolsMenuForMobile.xslt" 446 }) 447 } 448 449 <ul class="menu menu-mobile"> 450 @if (Model.Languages.Count > 1) 451 { 452 string selectedLanguage = ""; 453 foreach (var lang in Model.Languages) 454 { 455 if (lang.IsCurrent) 456 { 457 selectedLanguage = lang.Name; 458 } 459 } 460 461 <li class="menu-mobile__item dw-mod"> 462 <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> 463 <input id="MobileMenuCheck_Language" type="checkbox" class="expand-trigger"> 464 <label for="MobileMenuCheck_Language" class="menu-mobile__trigger"></label> 465 <ul class="menu-mobile menu-mobile__submenu expand-menu"> 466 @foreach (var lang in Model.Languages) 467 { 468 <li class="menu-mobile__item dw-mod"> 469 <a class="menu-mobile__link menu-mobile__link--highlighted dw-mod menu-mobile__link--level-1" href="/Default.aspx?ID=@lang.Page.ID">@lang.Name</a> <!-- &CurrencyCode=@Dynamicweb.Services.Areas.GetArea(lang.ID).EcomCurrencyId --> 470 </li> 471 } 472 </ul> 473 </li> 474 } 475 </ul> 476 </nav> 477 <label class="mobile-nav-trigger-off" for="MobileNavTrigger"></label> 478 479 if (!onlyPreview) 480 { 481 <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> 482 } 483 } 484 } 485 486 @helper RenderHeaderNavigation() { 487 bool megaMenu = Model.Area.Item.GetList("NavigationMegaMenu").SelectedValue.ToLower() == "true" ? true : false; 488 string megamenuPromotionImage = Model.Area.Item.GetFile("NavigationMegamenuPromotionImage") != null ? Model.Area.Item.GetFile("NavigationMegamenuPromotionImage").Path : ""; 489 bool renderPagesInToolBar = Model.Area.Item.GetBoolean("RenderPagesInToolBar"); 490 int startLevel = renderPagesInToolBar ? 1 : 0; 491 492 if (Pageview.Device.ToString() != "Mobile" && Pageview.Device.ToString() != "Tablet") 493 { 494 if (!megaMenu) 495 { 496 @RenderNavigation(new 497 { 498 id = "topnavigation", 499 cssclass = "menu dw-mod dwnavigation", 500 startLevel = @startLevel, 501 ecomStartLevel = @startLevel+1, 502 endlevel = 5, 503 expandmode="all", 504 template = "BaseMenuWithDropdown.xslt" 505 }); 506 } 507 else 508 { 509 @RenderNavigation(new 510 { 511 id = "topnavigation", 512 cssclass = "menu dw-mod dwnavigation", 513 startLevel = @startLevel, 514 ecomStartLevel = @startLevel+1, 515 endlevel = 5, 516 promotionImage = megamenuPromotionImage, 517 promotionLink = Model.Area.Item.GetString("NavigationMegamenuPromotionLink"), 518 expandmode="all", 519 template = "BaseMegaMenu.xslt" 520 }); 521 } 522 } 523 } 524 525 @helper MobileNavigationTrigger() { 526 @* Mobile navigation trigger *@ 527 528 if (Pageview.Device.ToString() == "Mobile" || Pageview.Device.ToString() == "Tablet") 529 { 530 <div class="menu dw-mod u-pull--left"> 531 <div class="menu__item menu__item--horizontal menu__item--top-level dw-mod"> 532 <label for="MobileNavTrigger" class="mobile-nav-trigger-button menu__link dw-mod"></label> 533 </div> 534 </div> 535 } 536 } 537 538 @helper RenderFooter() { 539 string footerColumnOneContent = !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterColumnOne")) ? Model.Area.Item.GetString("FooterColumnOne") : ""; 540 string footerColumnTwoContent = !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterColumnTwo")) ? Model.Area.Item.GetString("FooterColumnTwo") : ""; 541 string footerColumnThreeContent = !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterColumnThree")) ? Model.Area.Item.GetString("FooterColumnThree") : ""; 542 string footerColumnOneHeader = Model.Area.Item.GetString("FooterColumnOneHeader"); 543 string footerColumnTwoHeader = Model.Area.Item.GetString("FooterColumnTwoHeader"); 544 string footerColumnThreeHeader = Model.Area.Item.GetString("FooterColumnThreeHeader"); 545 int newsletterSignUpPageId = GetPageIdByNavigationTag("NewsletterSignUp"); 546 547 <!-- Footer section --> 548 <footer class="footer dw-mod"> 549 <div class="center-container top-container__center-container dw-mod"> 550 <div class="grid"> 551 @if (!string.IsNullOrEmpty(footerColumnOneContent) || !string.IsNullOrEmpty(footerColumnOneHeader)) 552 { 553 <div class="grid__col-md-auto"> 554 <h4 class="footer__heading dw-mod">@footerColumnOneHeader</h4> 555 <div class="footer__content dw-mod"> 556 @footerColumnOneContent 557 </div> 558 </div> 559 } 560 @if (!string.IsNullOrEmpty(footerColumnTwoContent) || !string.IsNullOrEmpty(footerColumnTwoHeader)) 561 { 562 <div class="grid__col-md-auto"> 563 <h4 class="footer__heading dw-mod">@footerColumnTwoHeader</h4> 564 <div class="footer__content dw-mod"> 565 @footerColumnTwoContent 566 </div> 567 </div> 568 } 569 @if (!string.IsNullOrEmpty(footerColumnThreeContent) || !string.IsNullOrEmpty(footerColumnThreeHeader)) 570 { 571 <div class="grid__col-md-auto"> 572 <h4 class="footer__heading dw-mod">@footerColumnThreeHeader</h4> 573 <div class="footer__content dw-mod"> 574 @footerColumnThreeContent 575 </div> 576 </div> 577 } 578 @if (Model.Area.Item.GetBoolean("FooterNewsletterSignUp")) 579 { 580 <div class="grid__col-md-auto"> 581 <h4 class="footer__heading dw-mod">@Translate("Mailing list", "Mailing list")</h4> 582 <div class="footer__content dw-mod"> 583 <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> 584 <form class="form dw-mod" name="NewsletterRedirect" action='/Default.aspx' method="get" enctype="multipart/form-data"> 585 <input name="ID" id="ID" value="@newsletterSignUpPageId" type="hidden" /> 586 <div class="form__field-combi"> 587 <input name="NewsletterEmail" id="NewsletterEmail" type="text" placeholder='@Translate("Your email address", "Your email address")' /> 588 <input class="btn btn--primary dw-mod" type="submit" id="Submitter" value='@Translate("Go", "Go")' /> 589 </div> 590 </form> 591 </div> 592 </div> 593 } 594 @if (Model.Area.Item.GetItems("FooterSocialLinks").Count > 0) 595 { 596 <div class="grid__col-md-auto"> 597 <h4 class="footer__heading dw-mod">@Translate("Social links", "Social links")</h4> 598 <div class="footer__content dw-mod"> 599 <div class="collection dw-mod"> 600 @foreach (var socialitem in Model.Area.Item.GetItems("FooterSocialLinks")) 601 { 602 //Fields.FirstOrDefault(x => x.SystemName == "Icon").GetString() 603 var socialIcon = socialitem.GetValue("Icon") as Dynamicweb.Frontend.ListViewModel; 604 string socialIconClass = socialIcon.SelectedValue; 605 string socialIconTitle = socialIcon.SelectedName; 606 string socialLink = socialitem.GetString("Link"); 607 608 <a href="@socialLink" target="_blank" title="@socialIconTitle"><i class="fa @socialIconClass fa-2x"></i></a> 609 } 610 </div> 611 </div> 612 </div> 613 } 614 <div class="grid__col-12 footer__copyright dw-mod"> 615 <p>@Model.Area.Item.GetString("FooterCopyrightText")</p> 616 </div> 617 </div> 618 </div> 619 </footer> 620 } 621 622 <!-- Javascript --> 623 <script src="/Files/Templates/Designs/Rapido/js/handlebars-v4.0.11.js"></script> 624 <script src="/Files/Templates/Designs/Rapido/js/master.min.js"></script> 625 626 @if (Model.Area.Item.GetBoolean("UseCustomJavascript")) 627 { 628 <script src="/Files/Templates/Designs/Rapido/js/custom.min.js"></script> 629 } 630 631 <script> 632 Wireframe.Init(@wireframeMode.ToLower()); 633 </script> 634 </body> 635 </html> 636 637