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_4a6e007603c54153bf4ff1460e6ce7db.Execute() in F:\DWWEBSITE\TAFWEB\Solutions\Files\Templates\Designs\Rapido\_parsed\Page.parsed.cshtml:line 416
   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.21" 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 <!-- Facebook Pixel Code --> 157 <script> 158 !function(f,b,e,v,n,t,s) 159 {if(f.fbq)return;n=f.fbq=function(){n.callMethod? 160 n.callMethod.apply(n,arguments):n.queue.push(arguments)}; 161 if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0'; 162 n.queue=[];t=b.createElement(e);t.async=!0; 163 t.src=v;s=b.getElementsByTagName(e)[0]; 164 s.parentNode.insertBefore(t,s)}(window, document,'script', 165 'https://connect.facebook.net/en_US/fbevents.js'); 166 fbq('init', '2362410727340021'); 167 fbq('track', 'PageView'); 168 </script> 169 <noscript> 170 <img height="1" width="1" style="display:none" 171 src="https://www.facebook.com/tr?id={your-pixel-id-goes-here}&ev=PageView&noscript=1"/> 172 </noscript> 173 <!-- End Facebook Pixel Code --> 174 175 176 </head> 177 178 <body> 179 <!-- Pop Up--> 180 <div id="burn" onclick="closeBurn()"> 181 <div id="burnPopup"> 182 <div id="burnClose" class="pull-right"> 183 <a onclick="closeBurn()"><i class="fa fa-times" aria-hidden="true"></i></a> 184 </div> 185 <div id="burnBody" class="text-center"> 186 <div id="burnTitle" class=""> 187 188 </div> 189 <div id="burnText" class=""> 190 191 </div> 192 <div id="burnButton" class=""> 193 <a class=""></a> 194 </div> 195 </div> 196 </div> 197 </div> 198 <!-- Pop Up--> 199 200 <main class="site dw-mod"> 201 @*Custom Header*@ 202 203 <div class="bg-purple free-delivery"> 204 <div class="container py-4"> 205 <p class="m-0 text-center">@announcementBarText</p> 206 </div> 207 <span class="free-delivery-close">x</span> 208 </div> 209 210 @{ 211 bool isMobile = Pageview.Device.ToString() == "Mobile" ? true : false; 212 } 213 <header class="custom-header"> 214 215 <div class="container pt-3 pb-3 navigation"> 216 <div class="row"> 217 <div class="col-12 col-sm-12 col-md-12 col-lg-3" style="max-height:112px!important"> 218 <a class="logo" href="Default.aspx?ID=@firstPageId"> 219 <img src="/Admin/Public/GetImage.ashx?width=300&height=92&crop=1&Compression=100&image=@logoWhite" class="img-fluid" alt="logo"> 220 </a> 221 </div> 222 <div class="col-12 col-sm-12 col-md-12 col-lg-9 text-right navigation-right"> 223 <div> 224 <ul class="header-buttons clearfix pt-4 mb-4"> 225 <li class="d-inline-block px-5"> 226 <div class="menu__link is-dropdown is-dropdown--no-icon search-button"> 227 <i class="fa fa-search"></i> 228 <div class="menu menu--dropdown u-w340px top-micro-search"> 229 <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"> 230 <div class="typeahead-search-field"> 231 <input type="text" class="u-no-margin u-full-width js-typeahead-search-field" placeholder="@searchPlaceholder"> 232 <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> 233 </div> 234 </div> 235 </div> 236 </div> 237 </li> 238 @if (loggedIn == "true" && isMobile==false) 239 { 240 <li class="d-inline-block px-5 "> 241 <a href="/Default.aspx?ID=@myFavoritesPageId" class="menu__link "> 242 <i class="fa fa-heart-o"></i> 243 </a> 244 </li> 245 } 246 247 <li class=" d-inline-block px-5"> 248 <div class="mini-cart "> 249 @if(isMobile){ 250 <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;"> 251 <i class="fa fa-shopping-bag"></i> 252 <div class="mini-cart__counter mini-cart__counter--inline "> 253 <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"> 254 <div class="js-mini-cart-counter-content"> 255 @cartProductsCount 256 </div> 257 </div> 258 </div> 259 </a> 260 }else{ 261 if(loggedIn == "true") 262 { 263 <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;"> 264 <i class="fa fa-shopping-bag"></i> 265 <div class="mini-cart__counter mini-cart__counter--inline "> 266 <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"> 267 <div class="js-mini-cart-counter-content"> 268 @cartProductsCount 269 </div> 270 </div> 271 </div> 272 </a> 273 } 274 else 275 { 276 <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;"> 277 <i class="fa fa-shopping-bag"></i> 278 <div class="mini-cart__counter mini-cart__counter--inline "> 279 <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"> 280 <div class="js-mini-cart-counter-content"> 281 @cartProductsCount 282 </div> 283 </div> 284 </div> 285 </a> 286 } 287 } 288 <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> 289 </div> 290 </li> 291 292 <li class="d-inline-block px-5" style="padding-right: 0px !important;"> 293 <div class="header-menu__link is-dropdown is-dropdown--no-icon"> 294 295 @if (loggedIn == "false") 296 297 { 298 <a href="/default.aspx?ID=@signInProfilePageId" class="u-color-inherit"><i class="fa fa-user u-color-inherit"></i> <small>LOGIN</small></a> 299 300 301 } 302 else 303 { 304 <a href="/default.aspx?ID=@myProfilePageId" class="u-color-inherit"><i class="fa fa-user u-color-inherit"></i> @Model.CurrentUser.Name </a> 305 306 } 307 308 <div class="menu menu--dropdown sign-in-dropdown u-w160px"> 309 <div class="menu-dropdown__item"> 310 <ul class="list list--clean"> 311 @if (loggedIn == "true") 312 { 313 <li class="list__seperator"></li> 314 <li> 315 <a href="/Admin/Public/ExtranetLogoff.aspx?ID=12" class="list__link">@Translate("Sign out")</a> 316 </li> 317 }else{ 318 <li class="list__seperator"></li> 319 <li> 320 <a href="/Default.aspx?id=@createAccountPageId" class="list__link">@Translate("Register")</a> 321 </li> 322 } 323 </ul> 324 </div> 325 </div> 326 </div> 327 </li> 328 </ul> 329 <nav class="navbar navbar-expand-lg navbar-light p-0"> 330 331 <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> 332 <div class="collapse navbar-collapse custom-nav" id="menu"> 333 334 335 @if (!megaMenu) 336 { 337 @RenderNavigation(new 338 { 339 id = "topnavigation", 340 cssclass = "menu dw-mod dwnavigation", 341 startLevel = 1, 342 endlevel = 3, 343 expandmode = "All", 344 template = "BaseMenuWithDropdown.xslt" 345 }); 346 } 347 else 348 { 349 @RenderNavigation(new 350 { 351 id = "topnavigation", 352 cssclass = "menu dw-mod dwnavigation", 353 startLevel = 1, 354 endlevel = 1, 355 promotionImage = megamenuPromotionImage, 356 promotionLink = Model.Area.Item.GetString("NavigationMegamenuPromotionLink"), 357 template = "BaseMegaMenu.xslt" 358 }); 359 } 360 361 362 </div> 363 </nav> 364 </div> 365 </div> 366 </div> 367 <div class="clearfix"></div> 368 369 </div> 370 </header> 371 372 @* End Custom Header*@ 373 374 <!-- Floating mini cart --> 375 @if (!stickyMenu && pageId == productsPageId) 376 { 377 <div class="floating-mini-cart u-hidden" id="FloatingMiniCart"> 378 <div class="mini-cart"> 379 if(loggedIn =="true") 380 { 381 <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')"> 382 <i class="fa fa-shopping-cart fa-4x"></i> 383 <div class="mini-cart__counter mini-cart__counter--lg dw-mod"> 384 <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"> 385 <div class="js-mini-cart-counter-content"> 386 @cartProductsCount 387 </div> 388 </div> 389 </div> 390 </a> 391 } 392 else 393 { 394 <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')"> 395 <i class="fa fa-shopping-cart fa-4x"></i> 396 <div class="mini-cart__counter mini-cart__counter--lg dw-mod"> 397 <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"> 398 <div class="js-mini-cart-counter-content"> 399 @cartProductsCount 400 </div> 401 </div> 402 </div> 403 </a> 404 } 405 <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> 406 </div> 407 </div> 408 } 409 410 <!-- Render the content --> 411 <div id="Page" class="page @pagePos"> 412 <section class="center-container content-container dw-mod" id="content"> 413 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 414 415 416 @if (Model.PropertyItem.GetBoolean("ShowBreadcrumb")) { 417 <div class="grid__col-12"> 418 @RenderNavigation(new 419 { 420 id = "breadcrumb", 421 template = "breadcrumb.xslt" 422 }) 423 </div> 424 } 425 426 427 <div class="grid"> 428 @if (Model.PropertyItem.GetBoolean("LeftMenu")) 429 { 430 <nav class="grid__col-md-3 grid__col-sm-12 grid__col-xs-12"> 431 @RenderNavigation(new 432 { 433 id = "leftnav", 434 cssclass = "menu menu--left dwnavigation", 435 expandmode = "All", 436 template = "LeftNavigation.xslt" 437 }) 438 </nav> 439 } 440 <div class="grid__col-auto grid__col--bleed"> 441 <div class="grid"> 442 443 @Model.Placeholder("dwcontent", "content", "default:true;sort:1") 444 445 446 </div> 447 </div> 448 </div> 449 </section> 450 </div> 451 </main> 452 453 <!-- Footer section --> 454 @* 455 <footer class="footer dw-mod"> 456 <div class="center-container dw-mod"> 457 <div class="grid"> 458 @if (!String.IsNullOrEmpty(footerColumnOneContent)) 459 { 460 <div class="grid__col-md-auto"> 461 <h4 class="footer__heading">@Translate("Contact", "Contact")</h4> 462 @footerColumnOneContent 463 </div> 464 } 465 @if (!String.IsNullOrEmpty(footerColumnTwoContent)) 466 { 467 <div class="grid__col-md-auto"> 468 @footerColumnTwoContent 469 </div> 470 } 471 @if (Model.Area.Item.GetBoolean("FooterNewsletterSignUp")) 472 { 473 <div class="grid__col-md-auto"> 474 <h4 class="footer__heading">@Translate("Mailing list", "Mailing list")</h4> 475 <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> 476 <form class="form" name="NewsletterRedirect" action='/Default.aspx' method="get" enctype="multipart/form-data"> 477 <input name="ID" id="ID" value="@newsletterSignUpPageId" type="hidden"/> 478 <div class="form__field-combi"> 479 <input name="NewsletterEmail" id="NewsletterEmail" type="text" placeholder='@Translate("Your email address", "Your email address")' /> 480 <input class="btn btn--primary dw-mod" type="submit" id="Submitter" value='@Translate("Go", "Go")' /> 481 </div> 482 </form> 483 </div> 484 } 485 @if (Model.Area.Item.GetItems("FooterSocialLinks").Count > 0) 486 { 487 <div class="grid__col-md-auto"> 488 <h4 class="footer__heading">@Translate("Social links", "Social links")</h4> 489 490 <div class="collection"> 491 @foreach (var socialitem in Model.Area.Item.GetItems("FooterSocialLinks")) 492 { 493 //Fields.FirstOrDefault(x => x.SystemName == "Icon").GetString() 494 var socialIcon = socialitem.GetValue("Icon") as Dynamicweb.Frontend.ListViewModel; 495 string socialIconClass = socialIcon.SelectedValue; 496 string socialIconTitle = socialIcon.SelectedName; 497 string socialLink = socialitem.GetString("Link"); 498 499 <a href="@socialLink" title="@socialIconTitle"><i class="fa @socialIconClass fa-2x u-color-light"></i></a> 500 } 501 </div> 502 </div> 503 } 504 <div class="grid__col-12 grid--align-center"> 505 <p>@Model.Area.Item.GetString("FooterCopyrightText")</p> 506 </div> 507 </div> 508 </div> 509 </footer> 510 *@ 511 512 513 514 <footer class="bg-grey pt-4 mt-5"> 515 <div class="container"> 516 <div class="row"> 517 <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"> 518 519 <h5 class="mb-3" style="color:white;">About TAF</h5> 520 521 <ul class="list-unstyled"> 522 523 @foreach (var aboutitem in Model.Area.Item.GetItems("About_Us_Links")) 524 { 525 526 string footerLink = aboutitem.GetString("Link"); 527 string footerLinkText = aboutitem.GetString("Link_Text"); 528 <li class="mb-2"><a href="@footerLink" class="text-white" style="color: white !important;">@footerLinkText</a></li> 529 } 530 531 532 </ul> 533 534 <h5 class="mt-4 mb-3" style="color:white;">Connect with Us</h5> 535 <ul class="list-unstyled"> 536 @foreach (var socialitem in Model.Area.Item.GetItems("FooterSocialLinks")) 537 { 538 //Fields.FirstOrDefault(x => x.SystemName == "Icon").GetString() 539 var socialIcon = socialitem.GetValue("Icon") as Dynamicweb.Frontend.ListViewModel; 540 string socialIconClass = socialIcon.SelectedValue; 541 string socialIconTitle = socialIcon.SelectedName; 542 string socialLink = socialitem.GetString("Link"); 543 string socialText = socialitem.GetString("Text"); 544 545 546 <li class="d-lg-table-cell pr-5"><a href="@socialLink" class="text-white"><i class="fa @socialIconClass"></i> <small>@socialText</small></a></li> 547 548 } 549 550 551 </ul> 552 </div> 553 <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"> 554 <h5 class="mb-3" style="color:white;">Information</h5> 555 556 <ul class="list-unstyled"> 557 @foreach (var informationitem in Model.Area.Item.GetItems("InformationLinks")) 558 { 559 560 string footerLink = informationitem.GetString("Link"); 561 string footerLinkText = informationitem.GetString("Link_Text"); 562 <li class="mb-2"><a href="@footerLink" class="text-white">@footerLinkText</a></li> 563 } 564 565 </ul> 566 567 568 </div> 569 <div class="col-12 col-sm-12 col-md-12 col-lg-4 pl-5"> 570 <h5 class="mb-3" style="color:white;">Our Brands</h5> 571 <ul class="list-unstyled"> 572 @foreach (var informationitem in Model.Area.Item.GetItems("Our_BrandsLinks")) 573 { 574 575 string footerLink = informationitem.GetString("Link"); 576 string footerLinkText = informationitem.GetString("Link_Text"); 577 <li class="mb-2"><a href="@footerLink" class="text-white">@footerLinkText</a></li> 578 } 579 580 581 </ul> 582 <h5 class="mt-4 mb-3" style="color:white;">Keep in touch with us</h5> 583 <form class="form" name="NewsletterRedirect" action='/Default.aspx' method="get" enctype="multipart/form-data"> 584 <input name="ID" id="ID" value="@newsletterSignUpPageId" type="hidden"/> 585 <div class="form__field-combi"> 586 <input name="NewsletterEmail" id="NewsletterEmail" type="text" placeholder='@Translate("Your email address", "Your email address")' /> 587 <input class="btn btn--primary dw-mod" type="submit" id="Submitter" value="JOIN" /> 588 </div> 589 </form> 590 </div> 591 </div> 592 </div> 593 <div class="bg-black mt-4"> 594 <div class="container py-3"> 595 <p class="text-center mb-0">@Model.Area.Item.GetString("FooterCopyrightText")</p> 596 </div> 597 </div> 598 </footer> 599 <!--Footer section end --> 600 @* Wireframe mode *@ 601 @if (wireframeMode == "True" && Model.CurrentUser.ID > 0) 602 { 603 <input type="checkbox" class="panel-trigger" id="WireframeToolsTrigger" /> 604 <aside id="WireframeTools" class="panel panel--right wireframe-tools"> 605 <label for="WireframeToolsTrigger" id="wireframeToolsToggle" class="panel-trigger-btn wireframe-tools-toggle"></label> 606 <div id="WireframeToolsContent" class="panel__content"> 607 <div id="WireframeToolsHelpText" class="wireframe-tools__info"> 608 @Translate("Click on a selectable element to add a comment","Click on a selectable element to add a comment") 609 </div> 610 <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> 611 <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> 612 </div> 613 </aside> 614 615 <script id="CreateCommentFormTemplate" type="text/x-template"> 616 <div> 617 {{formBegin}} 618 <label>@Translate("Comment","Comment")</label> 619 <textarea name="Comment" class="comment-textarea u-full-width"></textarea> 620 <input type="hidden" id="TargetElement" name="TargetElement" value="" /> 621 <input type="hidden" name="Comment_PageId" value="@pageId" /> 622 <input type="hidden" name="Comment_UserId" value="@currentUserId" /> 623 <input type="submit" class="btn btn--primary btn--full dw-mod" value="Save changes"> 624 {{formEnd}} 625 </div> 626 </script> 627 628 <script id="CommentListTemplate" type="text/x-template"> 629 <div id="Comment" class="comment" data-template="CommentTemplate"></div> 630 </script> 631 632 <script id="CommentTemplate" type="text/x-template"> 633 <div> 634 <div id="Comment_{{count}}" class="js-comment"><span class="comment__number">{{count}}</span> {{comment}}</div> 635 </div> 636 </script> 637 } 638 639 640 @* Templates for Typeahead *@ 641 <script id="SearchGroupsTemplate" type="text/x-template"> 642 <li class="dropdown__item" onclick="Search.UpdateGroupSelection(this)" data-group-id="{{id}}">{{name}}</li> 643 </script> 644 645 <script id="SearchContentTemplate" type="text/x-template"> 646 <li class="dropdown__item dropdown__item--seperator"> 647 <a href="{{link}}" class="js-typeahead-link u-color-inherit u-pull--left"> 648 <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> 649 <div class="u-pull--left"> 650 <div class="u-bold u-max-w220px u-truncate-text js-typeahead-name">{{name}}</div> 651 <div>{{price}}</div> 652 </div> 653 </a> 654 <div class="u-margin-left u-pull--right"> 655 <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> 656 <a href="{{link}}" class="btn btn--secondary btn--condensed u-no-margin dw-mod {{hideViewMore}} js-ignore-click-outside">@Translate("View","View")</a> 657 </div> 658 </li> 659 </script> 660 661 <script id="SearchMore" type="text/x-template"> 662 <li class="dropdown__item dropdown__item--not-selectable"> 663 <a href="/Default.aspx?ID=@productsPageId&Search={{searchParameter}}&GroupID={{groupId}}" class="btn btn--primary btn--full u-no-margin dw-mod js-typeahead-link"> 664 @Translate("View all","View all") 665 </a> 666 </li> 667 </script> 668 669 <script id="SearchEmpty" type="text/x-template"> 670 <li class="u-margin u-padding-left"> 671 @Translate("Your search gave 0 results","Your search gave 0 results") 672 </li> 673 </script> 674 675 @* Templates for the mini cart *@ 676 <script id="MiniCartCounterContent" type="text/x-template"> 677 <div class="js-mini-cart-counter-content"> 678 {{numberofproducts}} 679 </div> 680 </script> 681 682 <script id="MiniCartContent" type="text/x-template"> 683 <div class="mini-cart-dropdown__inner {{isempty}}"> 684 <h4 class="u-ta-center">@Translate("Shopping cart","Shopping cart")</h4> 685 <div class="mini-cart-dropdown__body"> 686 <table class="table mini-cart-table"> 687 <thead> 688 <tr> 689 <td>&nbsp;</td> 690 <td>@Translate("Product")</td> 691 <td class="u-ta-right">@Translate("Qty","Qty")</td> 692 <td class="u-ta-right">@Translate("Price","Price")</td> 693 </tr> 694 </thead> 695 696 <tbody id="MiniCartOrderLines"></tbody> 697 698 <tr> 699 <td><i class="fa fa-credit-card"></i></td> 700 <td>{{paymentmethod}}</td> 701 <td colspan="2" class="u-ta-right">$0.00</td> 702 </tr> 703 <tr> 704 <td><i class="fa fa-truck"></i></td> 705 <td>{{shippingmethod}}</td> 706 <td colspan="2" class="u-ta-right">${{shippingfee}}</td> 707 </tr> 708 <tr class="mini-cart-totals"> 709 <td colspan="2">@Translate("Total","Total")</td> 710 <td class="u-ta-right">{{numberofproducts}}</td> 711 <td class="u-ta-right">{{totalprice}}</td> 712 </tr> 713 </table> 714 </div> 715 @if(loggedIn =="true") 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="EmptyCart();">@Translate("Empty cart","Empty cart")</button></td> 720 <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> 721 </tr> 722 </table> 723 } 724 else 725 { 726 <table class="table mini-cart-table"> 727 <tr class="mini-cart-orderlines__footer"> 728 <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> 729 <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> 730 </tr> 731 </table> 732 } 733 734 </div> 735 </script> 736 737 <script id="MiniCartOrderline" type="text/x-template"> 738 <tr class="{{isempty}}"> 739 <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> 740 <td> 741 <a href="{{link}}" class="mini-cart-orderlines__name">{{name}}</a> 742 <a href="{{link}}" class="mini-cart-orderlines__name">{{variantname}}</a> 743 </td> 744 <td class="u-ta-right">{{quantity}}</td> 745 <td class="u-ta-right">{{totalprice}}</td> 746 </tr> 747 </script> 748 749 <script id="MiniCartOrderlineDiscount" type="text/x-template"> 750 <tr class="table__row--no-border {{isempty}}"> 751 <td>&nbsp;</td> 752 <td><div class="mini-cart-orderlines__name">{{name}}</div></td> 753 <td class="u-ta-right">{{quantity}}</td> 754 <td class="u-ta-right">{{totalprice}}</td> 755 </tr> 756 </script> 757 758 <!-- Javascript --> 759 <script src="/Files/Templates/Designs/Rapido/js/Buttons.js"></script> 760 <script src="/Files/Templates/Designs/Rapido/js/Facets.js"></script> 761 <script src="/Files/Templates/Designs/Rapido/js/Cart.js"></script> 762 <script src="/Files/Templates/Designs/Rapido/js/Search.js"></script> 763 <script src="/Files/Templates/Designs/Rapido/js/DynamoConfig.js"></script> 764 <script src="/Files/Templates/Designs/Rapido/js/Dynamo.js"></script> 765 <script src="/Files/Templates/Designs/Rapido/js/Variants.js"></script> 766 <script src="/Files/Templates/Designs/Rapido/js/ImageList.js"></script> 767 <script src="/Files/Templates/Designs/Rapido/js/LoadMore.js"></script> 768 <script src="/Files/Templates/Designs/Rapido/js/_RememberState.js"></script> 769 <script src="/Files/Templates/Designs/Rapido/js/Scroll.js"></script> 770 <script src="/Files/Templates/Designs/Rapido/js/Wireframe.js"></script> 771 <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> 772 773 <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> 774 775 <script> 776 Wireframe.Init(@wireframeMode.ToLower(), "productList", @loggedIn); 777 function showPopup() 778 { 779 var answer = confirm("Please login or register to place an order"); 780 781 if( answer == true ){ 782 window.location.replace("/default.aspx?id=@signInProfilePageId"); 783 } 784 } 785 function EmptyCart() 786 { 787 var currentlink=window.location.href; 788 console.log("Current Link "+currentlink); 789 if(currentlink.includes("Purge=true")) 790 { 791 currentlink.split('?')[0]+"?cartcmd=emptycart"; 792 } 793 else 794 { 795 window.location.href=currentlink+"?cartcmd=emptycart"; 796 } 797 } 798 // Pop Up 799 function closeBurn(){ 800 jQuery("#burn").hide(); 801 } 802 803 $(document).ready(function(){ 804 var screenHeight = 0; 805 screenHeight = screen.height; 806 var burnPopup = $('#burnPopup'); 807 if( screenHeight < 321 ){ 808 $(burnPopup).css('height','70%'); 809 } 810 }); 811 </script> 812 <!-- Slick Carousel --> 813 <script src="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.min.js"></script> 814 815 <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js" integrity="sha384-h0AbiXch4ZDo7tp9hKZ4TsHbi047NrKGLO3SEJAg45jXxnGIfYzk4Si90RDIqNm1" crossorigin="anonymous"></script> 816 817 <script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.4/js/select2.min.js"></script> 818 <script src="/Files/Templates/Designs/Rapido/js/Custom.js"></script> 819 <script src="https://github.com/janl/mustache.js/raw/master/mustache.js"></script> 820 <script src="/Files/Templates/Designs/Rapido/js/masonry.pkgd.min.js"></script> 821 <script src="/Files/Templates/Designs/Rapido/js/main.js"></script> 822 823 824 </body> 825 </html> 826 827