Error executing template "Designs/Rapido/_parsed/Page.parsed.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
   at CompiledRazorTemplates.Dynamic.RazorEngine_91c7f057caf64d92b9e57d0adfa0c5d1.Execute() in F:\DWWEBSITE\TAFWEB\Solutions\Files\Templates\Designs\Rapido\_parsed\Page.parsed.cshtml:line 396
   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 @using Dynamicweb.Frontend.Devices 4 @using Dynamicweb.Extensibility 5 @using Dynamicweb.Content 6 @using Dynamicweb.Security; 7 @using System 8 @using System.Web 9 10 @{ 11 //General settings 12 string favicon = Model.Area.Item.GetFile("LogoFavicon") != null ? Model.Area.Item.GetFile("LogoFavicon").Path : "/Files/Images/favicon.png"; 13 string logo = Model.Area.Item.GetFile("LogoImage") != null ? Model.Area.Item.GetFile("LogoImage").Path : "/Files/Images/logo-dynamicweb.png"; 14 string logoWhite = Model.Area.Item.GetFile("LogoImageWhite") != null ? Model.Area.Item.GetFile("LogoImageWhite").Path : "/Files/Images/DWLogo.png"; 15 bool megaMenu = Model.Area.Item.GetList("NavigationMegaMenu").SelectedValue.ToLower() == "true" ? true : false; 16 bool stickyMenu = Pageview.Device.ToString() == "Mobile" ? false : Model.Area.Item.GetBoolean("NavigationStickyMenu"); 17 string mobileNavigationLevels = Model.Area.Item.GetBoolean("MobileNavigationLevels") ? Model.Area.Item.GetString("MobileNavigationLevels") : "3"; 18 string footerColumnOneContent = !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterColumnOne")) ? Model.Area.Item.GetString("FooterColumnOne") : ""; 19 string footerColumnTwoContent = !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterColumnTwo")) ? Model.Area.Item.GetString("FooterColumnTwo") : ""; 20 string searchPlaceholder = Translate("Search products", "Search products"); 21 string userSignedInError = !Model.LogOnFailed ? "" : "checked"; 22 string userSignedInErrorText = ""; 23 if (Model.LogOnFailed) { 24 switch (Model.LogOnFailedReason) 25 { 26 case Dynamicweb.Security.UserManagement.LogOnFailedReason.PasswordLengthInvalid: 27 userSignedInErrorText = Translate("Password length is invalid","Password length is invalid"); 28 break; 29 case Dynamicweb.Security.UserManagement.LogOnFailedReason.IncorrectLogin: 30 userSignedInErrorText = Translate("Invalid email or password","Invalid email or password"); 31 break; 32 case Dynamicweb.Security.UserManagement.LogOnFailedReason.ExceededFailedLogOnLimit: 33 userSignedInErrorText = Translate("You have exceeded the limit of allowed login attempts. The user account is temporarily locked","You have exceeded the limit of allowed login attempts. The user account is temporarily locked"); 34 break; 35 case Dynamicweb.Security.UserManagement.LogOnFailedReason.LoginLocked: 36 userSignedInErrorText = Translate("The user account is temporarily locked","The user account is temporarily locked"); 37 break; 38 case Dynamicweb.Security.UserManagement.LogOnFailedReason.PasswordExpired: 39 userSignedInErrorText = Translate("The password has expired and needs to be renewed","The password has expired and needs to be renewed"); 40 break; 41 default: 42 userSignedInErrorText = Translate("An unknown error occured","An unknown error occured"); 43 break; 44 } 45 } 46 string loggedIn = Model.CurrentUser.ID > 0 ? "true" : "false"; 47 double cartProductsCount = Model.Cart.TotalProductsCount; 48 string wireframeMode = Model.Area.Item.GetBoolean("WireframeMode").ToString(); 49 50 //Font settings 51 string navigationFont = Model.Area.Item.GetItem("NavigationFont").GetString("FontFamily").Replace(" ", "+"); 52 string mobileNavigationFont = Model.Area.Item.GetItem("MobileNavigationFont").GetString("FontFamily").Replace(" ", "+"); 53 string headerFont = Model.Area.Item.GetItem("ContentLayoutHeaderFont").GetString("FontFamily").Replace(" ", "+"); 54 string subHeaderFont = Model.Area.Item.GetItem("ContentLayoutSubheaderFont").GetString("FontFamily").Replace(" ", "+"); 55 string contentFont = Model.Area.Item.GetItem("ContentLayoutBodyText").GetString("FontFamily").Replace(" ", "+"); 56 57 //Page IDs for use in the template 58 string firstPageId = Model.Area.FirstActivePage.ID.ToString(); 59 string areaId = Model.Area.ID.ToString(); 60 string autoCssLink = "/Files/Templates/Designs/Rapido/css/rapido/rapido_" + areaId + ".min.css"; 61 int pageId = Model.TopPage.ID; 62 string currentUserId = Model.CurrentUser.ID > 0 ? Model.CurrentUser.ID.ToString() : ""; 63 int cartPageId = GetPageIdByNavigationTag("CartPage"); 64 int miniCartFeedPageId = GetPageIdByNavigationTag("MiniCartFeed"); 65 int cartFeedPageId = GetPageIdByNavigationTag("CartOrderlinesFeed"); 66 int productsPageId = GetPageIdByNavigationTag("ProductsPage"); 67 int productSearchPageId = GetPageIdByNavigationTag("ProductSearchFeed"); 68 int productGroupsPageId = GetPageIdByNavigationTag("ProductGroupsFeed"); 69 string myProfilePageId = (Model.CurrentUser.ID <= 0) ? GetPageIdByNavigationTag("SignInProfile").ToString() : GetPageIdByNavigationTag("CustomerProfile").ToString(); 70 string myOrdersPageId = (Model.CurrentUser.ID <= 0) ? GetPageIdByNavigationTag("SignInOrders").ToString() : GetPageIdByNavigationTag("CustomerOrders").ToString(); 71 string myFavoritesPageId = (Model.CurrentUser.ID <= 0) ? GetPageIdByNavigationTag("SignInFavorites").ToString() : GetPageIdByNavigationTag("CustomerFavorites").ToString(); 72 int createAccountPageId = GetPageIdByNavigationTag("CreateAccount"); 73 int signInProfilePageId = GetPageIdByNavigationTag("SignInProfile"); 74 string forgotPasswordPageId = signInProfilePageId.ToString() + "&LoginAction=Recovery"; 75 int myDashboardPageId = GetPageIdByNavigationTag("CustomerDashboard"); 76 int newsletterSignUpPageId = GetPageIdByNavigationTag("NewsletterSignUp"); 77 int createCommentPageId = GetPageIdByNavigationTag("CreateComment"); 78 int commentPageId = GetPageIdByNavigationTag("Comments"); 79 int ImpersonationPageId = GetPageIdByNavigationTag("Impersonation"); 80 81 82 string stickyTop = stickyMenu ? "top-container--sticky" : ""; 83 string pagePos = stickyMenu ? "js-page-pos" : ""; 84 string topLayout = Model.Area.Item.GetList("LayoutTop").SelectedValue; 85 string announcementBarText = Model.Area.Item.GetString("AnnouncementBarText"); 86 87 string megamenuPromotionImage = Model.Area.Item.GetFile("NavigationMegamenuPromotionImage") != null ? Model.Area.Item.GetFile("NavigationMegamenuPromotionImage").Path : ""; 88 } 89 <!DOCTYPE html> 90 91 <html> 92 <head> 93 <meta charset="utf-8" /> 94 <title>@Model.TopPage.Name</title> 95 <meta name="viewport" content="width=device-width, initial-scale=1"> 96 97 <!-- Slick Carousel --> 98 <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.min.css" /> 99 <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick-theme.min.css" /> 100 101 <!-- Favicon --> 102 <link href="@favicon" rel="icon" type="image/png"> 103 104 <script type="text/javascript" src="//script.crazyegg.com/pages/scripts/0089/8333.js" async="async"></script> 105 106 <!-- Font awesome --> 107 <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" type="text/css"> 108 109 <!-- Bootstrap --> 110 <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" crossorigin="anonymous"> 111 <!-- Base (Default, wireframe) styles --> 112 <link rel="stylesheet" href="/Files/Templates/Designs/Rapido/css/base/base.css" type="text/css"> 113 114 <!-- Rapido Css from Website Settings --> 115 <link id="rapidoCss" rel="stylesheet" href="@autoCssLink" type="text/css"> 116 117 <!-- Ignite Css (Custom site specific styles) --> 118 <link id="igniteCss" type="text/css" href="/Files/Templates/Designs/Rapido/css/ignite/ignite.min.css" rel="stylesheet"> 119 <link id="igniteCss" type="text/css" href="/Files/Templates/Designs/Rapido/css/ignite/ignite.css" rel="stylesheet"> 120 <!-- Custom CSS (Css provided by the client) --> 121 <link type="text/css" href="/Files/Templates/Designs/Rapido/css/ignite/main.css?ver=1.1" rel="stylesheet"> 122 123 <!-- Google fonts --> 124 <link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=@navigationFont:100,200,300,400,500,600,700,800,900"> 125 <link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=@mobileNavigationFont:100,200,300,400,500,600,700,800,900"> 126 <link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=@headerFont:100,200,300,400,500,600,700,800,900"> 127 <link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=@subHeaderFont:100,200,300,400,500,600,700,800,900"> 128 <link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=@contentFont:100,200,300,400,500,600,700,800,900"> 129 <link type="text/css" href="https://fonts.googleapis.com/css?family=Muli:400,800" rel="stylesheet"> 130 131 <!-- Select2 --> 132 <link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.4/css/select2.min.css" rel="stylesheet" /> 133 <!-- Analytics code --> 134 @{ 135 String googleTrackingId = Model.Area.Item.GetString("GoogleTracking_ID").ToString(); 136 int userID = Model.CurrentUser.ID; 137 } 138 139 @if (!string.IsNullOrWhiteSpace(googleTrackingId)) 140 { 141 <script type="text/javascript"> 142 (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ 143 (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), 144 m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) 145 })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); 146 147 ga('create', '@googleTrackingId', 'auto'); 148 ga('set', 'userId', '@userID'); // Set the user ID using signed-in user_id. 149 ga('require','ecommerce','ecommerce.js'); 150 ga('send', 'pageview'); 151 </script> 152 } 153 154 <!-- Analytics code --> 155 156 </head> 157 158 <body> 159 <!-- Pop Up--> 160 <div id="burn" onclick="closeBurn()"> 161 <div id="burnPopup"> 162 <div id="burnClose" class="pull-right"> 163 <a onclick="closeBurn()"><i class="fa fa-times" aria-hidden="true"></i></a> 164 </div> 165 <div id="burnBody" class="text-center"> 166 <div id="burnTitle" class=""> 167 168 </div> 169 <div id="burnText" class=""> 170 171 </div> 172 <div id="burnButton" class=""> 173 <a class=""></a> 174 </div> 175 </div> 176 </div> 177 </div> 178 <!-- Pop Up--> 179 180 <main class="site dw-mod"> 181 @*Custom Header*@ 182 183 <div class="bg-purple free-delivery"> 184 <div class="container py-4"> 185 <p class="m-0 text-center">@announcementBarText</p> 186 </div> 187 <span class="free-delivery-close">x</span> 188 </div> 189 190 @{ 191 bool isMobile = Pageview.Device.ToString() == "Mobile" ? true : false; 192 } 193 <header class="custom-header"> 194 195 <div class="container pt-3 pb-3 navigation"> 196 <div class="row"> 197 <div class="col-12 col-sm-12 col-md-12 col-lg-3" style="max-height:112px!important"> 198 <a class="logo" href="Default.aspx?ID=@firstPageId"> 199 <img src="/Admin/Public/GetImage.ashx?width=300&height=92&crop=1&Compression=100&image=@logoWhite" class="img-fluid" alt="logo"> 200 </a> 201 </div> 202 <div class="col-12 col-sm-12 col-md-12 col-lg-9 text-right navigation-right"> 203 <div> 204 <ul class="header-buttons clearfix pt-4 mb-4"> 205 <li class="d-inline-block px-5"> 206 <div class="menu__link is-dropdown is-dropdown--no-icon search-button"> 207 <i class="fa fa-search"></i> 208 <div class="menu menu--dropdown u-w340px top-micro-search"> 209 <div class="typeahead js-typeahead" data-page-size="10" id="ProductSearchBar" data-search-page-id="@productSearchPageId" data-result-page-id="@productsPageId" data-groups-page-id="@productGroupsPageId"> 210 <div class="typeahead-search-field"> 211 <input type="text" class="u-no-margin u-full-width js-typeahead-search-field" placeholder="@searchPlaceholder"> 212 <ul class="dropdown dropdown--absolute-position u-full-width js-ajax-container js-typeahead-search-content" id="ProductSearchBarContent" data-template="SearchContentTemplate" data-no-result-template="SearchEmpty" data-json-feed="/Default.aspx?ID=@productSearchPageId&LayoutTemplate=Json.cshtml&DisableStatistics=True&feedType=productsOnly" data-init-onload="false"></ul> 213 </div> 214 </div> 215 </div> 216 </div> 217 </li> 218 @if (loggedIn == "true") 219 { 220 <li class="d-inline-block px-5 "> 221 <a href="/Default.aspx?ID=@myFavoritesPageId" class="menu__link "> 222 <i class="fa fa-heart-o"></i> 223 </a> 224 </li> 225 } 226 227 <li class=" d-inline-block px-5"> 228 <div class="mini-cart "> 229 @if(isMobile){ 230 <a href="javascript:void(0)" class="menu__link dw-mod js-mini-cart-button" onmouseover="Cart.UpdateMiniCart(event, 'miniCart', '/Default.aspx?ID=@miniCartFeedPageId&feedType=MiniCart')" style="cursor:pointer;"> 231 <i class="fa fa-shopping-bag"></i> 232 <div class="mini-cart__counter mini-cart__counter--inline "> 233 <div class="js-ajax-container js-mini-cart-counter" id="cartCounter" data-template="MiniCartCounterContent" data-json-feed="/Default.aspx?ID=@miniCartFeedPageId&feedType=Counter" data-init-onload="false" data-preloader="false"> 234 <div class="js-mini-cart-counter-content"> 235 @cartProductsCount 236 </div> 237 </div> 238 </div> 239 </a> 240 }else{ 241 if(loggedIn == "true") 242 { 243 <a href="/Default.aspx?ID=@cartPageId&Purge=True" class="menu__link dw-mod js-mini-cart-button" onmouseover="Cart.UpdateMiniCart(event, 'miniCart', '/Default.aspx?ID=@miniCartFeedPageId&feedType=MiniCart')" style="cursor:pointer;"> 244 <i class="fa fa-shopping-bag"></i> 245 <div class="mini-cart__counter mini-cart__counter--inline "> 246 <div class="js-ajax-container js-mini-cart-counter" id="cartCounter" data-template="MiniCartCounterContent" data-json-feed="/Default.aspx?ID=@miniCartFeedPageId&feedType=Counter" data-init-onload="false" data-preloader="false"> 247 <div class="js-mini-cart-counter-content"> 248 @cartProductsCount 249 </div> 250 </div> 251 </div> 252 </a> 253 } 254 else 255 { 256 <a href="/Default.aspx?ID=@signInProfilePageId&Purge=True" class="menu__link dw-mod js-mini-cart-button" onmouseover="Cart.UpdateMiniCart(event, 'miniCart', '/Default.aspx?ID=@miniCartFeedPageId&feedType=MiniCart')" style="cursor:pointer;"> 257 <i class="fa fa-shopping-bag"></i> 258 <div class="mini-cart__counter mini-cart__counter--inline "> 259 <div class="js-ajax-container js-mini-cart-counter" id="cartCounter" data-template="MiniCartCounterContent" data-json-feed="/Default.aspx?ID=@miniCartFeedPageId&feedType=Counter" data-init-onload="false" data-preloader="false"> 260 <div class="js-mini-cart-counter-content"> 261 @cartProductsCount 262 </div> 263 </div> 264 </div> 265 </a> 266 } 267 } 268 <div class="mini-cart-dropdown js-ajax-container 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> 269 </div> 270 </li> 271 272 <li class="d-inline-block px-5" style="padding-right: 0px !important;"> 273 <div class="header-menu__link is-dropdown is-dropdown--no-icon"> 274 275 @if (loggedIn == "false") 276 277 { 278 <a href="/default.aspx?ID=@signInProfilePageId" class="u-color-inherit"><i class="fa fa-user u-color-inherit"></i> <small>LOGIN</small></a> 279 280 281 } 282 else 283 { 284 <a href="/default.aspx?ID=@myProfilePageId" class="u-color-inherit"><i class="fa fa-user u-color-inherit"></i> @Model.CurrentUser.Name </a> 285 286 } 287 288 <div class="menu menu--dropdown sign-in-dropdown u-w160px"> 289 <div class="menu-dropdown__item"> 290 <ul class="list list--clean"> 291 @if (loggedIn == "true") 292 { 293 <li class="list__seperator"></li> 294 <li> 295 <a href="/Admin/Public/ExtranetLogoff.aspx?ID=12" class="list__link">@Translate("Sign out")</a> 296 </li> 297 }else{ 298 <li class="list__seperator"></li> 299 <li> 300 <a href="/Default.aspx?id=@createAccountPageId" class="list__link">@Translate("Register")</a> 301 </li> 302 } 303 </ul> 304 </div> 305 </div> 306 </div> 307 </li> 308 </ul> 309 <nav class="navbar navbar-expand-lg navbar-light p-0"> 310 311 <button aria-controls="menu" aria-expanded="false" aria-label="Toggle navigation" class="navbar-toggler ml-auto" data-target="#menu" data-toggle="collapse" type="button"><span class="navbar-toggler-icon"><i class="fa fa-bars" aria-hidden="true"></i></span></button> 312 <div class="collapse navbar-collapse custom-nav" id="menu"> 313 314 315 @if (!megaMenu) 316 { 317 @RenderNavigation(new 318 { 319 id = "topnavigation", 320 cssclass = "menu dw-mod dwnavigation", 321 startLevel = 1, 322 endlevel = 3, 323 expandmode = "All", 324 template = "BaseMenuWithDropdown.xslt" 325 }); 326 } 327 else 328 { 329 @RenderNavigation(new 330 { 331 id = "topnavigation", 332 cssclass = "menu dw-mod dwnavigation", 333 startLevel = 1, 334 endlevel = 1, 335 promotionImage = megamenuPromotionImage, 336 promotionLink = Model.Area.Item.GetString("NavigationMegamenuPromotionLink"), 337 template = "BaseMegaMenu.xslt" 338 }); 339 } 340 341 342 </div> 343 </nav> 344 </div> 345 </div> 346 </div> 347 <div class="clearfix"></div> 348 349 </div> 350 </header> 351 352 @* End Custom Header*@ 353 354 <!-- Floating mini cart --> 355 @if (!stickyMenu && pageId == productsPageId) 356 { 357 <div class="floating-mini-cart u-hidden" id="FloatingMiniCart"> 358 <div class="mini-cart"> 359 if(loggedIn =="true") 360 { 361 <a href="/Default.aspx?ID=@cartPageId" class="menu-tools__link menu__link--condensed dw-mod js-mini-cart-button" onclick="Cart.UpdateMiniCart(event, 'SecondaryMiniCart', '/Default.aspx?ID=@miniCartFeedPageId&feedType=MiniCart')"> 362 <i class="fa fa-shopping-cart fa-4x"></i> 363 <div class="mini-cart__counter mini-cart__counter--lg dw-mod"> 364 <div class="js-ajax-container js-mini-cart-counter" id="FloatingCartCounter" data-template="MiniCartCounterContent" data-json-feed="/Default.aspx?ID=@miniCartFeedPageId&feedType=Counter" data-preloader="false" data-init-onload="false"> 365 <div class="js-mini-cart-counter-content"> 366 @cartProductsCount 367 </div> 368 </div> 369 </div> 370 </a> 371 } 372 else 373 { 374 <a href="/Default.aspx?ID=@signInProfilePageId" class="menu-tools__link menu__link--condensed dw-mod js-mini-cart-button" onclick="Cart.UpdateMiniCart(event, 'SecondaryMiniCart', '/Default.aspx?ID=@miniCartFeedPageId&feedType=MiniCart')"> 375 <i class="fa fa-shopping-cart fa-4x"></i> 376 <div class="mini-cart__counter mini-cart__counter--lg dw-mod"> 377 <div class="js-ajax-container js-mini-cart-counter" id="FloatingCartCounter" data-template="MiniCartCounterContent" data-json-feed="/Default.aspx?ID=@miniCartFeedPageId&feedType=Counter" data-preloader="false" data-init-onload="false"> 378 <div class="js-mini-cart-counter-content"> 379 @cartProductsCount 380 </div> 381 </div> 382 </div> 383 </a> 384 } 385 <div class="mini-cart-dropdown js-ajax-container js-mini-cart" id="SecondaryMiniCart" data-template="MiniCartContent" data-cart-id="@cartFeedPageId" data-json-feed="/Default.aspx?ID=@miniCartFeedPageId&feedType=MiniCart" data-init-onload="false"></div> 386 </div> 387 </div> 388 } 389 390 <!-- Render the content --> 391 <div id="Page" class="page @pagePos"> 392 <section class="center-container content-container dw-mod" id="content"> 393 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 394 395 396 @if (Model.PropertyItem.GetBoolean("ShowBreadcrumb")) { 397 <div class="grid__col-12"> 398 @RenderNavigation(new 399 { 400 id = "breadcrumb", 401 template = "breadcrumb.xslt" 402 }) 403 </div> 404 } 405 406 407 <div class="grid"> 408 @if (Model.PropertyItem.GetBoolean("LeftMenu")) 409 { 410 <nav class="grid__col-md-3 grid__col-sm-12 grid__col-xs-12"> 411 @RenderNavigation(new 412 { 413 id = "leftnav", 414 cssclass = "menu menu--left dwnavigation", 415 expandmode = "All", 416 template = "LeftNavigation.xslt" 417 }) 418 </nav> 419 } 420 <div class="grid__col-auto grid__col--bleed"> 421 <div class="grid"> 422 423 @Model.Placeholder("dwcontent", "content", "default:true;sort:1") 424 425 426 </div> 427 </div> 428 </div> 429 </section> 430 </div> 431 </main> 432 433 <!-- Footer section --> 434 @* 435 <footer class="footer dw-mod"> 436 <div class="center-container dw-mod"> 437 <div class="grid"> 438 @if (!String.IsNullOrEmpty(footerColumnOneContent)) 439 { 440 <div class="grid__col-md-auto"> 441 <h4 class="footer__heading">@Translate("Contact", "Contact")</h4> 442 @footerColumnOneContent 443 </div> 444 } 445 @if (!String.IsNullOrEmpty(footerColumnTwoContent)) 446 { 447 <div class="grid__col-md-auto"> 448 @footerColumnTwoContent 449 </div> 450 } 451 @if (Model.Area.Item.GetBoolean("FooterNewsletterSignUp")) 452 { 453 <div class="grid__col-md-auto"> 454 <h4 class="footer__heading">@Translate("Mailing list", "Mailing list")</h4> 455 <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> 456 <form class="form" name="NewsletterRedirect" action='/Default.aspx' method="get" enctype="multipart/form-data"> 457 <input name="ID" id="ID" value="@newsletterSignUpPageId" type="hidden"/> 458 <div class="form__field-combi"> 459 <input name="NewsletterEmail" id="NewsletterEmail" type="text" placeholder='@Translate("Your email address", "Your email address")' /> 460 <input class="btn btn--primary dw-mod" type="submit" id="Submitter" value='@Translate("Go", "Go")' /> 461 </div> 462 </form> 463 </div> 464 } 465 @if (Model.Area.Item.GetItems("FooterSocialLinks").Count > 0) 466 { 467 <div class="grid__col-md-auto"> 468 <h4 class="footer__heading">@Translate("Social links", "Social links")</h4> 469 470 <div class="collection"> 471 @foreach (var socialitem in Model.Area.Item.GetItems("FooterSocialLinks")) 472 { 473 //Fields.FirstOrDefault(x => x.SystemName == "Icon").GetString() 474 var socialIcon = socialitem.GetValue("Icon") as Dynamicweb.Frontend.ListViewModel; 475 string socialIconClass = socialIcon.SelectedValue; 476 string socialIconTitle = socialIcon.SelectedName; 477 string socialLink = socialitem.GetString("Link"); 478 479 <a href="@socialLink" title="@socialIconTitle"><i class="fa @socialIconClass fa-2x u-color-light"></i></a> 480 } 481 </div> 482 </div> 483 } 484 <div class="grid__col-12 grid--align-center"> 485 <p>@Model.Area.Item.GetString("FooterCopyrightText")</p> 486 </div> 487 </div> 488 </div> 489 </footer> 490 *@ 491 492 493 494 <footer class="bg-grey pt-4 mt-5"> 495 <div class="container"> 496 <div class="row"> 497 <div class="col-12 col-sm-12 col-md-12 col-lg-4 border border-light border-top-0 border-left-0 border-bottom-0"> 498 499 <h5 class="mb-3" style="color:white;">About TAF</h5> 500 501 <ul class="list-unstyled"> 502 503 @foreach (var aboutitem in Model.Area.Item.GetItems("About_Us_Links")) 504 { 505 506 string footerLink = aboutitem.GetString("Link"); 507 string footerLinkText = aboutitem.GetString("Link_Text"); 508 <li class="mb-2"><a href="@footerLink" class="text-white" style="color: white !important;">@footerLinkText</a></li> 509 } 510 511 512 </ul> 513 514 <h5 class="mt-4 mb-3" style="color:white;">Connect with Us</h5> 515 <ul class="list-unstyled"> 516 @foreach (var socialitem in Model.Area.Item.GetItems("FooterSocialLinks")) 517 { 518 //Fields.FirstOrDefault(x => x.SystemName == "Icon").GetString() 519 var socialIcon = socialitem.GetValue("Icon") as Dynamicweb.Frontend.ListViewModel; 520 string socialIconClass = socialIcon.SelectedValue; 521 string socialIconTitle = socialIcon.SelectedName; 522 string socialLink = socialitem.GetString("Link"); 523 string socialText = socialitem.GetString("Text"); 524 525 526 <li class="d-lg-table-cell pr-5"><a href="@socialLink" class="text-white"><i class="fa @socialIconClass"></i> <small>@socialText</small></a></li> 527 528 } 529 530 531 </ul> 532 </div> 533 <div class="col-12 col-sm-12 col-md-12 col-lg-4 pl-5 border border-light border-top-0 border-left-0 border-bottom-0"> 534 <h5 class="mb-3" style="color:white;">Information</h5> 535 536 <ul class="list-unstyled"> 537 @foreach (var informationitem in Model.Area.Item.GetItems("InformationLinks")) 538 { 539 540 string footerLink = informationitem.GetString("Link"); 541 string footerLinkText = informationitem.GetString("Link_Text"); 542 <li class="mb-2"><a href="@footerLink" class="text-white">@footerLinkText</a></li> 543 } 544 545 </ul> 546 547 <h5 class="mt-4 mb-3" style="color:white;">Customer Services</h5> 548 <ul class="list-unstyled"> 549 550 @foreach (var informationitem in Model.Area.Item.GetItems("Customer_Services_Links")) 551 { 552 553 string footerLink = informationitem.GetString("Link"); 554 string footerLinkText = informationitem.GetString("Link_Text"); 555 <li class="mb-2"><a href="@footerLink" class="text-white">@footerLinkText</a></li> 556 } 557 558 </ul> 559 </div> 560 <div class="col-12 col-sm-12 col-md-12 col-lg-4 pl-5"> 561 <h5 class="mb-3" style="color:white;">Our Brands</h5> 562 <ul class="list-unstyled"> 563 @foreach (var informationitem in Model.Area.Item.GetItems("Our_BrandsLinks")) 564 { 565 566 string footerLink = informationitem.GetString("Link"); 567 string footerLinkText = informationitem.GetString("Link_Text"); 568 <li class="mb-2"><a href="@footerLink" class="text-white">@footerLinkText</a></li> 569 } 570 571 572 </ul> 573 <h5 class="mt-4 mb-3" style="color:white;">Keep in touch with us</h5> 574 <form class="form" name="NewsletterRedirect" action='/Default.aspx' method="get" enctype="multipart/form-data"> 575 <input name="ID" id="ID" value="@newsletterSignUpPageId" type="hidden"/> 576 <div class="form__field-combi"> 577 <input name="NewsletterEmail" id="NewsletterEmail" type="text" placeholder='@Translate("Your email address", "Your email address")' /> 578 <input class="btn btn--primary dw-mod" type="submit" id="Submitter" value="JOIN" /> 579 </div> 580 </form> 581 </div> 582 </div> 583 </div> 584 <div class="bg-black mt-4"> 585 <div class="container py-3"> 586 <p class="text-center mb-0">@Model.Area.Item.GetString("FooterCopyrightText")</p> 587 </div> 588 </div> 589 </footer> 590 <!--Footer section end --> 591 @* Wireframe mode *@ 592 @if (wireframeMode == "True" && Model.CurrentUser.ID > 0) 593 { 594 <input type="checkbox" class="panel-trigger" id="WireframeToolsTrigger" /> 595 <aside id="WireframeTools" class="panel panel--right wireframe-tools"> 596 <label for="WireframeToolsTrigger" id="wireframeToolsToggle" class="panel-trigger-btn wireframe-tools-toggle"></label> 597 <div id="WireframeToolsContent" class="panel__content"> 598 <div id="WireframeToolsHelpText" class="wireframe-tools__info"> 599 @Translate("Click on a selectable element to add a comment","Click on a selectable element to add a comment") 600 </div> 601 <div class="js-ajax-container u-visually-hidden" id="CreateCommentForm" data-template="CreateCommentFormTemplate" data-json-feed="/Default.aspx?ID=@createCommentPageId&LayoutTemplate=Json.cshtml&DisableStatistics=True&feedType=Comments"></div> 602 <div class="js-ajax-container" id="Comments" data-template="CommentListTemplate" data-json-feed="/Default.aspx?ID=@commentPageId&LayoutTemplate=Json.cshtml&DisableStatistics=True&Comment_PageId=@pageId" data-init-onload="false"></div> 603 </div> 604 </aside> 605 606 <script id="CreateCommentFormTemplate" type="text/x-template"> 607 <div> 608 {{formBegin}} 609 <label>@Translate("Comment","Comment")</label> 610 <textarea name="Comment" class="comment-textarea u-full-width"></textarea> 611 <input type="hidden" id="TargetElement" name="TargetElement" value="" /> 612 <input type="hidden" name="Comment_PageId" value="@pageId" /> 613 <input type="hidden" name="Comment_UserId" value="@currentUserId" /> 614 <input type="submit" class="btn btn--primary btn--full dw-mod" value="Save changes"> 615 {{formEnd}} 616 </div> 617 </script> 618 619 <script id="CommentListTemplate" type="text/x-template"> 620 <div id="Comment" class="comment" data-template="CommentTemplate"></div> 621 </script> 622 623 <script id="CommentTemplate" type="text/x-template"> 624 <div> 625 <div id="Comment_{{count}}" class="js-comment"><span class="comment__number">{{count}}</span> {{comment}}</div> 626 </div> 627 </script> 628 } 629 630 631 @* Templates for Typeahead *@ 632 <script id="SearchGroupsTemplate" type="text/x-template"> 633 <li class="dropdown__item" onclick="Search.UpdateGroupSelection(this)" data-group-id="{{id}}">{{name}}</li> 634 </script> 635 636 <script id="SearchContentTemplate" type="text/x-template"> 637 <li class="dropdown__item dropdown__item--seperator"> 638 <a href="{{link}}" class="js-typeahead-link u-color-inherit u-pull--left"> 639 <div class="u-margin-right u-pull--left {{noimage}} u-hidden-xs u-hidden-xxs"><img src="/Admin/Public/GetImage.ashx?width=45&height=38&crop=1&Compression=75&image={{image}}" alt="{{name}}"></div> 640 <div class="u-pull--left"> 641 <div class="u-bold u-max-w220px u-truncate-text js-typeahead-name">{{name}}</div> 642 <div>{{price}}</div> 643 </div> 644 </a> 645 <div class="u-margin-left u-pull--right"> 646 <button class="btn btn--primary btn--condensed u-no-margin dw-mod {{hideBuyOptions}} js-ignore-click-outside" onclick="Cart.AddToCart(event, '{{id}}', '1')"><i class="fa fa-shopping-cart js-ignore-click-outside"></i></button> 647 <a href="{{link}}" class="btn btn--secondary btn--condensed u-no-margin dw-mod {{hideViewMore}} js-ignore-click-outside">@Translate("View","View")</a> 648 </div> 649 </li> 650 </script> 651 652 <script id="SearchMore" type="text/x-template"> 653 <li class="dropdown__item dropdown__item--not-selectable"> 654 <a href="/Default.aspx?ID=@productsPageId&Search={{searchParameter}}&GroupID={{groupId}}" class="btn btn--primary btn--full u-no-margin dw-mod js-typeahead-link"> 655 @Translate("View all","View all") 656 </a> 657 </li> 658 </script> 659 660 <script id="SearchEmpty" type="text/x-template"> 661 <li class="u-margin u-padding-left"> 662 @Translate("Your search gave 0 results","Your search gave 0 results") 663 </li> 664 </script> 665 666 @* Templates for the mini cart *@ 667 <script id="MiniCartCounterContent" type="text/x-template"> 668 <div class="js-mini-cart-counter-content"> 669 {{numberofproducts}} 670 </div> 671 </script> 672 673 <script id="MiniCartContent" type="text/x-template"> 674 <div class="mini-cart-dropdown__inner {{isempty}}"> 675 <h4 class="u-ta-center">@Translate("Shopping cart","Shopping cart")</h4> 676 <div class="mini-cart-dropdown__body"> 677 <table class="table mini-cart-table"> 678 <thead> 679 <tr> 680 <td>&nbsp;</td> 681 <td>@Translate("Product")</td> 682 <td class="u-ta-right">@Translate("Qty","Qty")</td> 683 <td class="u-ta-right">@Translate("Price","Price")</td> 684 </tr> 685 </thead> 686 687 <tbody id="MiniCartOrderLines"></tbody> 688 689 <tr> 690 <td><i class="fa fa-credit-card"></i></td> 691 <td>{{paymentmethod}}</td> 692 <td colspan="2" class="u-ta-right">$0.00</td> 693 </tr> 694 <tr> 695 <td><i class="fa fa-truck"></i></td> 696 <td>{{shippingmethod}}</td> 697 <td colspan="2" class="u-ta-right">${{shippingfee}}</td> 698 </tr> 699 <tr class="mini-cart-totals"> 700 <td colspan="2">@Translate("Total","Total")</td> 701 <td class="u-ta-right">{{numberofproducts}}</td> 702 <td class="u-ta-right">{{totalprice}}</td> 703 </tr> 704 </table> 705 </div> 706 @if(loggedIn =="true") 707 { 708 <table class="table mini-cart-table"> 709 <tr class="mini-cart-orderlines__footer"> 710 <td colspan="2"><button type="button" class="btn btn--secondary u-pull--left u-no-margin dw-mod btn--sm" onclick="EmptyCart();">@Translate("Empty cart","Empty cart")</button></td> 711 <td colspan="2" class="u-ta-right"><a href="/Default.aspx?ID=@cartPageId" class="btn btn--primary u-pull--right u-no-margin dw-mod btn--sm">@Translate("Proceed to checkout","Proceed to checkout")</a></td> 712 </tr> 713 </table> 714 } 715 else 716 { 717 <table class="table mini-cart-table"> 718 <tr class="mini-cart-orderlines__footer"> 719 <td colspan="2"><button type="button" class="btn btn--secondary u-pull--left u-no-margin dw-mod btn--sm" onclick="Cart.EmptyCart(event)">@Translate("Empty cart","Empty cart")</button></td> 720 <td colspan="2" class="u-ta-right"><a onclick="showPopup()" class="btn btn--primary u-pull--right u-no-margin dw-mod btn--sm">@Translate("Login","Login")</a></td> 721 </tr> 722 </table> 723 } 724 725 </div> 726 </script> 727 728 <script id="MiniCartOrderline" type="text/x-template"> 729 <tr class="{{isempty}}"> 730 <td><a href="{{link}}" class="{{hideimage}}"><img src="/Admin/Public/GetImage.ashx?width=50&height=50&crop=5&Compression=75&image={{image}}" alt="{{name}}"></a></td> 731 <td> 732 <a href="{{link}}" class="mini-cart-orderlines__name">{{name}}</a> 733 <a href="{{link}}" class="mini-cart-orderlines__name">{{variantname}}</a> 734 </td> 735 <td class="u-ta-right">{{quantity}}</td> 736 <td class="u-ta-right">{{totalprice}}</td> 737 </tr> 738 </script> 739 740 <script id="MiniCartOrderlineDiscount" type="text/x-template"> 741 <tr class="table__row--no-border {{isempty}}"> 742 <td>&nbsp;</td> 743 <td><div class="mini-cart-orderlines__name">{{name}}</div></td> 744 <td class="u-ta-right">&nbsp;</td> 745 <td class="u-ta-right">{{totalprice}}</td> 746 </tr> 747 </script> 748 749 <!-- Javascript --> 750 <script src="/Files/Templates/Designs/Rapido/js/Buttons.js"></script> 751 <script src="/Files/Templates/Designs/Rapido/js/Facets.js"></script> 752 <script src="/Files/Templates/Designs/Rapido/js/Cart.js"></script> 753 <script src="/Files/Templates/Designs/Rapido/js/Search.js"></script> 754 <script src="/Files/Templates/Designs/Rapido/js/DynamoConfig.js"></script> 755 <script src="/Files/Templates/Designs/Rapido/js/Dynamo.js"></script> 756 <script src="/Files/Templates/Designs/Rapido/js/Variants.js"></script> 757 <script src="/Files/Templates/Designs/Rapido/js/ImageList.js"></script> 758 <script src="/Files/Templates/Designs/Rapido/js/LoadMore.js"></script> 759 <script src="/Files/Templates/Designs/Rapido/js/_RememberState.js"></script> 760 <script src="/Files/Templates/Designs/Rapido/js/Scroll.js"></script> 761 <script src="/Files/Templates/Designs/Rapido/js/Wireframe.js"></script> 762 <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> 763 764 <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js" integrity="sha384-b/U6ypiBEHpOf/4+1nzFpr53nxSS+GLCkfwBdFNTxtclqqenISfwAzpKaMNFNmj4" crossorigin="anonymous"></script> 765 766 <script> 767 Wireframe.Init(@wireframeMode.ToLower(), "productList", @loggedIn); 768 function showPopup() 769 { 770 var answer = confirm("Please login or register to place an order"); 771 772 if( answer == true ){ 773 window.location.replace("/default.aspx?id=@signInProfilePageId"); 774 } 775 } 776 function EmptyCart() 777 { 778 var currentlink=window.location.href; 779 console.log("Current Link "+currentlink); 780 if(currentlink.includes("Purge=true")) 781 { 782 currentlink.split('?')[0]+"?cartcmd=emptycart"; 783 } 784 else 785 { 786 window.location.href=currentlink+"?cartcmd=emptycart"; 787 } 788 } 789 // Pop Up 790 function closeBurn(){ 791 jQuery("#burn").hide(); 792 } 793 794 $(document).ready(function(){ 795 var screenHeight = 0; 796 screenHeight = screen.height; 797 var burnPopup = $('#burnPopup'); 798 if( screenHeight < 321 ){ 799 $(burnPopup).css('height','70%'); 800 } 801 }); 802 </script> 803 <!-- Slick Carousel --> 804 <script src="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.min.js"></script> 805 806 <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js" integrity="sha384-h0AbiXch4ZDo7tp9hKZ4TsHbi047NrKGLO3SEJAg45jXxnGIfYzk4Si90RDIqNm1" crossorigin="anonymous"></script> 807 808 <script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.4/js/select2.min.js"></script> 809 <script src="/Files/Templates/Designs/Rapido/js/Custom.js"></script> 810 <script src="https://github.com/janl/mustache.js/raw/master/mustache.js"></script> 811 <script src="/Files/Templates/Designs/Rapido/js/masonry.pkgd.min.js"></script> 812 <script src="/Files/Templates/Designs/Rapido/js/main.js"></script> 813 814 815 </body> 816 </html> 817 818