Error executing template "Designs/AustralianGold/_parsed/Index.parsed.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
   at CompiledRazorTemplates.Dynamic.RazorEngine_036d4ea66a1c4b2dad6a943afc422028.Execute() in f:\Domains\Sites\australiangold.com\Files\Templates\Designs\AustralianGold\_parsed\Index.parsed.cshtml:line 471
   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 RazorTemplateBase<RazorTemplateModel<Template>> 2 @using Dynamicweb.Rendering 3 @using Dynamicweb.Content 4 @using System.Text.RegularExpressions 5 @using System.Web.UI.HtmlControls 6 7 @{ string designName = GetString("Template:DesignBaseUrl").Replace("/Files/Templates/Designs/", "").Replace("/", "");}@functions{ 8 public static string GetImage(string sourceString, int imageWidth, int imageHeight, int imageWidthTablet = 0, int imageHeightTablet = 0, int imageWidthMobile = 0, int imageHeightMobile = 0, string imageFormat = "jpg", int imageCompression = 0, int imageCrop = 5, string background = "", string designName = "AustralianGold") 9 { 10 Dynamicweb.Frontend.PageView currentPageview = Dynamicweb.Frontend.PageView.Current(); 11 string currDevice = currentPageview.Device.ToString(); 12 string alternativeImage = !String.IsNullOrEmpty(currentPageview.Area.Item["NoImage"].ToString()) ? currentPageview.Area.Item["NoImage"].ToString() : "/Files/Templates/Designs/"+ designName + "/images/alternativeImage.jpg"; 13 string widthString = ""; 14 string heightString = ""; 15 string getImageFormat = imageFormat != "jpg" ? "&amp;Format=" + imageFormat : ""; 16 string getImageCompression = imageCompression != 0 ? "&amp;Compression=" + imageCompression : ""; 17 string bgColor = !string.IsNullOrEmpty(background) ? "&amp;Background="+background : ""; 18 int getImageWidth = imageWidth != 0 ? imageWidth : 0; 19 int getImageHeight = imageHeight != 0 ? imageHeight : 0; 20 21 if (currDevice == Dynamicweb.Frontend.Devices.DeviceType.Tablet.ToString()) 22 { 23 getImageWidth = imageWidthTablet != 0 ? imageWidthTablet : getImageWidth; 24 getImageHeight = imageHeightTablet != 0 ? imageHeightTablet : getImageHeight; 25 } 26 else if (currDevice == Dynamicweb.Frontend.Devices.DeviceType.Mobile.ToString()) 27 { 28 getImageWidth = imageWidthMobile != 0 ? imageWidthMobile : getImageWidth; 29 getImageHeight = imageHeightMobile != 0 ? imageHeightMobile : getImageHeight; 30 } 31 32 if (getImageWidth != 0) 33 { 34 widthString = "&amp;Width=" + getImageWidth; 35 } 36 if (getImageHeight != 0) 37 { 38 heightString = "&amp;Height=" + getImageHeight; 39 } 40 41 string output = "/Admin/Public/GetImage.ashx?Image=" + sourceString + widthString + heightString + "&amp;altFmImage_path=" + alternativeImage + getImageFormat + getImageCompression + "&amp;Crop=" + imageCrop + bgColor; 42 return output; 43 } 44 } 45 @functions{ 46 public string GetCurrentUrl() 47 { 48 string currentUrl = Pageview.GlobalTags.GetTagByName("Global:Request.Scheme").Value.ToString() + "://" + Pageview.GlobalTags.GetTagByName("Global:Request.Host").Value.ToString() + Pageview.GlobalTags.GetTagByName("Global:Pageview.Url").Value.ToString(); 49 50 return currentUrl; 51 } 52 } 53 @using Dynamicweb.Rendering 54 @using System 55 @using System.Web 56 @using System.Text.RegularExpressions 57 @using Dynamicweb.Core 58 @inherits RazorTemplateBase<RazorTemplateModel<Template>> 59 60 @helper OgMeta(string designName) 61 { 62 if (string.IsNullOrEmpty(System.Web.HttpContext.Current.Request.Params["ProductID"])) 63 { 64 @SnippetStart("OGMeta")<meta property="og:title" content='@GetString("Title")'> 65 <meta property="og:image" content='@Pageview.GlobalTags.GetTagByName("Global:Request.Scheme").Value.ToString()://@Pageview.GlobalTags.GetTagByName("Global:Request.Host").Value.ToString()/Files/Templates/Designs/@designName/images/logo.png'> 66 <meta property="og:site_name" content='@GetString("Item.Area.CompanyName")'> 67 <meta property="og:url" content='@Pageview.GlobalTags.GetTagByName("Global:Request.Scheme").Value.ToString()://@Pageview.GlobalTags.GetTagByName("Global:Request.Host").Value.ToString()@Pageview.GlobalTags.GetTagByName("Global:Pageview.Url").Value.ToString()'> 68 <meta property="og:description" content='@StripHtml(GetString("Meta.Description"))'> 69 <meta property="og:type" content="article"> 70 <meta property="og:locale" content='@Pageview.GlobalTags.GetTagByName("Global:Area.LongLang").Value.ToString().Replace("-", "_")'> 71 @SnippetEnd("OGMeta") 72 } 73 } 74 @helper HtmlHead(string designName) 75 { 76 string designFolder = GetString("Template:DesignBaseUrl"); 77 string robots = ""; 78 string ipCountry = Rizzo.IP.Frontend.GetCountryCode(); 79 string countryCodeModule = !string.IsNullOrEmpty(ipCountry) ? ipCountry : "US"; 80 string userCountryCode = (Pageview.User != null && !string.IsNullOrEmpty(Pageview.User.Country)) ? Pageview.User.Country : ipCountry; 81 string userState = Pageview.User != null ? Pageview.User.State : string.Empty; 82 string googleRemarketingTag = GetString("Item.Area.GoogleRemarketingTag"); 83 robots = (GetBoolean("Item.Area.DemoBanner") || GetBoolean("Item.Area.NoIndex")) ? CommaSplittedString(robots, "noindex") : ""; 84 robots += (GetBoolean("Item.Area.DemoBanner") || GetBoolean("Item.Area.NoFollow")) ? CommaSplittedString(robots, "nofollow") : ""; 85 86 SetAffiliateCodeToCookie(); 87 88 <head> 89 <title>@GetValue("Title")</title> 90 <meta http-equiv="content-type" content="text/html; charset=utf-8"> 91 <meta name="viewport" content="initial-scale=1.0, width=device-width, user-scalable=yes"> 92 <!-- Google Search Console Verification Tag - RANQ --> 93 <meta name="google-site-verification" content="vD8y7n2n1vOQuHmd1QZgawntuNz_vMI6_ztoodgdxcQ"> 94 <meta http-equiv="X-UA-Compatible" content="IE=edge"> 95 <meta name="SKYPE_TOOLBAR" content="SKYPE_TOOLBAR_PARSER_COMPATIBLE"> 96 @if (!string.IsNullOrEmpty(robots)) 97 { 98 <meta name="robots" content="@robots"> 99 } 100 @OgMeta(designName) 101 @RenderSnippet("OGMeta") 102 @GetString("MetaTags") 103 @GetString("CopyRightNotice") 104 @GetString("Stylesheets") 105 @RenderSnippet("outScripts") 106 @GetString("Javascripts") 107 108 <link rel="shortcut icon" href="@(designFolder)images/favicon.ico" type="image/x-icon"> 109 @{ 110 var minify = GetBoolean("Item.Area.Minify_CSS_And_JavaScript"); 111 var styleBundle = Dna.Optimizer.Renderer.RenderStyles(string.Format("{0}css", designFolder), minify, true, "-main-styles", new[] { "exceptions" }); 112 var scriptBundle = Dna.Optimizer.Renderer.RenderScripts(string.Format("{0}js", designFolder), minify, true, "-main-scripts", new[] { "exceptions" }); 113 } 114 <link rel="stylesheet" href="@styleBundle"> 115 <script src="@scriptBundle"></script> 116 <!-- Global site tag (gtag.js) - Google Tag Manager --> 117 <script async="" src='https://www.googletagmanager.com/gtag/js?id=@GetString("Item.Area.GoogleTagManager")'></script> 118 <script> 119 window.dataLayer = window.dataLayer || []; 120 function gtag(){dataLayer.push(arguments);} 121 gtag('js', new Date()); 122 123 gtag('config', '@GetString("Item.Area.GoogleTagManager")'); 124 </script> 125 @SnippetStart("outScripts") @SnippetEnd("outScripts") 126 @if(string.IsNullOrEmpty(System.Web.HttpContext.Current.Request.Params["GroupID"])) { 127 @GetString("Item.Page.FloodlightTag.Value") 128 } 129 130 <!--[if lte IE 9]> 131 <script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script> 132 <script src="//cdnjs.cloudflare.com/ajax/libs/respond.js/1.1.0/respond.min.js"></script> 133 <![endif]--> 134 <script> 135 @RenderSnippet("jsVariables") 136 @SnippetStart("jsVariables") @SnippetEnd("jsVariables") 137 138 var obj_pages = { 139 str_miniCart: '@Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(GetString("Item.Area.MiniCart"))', 140 str_login: '@Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(GetString("Item.Area.Login"))', 141 str_globalTranslates: '@Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(GetString("Item.Area.GlobalTranslates"))', 142 str_initPopup: '@Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(GetString("Item.Area.ContactUs_Popup"))', 143 str_cartInformation: '@Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(GetString("Item.Area.Cart_Information"))' 144 }, 145 obj_user = { 146 str_country: '@userCountryCode', 147 str_state: '@userState' 148 }, 149 obj_settings = { 150 str_CaProp65Disclaimer : '@HttpUtility.JavaScriptStringEncode(GetString("Item.Area.CaProp65Disclaimer"))', 151 str_popupTimeout: '@GetString("Item.Area.Time")', 152 }, 153 obj_translates = { 154 str_caProp65Confirm : '@Translate("Ok, I Agree")', 155 str_caProp65Cancel : '@Translate("Cancel")', 156 }; 157 $(function () { 158 @UserDoesNotExist() 159 @RenderSnippet("jsOnLoadVariables") 160 @SnippetStart("jsOnLoadVariables") @SnippetEnd("jsOnLoadVariables") 161 @RenderSnippet("jsOnLoad") 162 @SnippetStart("jsOnLoad") @SnippetEnd("jsOnLoad") 163 }); 164 @SnippetStart("eCommerceTracking")@SnippetEnd("eCommerceTracking") 165 @RenderSnippet("eCommerceTracking") 166 </script> 167 <script> 168 @if(!GetBoolean("Item.Area.Banner") && !string.IsNullOrWhiteSpace(GetString("Item.Area.GoogleTagManager"))) 169 { 170 <text> 171 <!-- Google Tag Manager --> 172 (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': 173 new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], 174 j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 175 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); 176 })(window,document,'script','dataLayer','@GetString("Item.Area.GoogleTagManager")'); 177 <!-- End Google Tag Manager --> 178 </text> 179 } 180 </script> 181 @if(!GetBoolean("Item.Area.Banner") && !string.IsNullOrWhiteSpace(googleRemarketingTag)) 182 { 183 <!-- Google Code for Remarketing Tag --> 184 <text> 185 @SnippetStart("googleRemarketingTag")@SnippetEnd("googleRemarketingTag") 186 @RenderSnippet("googleRemarketingTag") 187 </text> 188 189 <script type="text/javascript"> 190 var google_conversion_id = @googleRemarketingTag; 191 var google_custom_params = window.google_tag_params; 192 var google_remarketing_only = true; 193 </script> 194 <script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js"></script> 195 <noscript> 196 <div style="display:inline;"> 197 <img height="1" width="1" style="border-style:none;" alt="" src="//googleads.g.doubleclick.net/pagead/viewthroughconversion/@googleRemarketingTag/?value=0&guid=ON&script=0"> 198 </div> 199 </noscript> 200 } 201 </head> 202 } 203 @helper UserDoesNotExist() 204 { 205 if (Dynamicweb.Environment.ExecutingContext.IsFrontEnd() && !Dynamicweb.Security.UserManagement.User.IsExtranetUserLoggedIn()) 206 { 207 if (!string.IsNullOrEmpty(System.Web.HttpContext.Current.Request.Params["Password"]) && !string.IsNullOrEmpty(System.Web.HttpContext.Current.Request.Params["Username"])) 208 { 209 @SnippetStart("jsOnLoad") 210 @:var showLogin = true; 211 @:alert('@Translate("userNotFoundInTheDatabase", "User not found in the database")'); 212 @SnippetEnd("jsOnLoad") 213 } 214 } 215 } 216 @helper Logo(string cssclass, string companyName, string designName) 217 { 218 string logo = !string.IsNullOrEmpty(System.Web.HttpContext.Current.Request.Params["print"]) ? "/Admin/Public/GetImage.ashx?Image=/Files/Templates/Designs/" + designName + "/images/logo.png&Width=220" : "/Files/Templates/Designs/" + designName + "/images/logo.png"; 219 220 <figure class="@cssclass"> 221 <a href="/" class="logo"> 222 <img class="img-responsive" src="@logo" alt="@companyName"> 223 </a> 224 </figure> 225 } 226 @helper DemoBanner() 227 { 228 if (GetBoolean("Item.Area.Banner") && System.Web.HttpContext.Current.Request.Cookies["demoMode"] == null) 229 { 230 <div class="demoMode">Demo</div> 231 } 232 } 233 @helper Copyright() 234 { 235 <div class="col-xs-12 text-center copyright"> 236 <span>&copy; @DateTime.Now.Year @GetString("Item.Area.CompanyName") @GetString("Item.Area.Copyright")</span> 237 @if (!string.IsNullOrEmpty(GetString("DwNavigation(copyrightMenu)"))) 238 { 239 @GetValue("DwNavigation(copyrightMenu)") 240 } 241 </div> 242 } 243 @functions { 244 private string CommaSplittedString(string CommaSplittedString, string NewString) 245 { 246 247 if (!string.IsNullOrEmpty(CommaSplittedString)) 248 { 249 CommaSplittedString += ", "; 250 } 251 CommaSplittedString += NewString; 252 253 return CommaSplittedString; 254 } 255 public static string StripHtml(string source) 256 { 257 return Regex.Replace(source, "<.*?>", string.Empty); 258 } 259 private void SetAffiliateCodeToCookie() 260 { 261 if (string.IsNullOrWhiteSpace((string) System.Web.HttpContext.Current.Request.QueryString["AffiliateCode"])) return; 262 263 System.Web.HttpCookie affiliateCode = new System.Web.HttpCookie("AffiliateCode"); 264 affiliateCode.Value = (string) System.Web.HttpContext.Current.Request.QueryString["AffiliateCode"]; 265 affiliateCode.Expires = DateTime.MinValue; 266 System.Web.HttpContext.Current.Response.Cookies.Add(affiliateCode); 267 } 268 } 269 @{ 270 string device = Pageview.Device.ToString(); 271 string homeOrSubpage = GetString("DwAreaFirstPageID") == Pageview.Page.ID.ToString() ? "home" : "subpage"; 272 string print = !string.IsNullOrEmpty(System.Web.HttpContext.Current.Request.Params["print"]) ? "printOrPdf" : ""; 273 string resultsPage = GetString("Item.Area.SearchResults"); 274 string countryCode = Rizzo.IP.Frontend.GetCountryCode(); 275 string longLang = Pageview.GlobalTags.GetTagByName("Global:Area.LongLang").Value.ToString(); 276 string email = GetString("Item.Area.Email"); 277 string phone = GetString("Item.Area.Phone"); 278 string skipToMainContent = System.Web.HttpContext.Current.Request.Url.PathAndQuery + "#contentWrapper"; 279 bool userIsLoggedIn = Dynamicweb.Security.UserManagement.User.IsExtranetUserLoggedIn(); 280 bool isPrint = !string.IsNullOrEmpty(System.Web.HttpContext.Current.Request.Params["print"]); 281 bool bol_backofficeLogged = Dynamicweb.Security.UserManagement.User.GetCurrentBackendUser() != null ? true : false; 282 List<LoopItem> socialMedia = GetLoop("Item.Area.SocialNetworks"); 283 List<LoopItem> websiteLanguages = GetLoop("WebsiteLanguages"); 284 string createAccountPage = GetString("Item.Area.CreateAccount"); 285 string loginPage = GetString("Item.Area.Login"); 286 }<!DOCTYPE html> 287 <!--[if lt IE 8 ]><html class="ie7" lang="@(longLang)"><![endif]--><!--[if IE 8 ]><html class="ie8" lang="@(longLang)"><![endif]--><!--[if IE 9 ]><html class="ie9" lang="@(longLang)"><![endif]--><!--[if (gt IE 9)|!(IE)]><!--> 288 <html lang="@(longLang)"> 289 <!--<![endif]--> 290 @HtmlHead(designName) 291 292 <body class="@device logged_@userIsLoggedIn.ToString() @homeOrSubpage @print" data-countrycode="@countryCode"> 293 @if (System.Web.HttpContext.Current.Request.Browser.Type.ToLowerInvariant().Contains("internetexplorer")) 294 { 295 <a id="focusableItemForIeFix" tabindex="-1" href="#"></a> 296 } 297 <a class="skip-main" id="skipContent" href="@skipToMainContent">@Translate("Skip to main content (press Enter)")</a> 298 <div class="wrap"> 299 <header id="headerContainer" class="container-fluid noPadding"> 300 <div id="topHeaderContainer" class="col-xs-12 noPadding"> 301 <div class="container"> 302 @if (!string.IsNullOrEmpty(GetString("DwNavigation(menuMain)"))) 303 { 304 <nav aria-label='@Translate("Navigation Menu")' id="mainNavContainer" class="navbar hidden navbar-default col-md-4 col-xs-12 noPadding"> 305 <div class="navbar-header"> 306 <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar"> 307 <i class="fa fa-bars"></i> 308 <span>@Translate("menu", "Menu")</span> 309 </button> 310 311 </div> 312 <div id="navbar" class="navbar-collapse collapse noPadding"> 313 @GetValue("DwNavigation(menuMain)") 314 </div> 315 </nav> 316 } 317 <div id="topMenuContainer" class="col-md-8 col-xs-12 noPadding pull-right"> 318 <div class="row"> 319 @Logo("col-sm-6 col-xs-12 hidden-xs", GetString("Item.Area.CompanyName"), designName) 320 @if (!string.IsNullOrEmpty(GetString("DwNavigation(topMenu)")) && !isPrint) 321 { 322 <nav aria-label='@Translate("Service Menu")' class="navbar navbar-default col-sm-6 col-xs-12"> 323 @RenderSnippet("socialMedia") 324 @GetValue("DwNavigation(topMenu)") 325 </nav> 326 } 327 @Logo("hidden-sm hidden-md hidden-lg", GetString("Item.Area.CompanyName"), designName) 328 </div> 329 </div> 330 </div> 331 </div> 332 <div id="searchContainer" class="col-xs-12 noPadding"> 333 <div class="container"> 334 <form action="/Default.aspx" id="searchForm" class="pull-right"> 335 <input type="hidden" name="ID" value="@resultsPage"> 336 <fieldset class="TextInput mandatory"> 337 <label for="searchSubmit">@Translate("search", "Search")</label> 338 <input placeholder='@Translate("search", "Search")' id="searchSubmit" data-error='@Translate("searchText", "Search for something")' type="text" name="q" value=""> 339 </fieldset> 340 <button type="submit"> 341 <i class="fa fa-search">Search</i> 342 </button> 343 <button type="reset"> 344 <i class="fa fa-close">Close</i> 345 </button> 346 </form> 347 </div> 348 </div> 349 <form id="masterExtUserForm" class="col-xs-12 DMForms userRelatedForms hidden" action="/" method="post" autocomplete="off"> 350 <input type="hidden" name="redirect" value='@Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl("Default.aspx?ID=" + Pageview.Page.ID.ToString())'> 351 <input type="hidden" name="ID" value="@(GetGlobalValue(" global:page.id"))"=""> 352 353 <fieldset class="mandatory TextInput"> 354 <label for="masterExtUserFormUsername" class="sr-only">@Translate("usernameEmail", "Username / Email")</label> 355 <input type="email" autocomplete="off" id="masterExtUserFormUsername" name="username" value="" aria-required="true"> 356 </fieldset> 357 <fieldset class="mandatory TextInput"> 358 <label for="masterExtUserFormPassword" class="sr-only">@Translate("password", "Password")</label> 359 <input autocomplete="off" type="text" id="masterExtUserFormPassword" name="password" value="" aria-required="true"> 360 </fieldset> 361 362 <div class="col-xs-12 noPadding"> 363 <input class="btn btn-bg" name="LoginAction" type="submit" value='@Translate("Login", "Login")'> 364 </div> 365 <div class="forgotButtons col-xs-12 noPadding"> 366 <a id="forgotPassword" href="@loginPage&amp;LoginAction=Recovery">@Translate("forgotYourPassword", "Forgot your password?")</a> 367 </div> 368 <div id="dontHaveAnAccount" class="col-xs-12 noPadding"> 369 <div> 370 @Translate("dontHaveAnAccount", "Don't have an account?") 371 <a href="@createAccountPage">@Translate("createAccount", "Create account")</a> 372 </div> 373 </div> 374 </form> 375 </header> 376 <section role="main" id="contentWrapper"> 377 @inherits RazorTemplateBase<RazorTemplateModel<Template>> 378 @using Dynamicweb.Rendering; 379 380 381 @inherits RazorTemplateBase<RazorTemplateModel<Template>> 382 @using Dynamicweb.Rendering; 383 384 @helper Breadcrumb() { 385 var link = System.Web.HttpContext.Current.Request.Url.PathAndQuery; 386 if (!string.IsNullOrEmpty(GetString("DwNavigation(breadCrumbsMenu2)"))) 387 { 388 <div class="col-xs-12 noPadding"> 389 <nav id="breadMenuContainer" class="col-xs-12 noPadding"> 390 <ul id="breadCrumbsMenu"> 391 <li><a href="/">@Translate("home", "Home")</a><span aria-hidden="true">&nbsp;>&nbsp;</span></li> 392 @GetValue("DwNavigation(breadCrumbsMenu2)") 393 @if (!string.IsNullOrEmpty(System.Web.HttpContext.Current.Request.Params["productid"])) 394 { 395 <li> 396 <span aria-hidden="true">&nbsp;>&nbsp;</span> 397 <a href="@link"></a> 398 </li> 399 } 400 </ul> 401 </nav> 402 </div> 403 } 404 } 405 406 @helper PageTitle() { 407 string groupName = GetString("Page:Ecom.ProductList.GroupName"); 408 string heading = GetString("Item.Page.PageHeading"); 409 string title = !String.IsNullOrEmpty(groupName) ? groupName : !String.IsNullOrEmpty(heading) ? heading : GetString("DwPageName"); 410 411 if (!GetBoolean("Item.Page.HidePageTitle.Value")) 412 { 413 <div id="pageTitleBg"> 414 <div class="container"> 415 @if (System.Web.HttpContext.Current.Request["ProductID"] == null) 416 { 417 <h1>@title</h1> 418 } 419 </div> 420 </div> 421 } 422 423 } 424 425 @helper CentralContent(string rightClass = "col-xs-12 noPadding") { 426 427 var brandPageClass = ""; 428 429 if (GetBoolean("Item.Page.IsBrandPage")) 430 { 431 brandPageClass = "brandPage"; 432 } 433 434 if (!string.IsNullOrEmpty(GetString("DwContent(centralContent)"))) 435 { 436 <section id="centralContainer" class="@rightClass @brandPageClass"> 437 <div id="centralContent" class="row">@GetValue("DwContent(centralContent)")</div> 438 </section> 439 } 440 } 441 442 @PageTitle() 443 444 @if (!GetBoolean("Item.Page.Hide3rdLevelMenu.Value") && !string.IsNullOrEmpty(GetString("DwNavigation(subMenu)"))) 445 { 446 string parentPageName = Pageview.Page.Parent.MenuText; 447 <div class="container pageSubMenu"> 448 <nav class="navbar navbar-default" id="subMenuNavbar"> 449 <div class="navbar-header"> 450 <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar4" aria-expanded="false" aria-controls="navbar4"> 451 <i class="fa fa-bars"></i> 452 <span>@Translate("menu", "Menu")</span> 453 </button> 454 </div> 455 <div id="navbar4" class="navbar-collapse collapse"> 456 @GetValue("DwNavigation(subMenu)") 457 </div> 458 </nav> 459 <h2 class="col-xs-12 noPadding">@GetString("DwPageName")</h2> 460 </div> 461 462 } 463 <div class="container"> 464 @Breadcrumb() 465 466 @CentralContent() 467 </div> 468 469 @* START CUSTOM CODE *@ 470 @{ 471 var googleTag = Pageview.Page.PropertyItem["GoogleTagId"] != null ? Pageview.Page.PropertyItem["GoogleTagId"].ToString() : String.Empty; 472 var bingTag = Pageview.Page.PropertyItem["BingTag"] != null ? Pageview.Page.PropertyItem["BingTag"].ToString() : String.Empty; 473 var casualIQTag = Pageview.Page.PropertyItem["CasualIQTag"] != null ? Pageview.Page.PropertyItem["CasualIQTag"].ToString() : String.Empty; 474 var undertoneTag = Pageview.Page.PropertyItem["UndertoneTag"] != null ? Pageview.Page.PropertyItem["UndertoneTag"].ToString() : String.Empty; 475 var newFloodlightsTag = Pageview.Page.PropertyItem["NewFloodlightsTag"] != null ? Pageview.Page.PropertyItem["NewFloodlightsTag"].ToString() : String.Empty; 476 var whoWhatWearTag = Pageview.Page.PropertyItem["WhoWhatWearTag"] != null ? Pageview.Page.PropertyItem["WhoWhatWearTag"].ToString() : String.Empty; 477 var sightlyTag = Pageview.Page.PropertyItem["SightlyTag"] != null ? Pageview.Page.PropertyItem["SightlyTag"].ToString() : String.Empty; 478 } 479 480 @if (!string.IsNullOrEmpty(googleTag)) 481 { 482 <script async="" src="https://www.googletagmanager.com/gtag/js?id=@googleTag"></script> 483 <script> window.dataLayer = window.dataLayer || []; 484 function gtag(){dataLayer.push(arguments);} 485 gtag('js', new Date()); 486 gtag('config', '@googleTag'); 487 </script> 488 } 489 490 @if (!string.IsNullOrEmpty(bingTag)) 491 { 492 <script>(function(w,d,t,r,u){var f,n,i;w[u]=w[u]||[],f=function(){var o={ti:"@bingTag", enableAutoSpaTracking: true};o.q=w[u],w[u]=new UET(o),w[u].push("pageLoad")},n=d.createElement(t),n.src=r,n.async=1,n.onload=n.onreadystatechange=function(){var s=this.readyState;s&&s!=="loaded"&&s!=="complete"||(f(),n.onload=n.onreadystatechange=null)},i=d.getElementsByTagName(t)[0],i.parentNode.insertBefore(n,i)})(window,document,"script","//bat.bing.com/bat.js","uetq");</script> 493 } 494 495 @if (!string.IsNullOrEmpty(casualIQTag)) 496 { 497 <iframe src='https://ciqtracking.com/p/v/1/@casualIQTag/format/iframe?' frameborder="0" width="1" height="1"></iframe> 498 } 499 500 @if (!string.IsNullOrEmpty(undertoneTag)) 501 { 502 <script type='text/javascript'> var p=location.protocol=='https:'?'https:':'http:';var r=Math.floor(Math.random()*999999);document.write('<img src="' + p + '//ads.undertone.com/t?trackerid=@undertoneTag&cb=' + r +'" alt="" style="display:none;" border="0" height="1" width="1" />');</script><noscript><img src="https://ads.undertone.com/t?trackerid=@undertoneTag&cb=[INSERT_YOUR_CACHE-BUSTER_HERE]" style="display: none;" width="0" height="0" alt=""></noscript> 503 } 504 505 @if (!string.IsNullOrEmpty(newFloodlightsTag)) 506 { 507 <script> 508 gtag('event', 'conversion', { 509 'allow_custom_scripts': true, 510 'send_to': 'DC-8553052/lp/shopt0+standard' 511 }); 512 </script> 513 <noscript> 514 <img src="https://ad.doubleclick.net/ddm/activity/src=@newFloodlightsTag;type=lp;cat=shopt0;dc_lat=;dc_rdid=;tag_for_child_directed_treatment=;tfua=;npa=;gdpr=${GDPR};gdpr_consent=${GDPR_CONSENT_755};ord=1?" width="1" height="1" alt=""> 515 </noscript> 516 } 517 518 @if (!string.IsNullOrEmpty(whoWhatWearTag)) 519 { 520 <script> 521 (function() { 522 var a = String(Math.floor(Math.random() * 10000000000000000)); 523 new Image().src = 'https://pubads.g.doubleclick.net/activity;xsp=@whoWhatWearTag;ord='+ a +'?'; 524 })(); 525 </script> 526 <noscript> 527 <img src='https://pubads.g.doubleclick.net/activity;xsp=@whoWhatWearTag;ord=1?' width="1" height="1" border="0"> 528 </noscript> 529 } 530 531 @if (!string.IsNullOrEmpty(sightlyTag)) 532 { 533 <script> 534 gtag('event', 'conversion', {'send_to': '@sightlyTag'}); 535 </script> 536 } 537 @* END CUSTOM CODE *@ 538 539 540 </section> 541 @if (!isPrint) 542 { 543 <footer id="footer" class="container-fluid noPadding"> 544 <div class="container"> 545 <div class="col-xs-12 noPadding"> 546 <form autocomplete="on" id="UserManagementEditForm" name="UserManagementEditForm" method="post" enctype="multipart/form-data" action='@GetString("Item.Area.NewsletterFooterSuccess")'> 547 <input type="hidden" name="UserManagementForm" value="1"><input type="hidden" id="UserManagementForm.DeleteImage" name="UserManagementForm.DeleteImage"> 548 <input name="UserManagement_Form_EmailAllowed_ApplyValue" type="hidden" id="UserManagement_Form_EmailAllowed_ApplyValue" value="AllowEmail"> 549 <input name="UserManagement_Form_EmailAllowed" type="hidden" id="UserManagement_Form_EmailAllowed" value="True"> 550 @if (!userIsLoggedIn) 551 { 552 var passwordGenerator = Dynamicweb.Security.Utilities.PasswordGenerator.GeneratePassword(6, Dynamicweb.Security.Utilities.PasswordGenerator.SecurityLevel.High); 553 554 <input name="UserManagement_Form_NewPassword" type="hidden" id="UserManagement_Form_NewPassword" value="@passwordGenerator"> 555 <input name="UserManagement_Form_NewPasswordConfirm" type="hidden" id="UserManagement_Form_NewPasswordConfirm" value="@passwordGenerator"> 556 } 557 558 <fieldset class="emailSignup mandatory checkEmail"> 559 <label for="yourEmail"><span aria-hidden="true" class="asteriskRequiredFields">*</span>@Translate("signupforspecialoffers", "Sign up for special offers and more")</label> 560 <input type="email" name="UserManagement_Form_Email" id="yourEmail" required="" placeholder='@Translate("yourEmailAddress", "")' value="" aria-required="true"> 561 <input type="submit" class="btn btn-bg" value='@Translate("signup", "Sign me up")'> 562 </fieldset> 563 </form> 564 @SnippetStart("jsOnLoad") 565 onLoadValidateNewsletter("#UserManagementEditForm"); 566 @SnippetEnd("jsOnLoad") 567 </div> 568 569 @if (!string.IsNullOrEmpty(GetString("DwNavigation(bottomMenu)"))) 570 { 571 <nav id="bottomMenuContainer" class="col-xs-12"> 572 @GetValue("DwNavigation(bottomMenu)") 573 </nav> 574 } 575 576 </div> 577 @Copyright() 578 @DemoBanner() 579 @GetString("Item.Area.Universal_Pixel") 580 </footer> 581 } 582 </div> 583 @if (bol_backofficeLogged) 584 { 585 <div id="urlPath" class="text-center col-xs-12"> 586 @Pageview.GlobalTags.GetTagByName("Global:Request.PathAndQuery").Value <br> 587 @Pageview.GlobalTags.GetTagByName("Global:Request.Url").Value 588 </div> 589 } 590 </body> 591 </html> 592 593 @SnippetStart("socialMedia") 594 <ul class="noPadding hidden-sm hidden-md hidden-lg" id="socialMedia"> 595 @foreach (LoopItem socialItem in socialMedia) 596 { 597 string className = socialItem.GetString("Item.Area.SocialNetworks.Icon"), 598 socialName = socialItem.GetString("Item.Area.SocialNetworks.Name"), 599 socialLink = socialItem.GetString("Item.Area.SocialNetworks.Link"); 600 601 socialLink = !string.IsNullOrEmpty(socialLink) ? socialLink : "#"; 602 603 <li><a class="@className fa" target="_blank" href="@socialLink" aria-label='@Translate("Find us on") @socialName'><span class="hidden">@socialName</span></a></li> 604 } 605 </ul> 606 @SnippetEnd("socialMedia")