Error compiling template "Designs/PacificBag/_parsed/leftMenu.parsed.cshtml"
Line 804: 'Dynamicweb.Ecommerce.Products.Group.GetGroupById(string)' is obsolete: 'Use Services.ProductGroups.GetGroup instead.'
Line 1783: No overload for method 'PageTitle' takes 0 arguments

1 @inherits RazorTemplateBase<RazorTemplateModel<Template>> 2 @using System 3 @using System.Linq 4 @using Dynamicweb.Rendering 5 @using Dynamicweb.Content 6 @using System.Text.RegularExpressions 7 @using System.Web.UI.HtmlControls 8 @{ string designName = GetString("Template:DesignBaseUrl").Replace("/Files/Templates/Designs/", "").Replace("/", "");}@functions{ 9 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 = "PacificBag") 10 { 11 Dynamicweb.Frontend.PageView currentPageview = Dynamicweb.Frontend.PageView.Current(); 12 string currDevice = currentPageview.Device.ToString(); 13 string alternativeImage = !String.IsNullOrEmpty(currentPageview.Area.Item["NoImage"].ToString()) ? currentPageview.Area.Item["NoImage"].ToString() : "/Files/Templates/Designs/"+ designName + "/images/alternativeImage.jpg"; 14 string widthString = ""; 15 string heightString = ""; 16 string getImageFormat = imageFormat != "jpg" ? "&amp;Format=" + imageFormat : ""; 17 string getImageCompression = imageCompression != 0 ? "&amp;Compression=" + imageCompression : ""; 18 string bgColor = !string.IsNullOrEmpty(background) ? "&amp;Background="+background : ""; 19 int getImageWidth = imageWidth != 0 ? imageWidth : 0; 20 int getImageHeight = imageHeight != 0 ? imageHeight : 0; 21 22 if (currDevice == Dynamicweb.Frontend.Devices.DeviceType.Tablet.ToString()) 23 { 24 getImageWidth = imageWidthTablet != 0 ? imageWidthTablet : getImageWidth; 25 getImageHeight = imageHeightTablet != 0 ? imageHeightTablet : getImageHeight; 26 } 27 else if (currDevice == Dynamicweb.Frontend.Devices.DeviceType.Mobile.ToString()) 28 { 29 getImageWidth = imageWidthMobile != 0 ? imageWidthMobile : getImageWidth; 30 getImageHeight = imageHeightMobile != 0 ? imageHeightMobile : getImageHeight; 31 } 32 33 if (getImageWidth != 0) 34 { 35 widthString = "&amp;Width=" + getImageWidth; 36 } 37 if (getImageHeight != 0) 38 { 39 heightString = "&amp;Height=" + getImageHeight; 40 } 41 42 string output = "/Admin/Public/GetImage.ashx?Image=" + sourceString + widthString + heightString + "&amp;altFmImage_path=" + alternativeImage + getImageFormat + getImageCompression + "&amp;Crop=" + imageCrop + bgColor; 43 return output; 44 } 45 46 public static string GetImageWhiteSpace(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 = "PacificBag") 47 { 48 Dynamicweb.Frontend.PageView currentPageview = Dynamicweb.Frontend.PageView.Current(); 49 string currDevice = currentPageview.Device.ToString(); 50 string alternativeImage = "/Files/Templates/Designs/" + designName + "/images/white80.png"; 51 string widthString = ""; 52 string heightString = ""; 53 string getImageFormat = imageFormat != "jpg" ? "&amp;Format=" + imageFormat : ""; 54 string getImageCompression = imageCompression != 0 ? "&amp;Compression=" + imageCompression : ""; 55 string bgColor = !string.IsNullOrEmpty(background) ? "&amp;Background="+background : ""; 56 int getImageWidth = imageWidth != 0 ? imageWidth : 0; 57 int getImageHeight = imageHeight != 0 ? imageHeight : 0; 58 59 if (currDevice == Dynamicweb.Frontend.Devices.DeviceType.Tablet.ToString()) 60 { 61 getImageWidth = imageWidthTablet != 0 ? imageWidthTablet : getImageWidth; 62 getImageHeight = imageHeightTablet != 0 ? imageHeightTablet : getImageHeight; 63 } 64 else if (currDevice == Dynamicweb.Frontend.Devices.DeviceType.Mobile.ToString()) 65 { 66 getImageWidth = imageWidthMobile != 0 ? imageWidthMobile : getImageWidth; 67 getImageHeight = imageHeightMobile != 0 ? imageHeightMobile : getImageHeight; 68 } 69 70 if (getImageWidth != 0) 71 { 72 widthString = "&amp;Width=" + getImageWidth; 73 } 74 if (getImageHeight != 0) 75 { 76 heightString = "&amp;Height=" + getImageHeight; 77 } 78 79 string output = "/Admin/Public/GetImage.ashx?Image=" + sourceString + widthString + heightString + "&amp;altFmImage_path=" + alternativeImage + getImageFormat + getImageCompression + "&amp;Crop=" + imageCrop + bgColor; 80 return output; 81 } 82 } 83 @functions{ 84 public string GetCurrentUrl() 85 { 86 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(); 87 88 return currentUrl; 89 } 90 } 91 @using System.Runtime 92 @using Dynamicweb.Rendering 93 @using System.Text.RegularExpressions 94 @using Dynamicweb.Core 95 @inherits RazorTemplateBase<RazorTemplateModel<Template>> 96 97 @helper OgMeta(string designName) 98 { 99 if (string.IsNullOrEmpty(System.Web.HttpContext.Current.Request.Params["ProductID"])) 100 { 101 @SnippetStart("OGMeta")<meta property="og:title" content='@GetString("Title")'> 102 <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'> 103 <meta property="og:site_name" content='@GetString("Item.Area.CompanyName")'> 104 <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()'> 105 <meta property="og:description" content='@StripHtml(GetString("Meta.Description"))'> 106 <meta property="og:type" content="article"> 107 <meta property="og:locale" content='@Pageview.GlobalTags.GetTagByName("Global:Area.LongLang").Value.ToString().Replace("-", "_")'> 108 @SnippetEnd("OGMeta") 109 } 110 } 111 @helper HtmlHead(string designName) 112 { 113 string designFolder = GetString("Template:DesignBaseUrl"); 114 string robots = ""; 115 string ipCountry = Dna.IP.Frontend.GetCountryCode(); 116 var googleReCaptchaSiteKey = GetString("Item.Area.GoogleReCaptchaSiteKey"); 117 string countryCodeModule = !string.IsNullOrEmpty(ipCountry) ? ipCountry : "US"; 118 string userCountryCode = (Pageview.User != null && !string.IsNullOrEmpty(Pageview.User.Country)) ? Pageview.User.Country : ipCountry; 119 string userState = Pageview.User != null ? Pageview.User.State : string.Empty; 120 string userAccountsNumber = (System.Web.HttpContext.Current.Session["AccountsNumber"] ?? "").ToString(); 121 robots = (GetBoolean("Item.Area.DemoBanner") || GetBoolean("Item.Area.NoIndex")) ? CommaSplittedString(robots, "noindex") : ""; 122 robots += (GetBoolean("Item.Area.DemoBanner") || GetBoolean("Item.Area.NoFollow")) ? CommaSplittedString(robots, "nofollow") : ""; 123 124 <head> 125 126 <!-- begin SnapEngage code --> 127 <script type="text/javascript"> 128 (function() { 129 var se = document.createElement('script'); se.type = 'text/javascript'; se.async = true; 130 se.src = '//storage.googleapis.com/code.snapengage.com/js/326bf66f-7884-4214-bcd8-09da130b6534.js'; 131 var done = false; 132 se.onload = se.onreadystatechange = function() { 133 if (!done&&(!this.readyState||this.readyState==='loaded'||this.readyState==='complete')) { 134 done = true; 135 /* Place your SnapEngage JS API code below */ 136 /* SnapEngage.allowChatSound(true); Example JS API: Enable sounds for Visitors. */ 137 } 138 }; 139 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(se, s); 140 })(); 141 </script> 142 <!-- end SnapEngage code --> 143 144 <!-- begin callrail code --> 145 <script type="text/javascript" src="////cdn.callrail.com/companies/766488212/4fcfef21bce1680f2716/12/swap.js"></script> 146 <!-- end callrail code --> 147 148 <!-- begin hellobar code --> 149 <script>(function(w,d,t,r,u){var f,n,i;w[u]=w[u]||[],f=function(){var o={ti:"21000061"};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> 150 <script src="https://my.hellobar.com/cef4edf037f4a5eb8a87717b77b678872e81b91e.js" type="text/javascript" charset="utf-8" async="async"></script> 151 <!-- end hellobar code --> 152 153 <!-- Facebook Pixel Code --> 154 155 <script> 156 157 !function(f,b,e,v,n,t,s) 158 159 {if(f.fbq)return;n=f.fbq=function(){n.callMethod? 160 161 n.callMethod.apply(n,arguments):n.queue.push(arguments)}; 162 163 if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0'; 164 165 n.queue=[];t=b.createElement(e);t.async=!0; 166 167 t.src=v;s=b.getElementsByTagName(e)[0]; 168 169 s.parentNode.insertBefore(t,s)}(window,document,'script', 170 171 'https://connect.facebook.net/en_US/fbevents.js'); 172 173 174 fbq('init', '1576804409143309'); 175 176 fbq('track', 'PageView'); 177 178 </script> 179 180 <noscript> 181 182 <img height="1" width="1" src="https://www.facebook.com/tr?id=1576804409143309&ev=PageView 183 184 &noscript=1"> 185 186 </noscript> 187 188 <!-- End Facebook Pixel Code --> 189 190 <title>@GetValue("Title")</title> 191 <meta http-equiv="content-type" content="text/html; charset=utf-8"> 192 <meta name="viewport" content="initial-scale=1.0, width=device-width, user-scalable=no"> 193 <meta http-equiv="X-UA-Compatible" content="IE=edge"> 194 <meta name="SKYPE_TOOLBAR" content="SKYPE_TOOLBAR_PARSER_COMPATIBLE"> 195 @if (!string.IsNullOrEmpty(robots)) 196 { 197 <meta name="robots" content="@robots"> 198 } 199 @OgMeta(designName) 200 @RenderSnippet("OGMeta") 201 @GetString("MetaTags") 202 @GetString("CopyRightNotice") 203 @GetString("Stylesheets") 204 @RenderSnippet("outScripts") 205 @GetString("Javascripts") 206 207 <!-- Begin Bing Conversion Tracking --> 208 209 <script>(function(w,d,t,r,u){var f,n,i;w[u]=w[u]||[],f=function(){var o={ti:"21000061"};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> 210 211 <!-- End Bing Conversion Tracking Code --> 212 213 <link rel="shortcut icon" href="@(designFolder)images/favicon.ico" type="image/x-icon"> 214 @{ 215 var minify = GetBoolean("Item.Area.Minify_CSS_And_JavaScript"); 216 var styleBundle = Dna.Optimizer.Renderer.RenderStyles(string.Format("{0}css", designFolder), minify, true, "-main-styles", new[] { "exceptions" }); 217 var scriptBundle = Dna.Optimizer.Renderer.RenderScripts(string.Format("{0}js", designFolder), minify, true, "-main-scripts", new[] { "exceptions" }); 218 } 219 <link rel="stylesheet" href="@styleBundle"> 220 @if (googleReCaptchaSiteKey.IsNotNullOrEmpty()) 221 { 222 <script src="https://www.google.com/recaptcha/api.js" async="" defer=""></script> 223 } 224 <script src="@scriptBundle"></script> 225 @SnippetStart("outScripts") @SnippetEnd("outScripts") 226 <!--[if lte IE 9]> 227 <script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script> 228 <script src="//cdnjs.cloudflare.com/ajax/libs/respond.js/1.1.0/respond.min.js"></script> 229 <![endif]--> 230 <script> 231 @RenderSnippet("jsVariables") 232 @SnippetStart("jsVariables") @SnippetEnd("jsVariables") 233 234 var obj_pages = { 235 str_miniCart: '@Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(GetString("Item.Area.MiniCart"))', 236 str_login: '@Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(GetString("Item.Area.Login"))', 237 str_globalTranslates: '@Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(GetString("Item.Area.GlobalTranslates"))', 238 str_contactPopup : '@Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(GetString("Item.Area.ContactUs_Popup"))', 239 str_cartInformation: '@Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(GetString("Item.Area.Cart_Information"))', 240 str_typeAhead : '@Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(GetString("Item.Area.TypeAhead"))' 241 }, 242 obj_user = { 243 str_country: '@userCountryCode', 244 str_state: '@userState', 245 str_accountsNumber:'@userAccountsNumber' 246 }, 247 obj_settings = { 248 str_contactTimeout: '@GetString("Item.Area.Time")', 249 str_cartQty: '@GetString("Ecom:Order.OrderLines.TotalProductQuantity")' 250 }, 251 obj_translates = { 252 str_seeAll: '@Translate("seeAllThe", "See all the")', 253 str_results: '@Translate("results", "results")', 254 str_invalidAddress: '@Translate("invalidAddress", "Something isn’t correct with your address. Please check that each *required line has appropriate information in it, e.g. Address line 1 has an actual street address.")' 255 }; 256 $(function () { 257 @UserDoesNotExist() 258 @RenderSnippet("jsOnLoadVariables") 259 @SnippetStart("jsOnLoadVariables") @SnippetEnd("jsOnLoadVariables") 260 @RenderSnippet("jsOnLoad") 261 @SnippetStart("jsOnLoad") @SnippetEnd("jsOnLoad") 262 }); 263 @if(!string.IsNullOrWhiteSpace(GetString("Item.Area.GoogleAnalytics"))) 264 { 265 <text> 266 (function (i, s, o, g, r, a, m) { 267 i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () { 268 (i[r].q = i[r].q || []).push(arguments) 269 }, i[r].l = 1 * new Date(); a = s.createElement(o), 270 m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m) 271 })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga'); 272 273 ga('create', '@GetString("Item.Area.GoogleAnalytics")', 'auto'); 274 ga('send', 'pageview'); 275 </text> 276 } 277 </script> 278 @{ 279 var googleAdwords = GetString("Item.Area.GoogleAdwords"); 280 } 281 @if (!string.IsNullOrWhiteSpace(googleAdwords)) 282 { 283 <script async="" src="https://www.googletagmanager.com/gtag/js?id=@googleAdwords"></script> 284 <script> 285 window.dataLayer = window.dataLayer || []; 286 function gtag(){dataLayer.push(arguments);} 287 gtag('js', new Date()); 288 289 gtag('config', '@googleAdwords'); 290 </script> 291 } 292 293 @RenderSnippet("eCommerceTracking") 294 @SnippetStart("eCommerceTracking") @SnippetEnd("eCommerceTracking") 295 </head> 296 } 297 @helper RenderPageImageVideo(string image, string video) 298 { 299 if (!String.IsNullOrWhiteSpace(video)) 300 { 301 image = "/Admin/Public/GetImage.ashx?Image=" + image + "&Height=1080&Crop=5"; 302 303 <section id="topMediaContainer" data-image="@image" data-video="@video"> 304 @if (!String.IsNullOrWhiteSpace(image)) 305 { 306 <img src="@image" class="hidden"> 307 } 308 @if (!String.IsNullOrWhiteSpace(video)) 309 { 310 <span class="hidden">@video</span> 311 } 312 </section> 313 @SnippetStart("jsOnLoad") 314 @:onLoadTopMediaContainer("@(GetString("Item.Page.ButtonText"))", "@(GetString("Item.Page.ButtonLink"))"); 315 @SnippetEnd("jsOnLoad") 316 } 317 } 318 319 @helper RenderPageHeading(string heading, string subHeading, string image, string video, bool leftAlign) 320 { 321 image = !String.IsNullOrWhiteSpace(image) ? "/Admin/Public/GetImage.ashx?Image=" + image + "&Height=1080&Crop=5" : ""; 322 string topMediaContainerClass = GetBoolean("Item.Page.BigHeader") ? "bigHeader" : String.Empty; 323 topMediaContainerClass += GetBoolean("Item.Page.NoWhiteText") ? " noWhiteText" : String.Empty; 324 var request = System.Web.HttpContext.Current.Request.Params; 325 string buttonText = GetString("Item.Page.ButtonText"), 326 buttonLink = GetString("Item.Page.ButtonLink"); 327 328 // Group Image - Banner 329 if (request["groupid"] != null) 330 { 331 var group = Dynamicweb.Ecommerce.Products.Group.GetGroupById(request["groupid"].ToString()); 332 333 if(group != null){ 334 if (group.ParentGroups.Count > 0) 335 { 336 group = group.ParentGroups[0]; 337 } 338 339 string groupName = group.Name; 340 string groupImage = !string.IsNullOrWhiteSpace(group.LargeImage) ? group.LargeImage : group.SmallImage; 341 string groupDescription = group.ProductGroupFieldValues.GetProductGroupFieldValue("BannerDescription").Value.ToString(); 342 343 if (!string.IsNullOrWhiteSpace(groupImage)) 344 { 345 heading = groupName; 346 subHeading = groupDescription; 347 image = "/Admin/Public/GetImage.ashx?Image=/Files" + groupImage + "&Height=1080&Crop=5"; 348 } 349 } 350 351 } 352 353 if (!String.IsNullOrWhiteSpace(image) && String.IsNullOrWhiteSpace(video)) 354 { 355 string layoutType = !string.IsNullOrWhiteSpace(subHeading) ? "twoColumn" : "oneColumn"; 356 string headerClass = leftAlign ? "text-left" : ""; 357 358 <section id="pageHeadingContainer" class="@topMediaContainerClass" style="background-image:url('@image')"> 359 <div id="pageHeadingContent" class="container @layoutType"> 360 <p class="h1 @headerClass">@heading</p> 361 <p>@subHeading 362 @if (!string.IsNullOrEmpty(buttonLink)) 363 { 364 <a class="btn btn-bg pull-left" href="@buttonLink">@buttonText</a> 365 } 366 </p> 367 </div> 368 </section> 369 } 370 } 371 @helper UserDoesNotExist() 372 { 373 if (Dynamicweb.Environment.ExecutingContext.IsFrontEnd() && !Dynamicweb.Security.UserManagement.User.IsExtranetUserLoggedIn()) 374 { 375 if (!string.IsNullOrEmpty(System.Web.HttpContext.Current.Request.Params["Password"]) && !string.IsNullOrEmpty(System.Web.HttpContext.Current.Request.Params["Username"])) 376 { 377 @SnippetStart("jsOnLoad") 378 @:var showLogin = true; 379 @:alert("@(Translate("userNotFoundInTheDatabase", "User not found in the database"))"); 380 @SnippetEnd("jsOnLoad") 381 } 382 } 383 } 384 @helper Logo(string cssclass, string companyName, string designName) 385 { 386 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"; 387 388 <figure class="@cssclass"> 389 <a href="/"> 390 <img class="img-responsive" src="@logo" alt="@companyName" title="@companyName"> 391 </a> 392 </figure> 393 } 394 @helper DemoBanner() 395 { 396 if (GetBoolean("Item.Area.Banner") && System.Web.HttpContext.Current.Request.Cookies["demoMode"] == null) 397 { 398 <div class="demoMode">Demo</div> 399 } 400 } 401 @helper Copyright() 402 { 403 <div class="col-xs-12 copyright">&copy; @DateTime.Now.Year @GetString("Item.Area.CompanyName") @*- @GetString("Item.Area.Copyright")*@</div> 404 } 405 406 @helper RenderSearchBar() 407 { 408 var resultsPage = GetInteger("Item.Area.SearchResults"); 409 var q = (System.Web.HttpContext.Current.Request["q"] ?? "").ToString(); 410 411 <div id="searchContainer" class="col-sm-offset-4 col-sm-8 col-xs-12"> 412 <div class="searchContainer col-xs-12"> 413 <form action="/Default.aspx" id="searchForm"> 414 <fieldset class="col-xs-4 Select mandatory pull-right hidden"> 415 <label for="searchSubmit" class="hide">@Translate("search", "Search")</label> 416 <select name="ID"> 417 <option value="@resultsPage" selected="">@Translate("productSearch", "Product Search")</option> 418 </select> 419 </fieldset> 420 <fieldset class="col-xs-12 TextInput mandatory noPadding"> 421 <label for="searchSubmit" class="hide">@Translate("search", "Search")</label> 422 <input placeholder='@Translate("search", "Search")' id="searchSubmit" data-error='@Translate("searchText", "Search for something")' type="text" name="q" value="@q"> 423 </fieldset> 424 <input type="submit" class="hidden" value="send"> 425 </form> 426 </div> 427 <div id="autocompleteWrap">&nbsp;</div> 428 </div> 429 } 430 431 @functions { 432 private string CommaSplittedString(string CommaSplittedString, string NewString) 433 { 434 435 if (!string.IsNullOrEmpty(CommaSplittedString)) 436 { 437 CommaSplittedString += ", "; 438 } 439 CommaSplittedString += NewString; 440 441 return CommaSplittedString; 442 } 443 public static string StripHtml(string source) 444 { 445 return Regex.Replace(source, "<.*?>", string.Empty); 446 } 447 } 448 @{ 449 var currentQuery = "Default.aspx" + System.Web.HttpContext.Current.Request.Url.Query; 450 if (!string.IsNullOrEmpty(currentQuery) && currentQuery.ToLower().Equals(string.Format("default.aspx?id={0}", Pageview.Page.ID))) 451 { 452 var newQuery = currentQuery; 453 var filterParamters = GetString("Item.Page.FilterParameters").Split(new string[] {"&", "?"}, StringSplitOptions.RemoveEmptyEntries); 454 455 foreach (var fp in filterParamters) 456 { 457 if (!currentQuery.Contains(fp.Substring(0, fp.IndexOf("=")) + "=")) 458 { 459 newQuery += newQuery.Contains("?") ? "&" : "?"; 460 newQuery += fp; 461 } 462 } 463 464 if (currentQuery != newQuery) 465 { 466 System.Web.HttpContext.Current.Response.Redirect(Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(newQuery), true); 467 } 468 } 469 470 string device = Pageview.Device.ToString(); 471 string homeOrSubpage = GetString("DwAreaFirstPageID") == Pageview.Page.ID.ToString() ? "home" : "subpage"; 472 string print = !string.IsNullOrEmpty(System.Web.HttpContext.Current.Request.Params["print"]) ? "printOrPdf" : ""; 473 string contactUsPage = GetString("Item.Area.ContactUs"); 474 string countryCode = Dna.IP.Frontend.GetCountryCode(); 475 string longLang = Pageview.GlobalTags.GetTagByName("Global:Area.LongLang").Value.ToString(); 476 string email = GetString("Item.Area.Email"); 477 string phone = GetString("Item.Area.Phone"); 478 bool userIsLoggedIn = Dynamicweb.Security.UserManagement.User.IsExtranetUserLoggedIn(); 479 bool isPrint = !string.IsNullOrEmpty(System.Web.HttpContext.Current.Request.Params["print"]); 480 bool bol_backofficeLogged = Dynamicweb.Security.UserManagement.User.GetCurrentBackendUser() != null ? true : false; 481 List<LoopItem> socialMedia = GetLoop("Item.Area.SocialNetworks"); 482 List<LoopItem> websiteLanguages = GetLoop("WebsiteLanguages"); 483 if (userIsLoggedIn) 484 { 485 string logedUserId = Pageview.User.CurrentSecondaryUser == null ? Dynamicweb.Security.UserManagement.User.GetCurrentExtranetUserId().ToString() : Pageview.User.CurrentSecondaryUser.ID.ToString(); 486 System.Web.HttpContext.Current.Session["UserId"] = logedUserId; 487 488 if (System.Web.HttpContext.Current.Request["DWExtranetSecondaryUserSelector"] != null && Pageview.User.CurrentSecondaryUser != null) 489 { 490 System.Web.HttpContext.Current.Session["AccountsNumber"] = Pageview.User.CurrentSecondaryUser.GetUsersICanSetAsSecondary().Count; 491 } 492 } 493 }<!DOCTYPE HTML> 494 <!--[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)]><!--> 495 <html lang="@(longLang)"> 496 <!--<![endif]--> 497 @HtmlHead(designName) 498 <body class="@device logged_@userIsLoggedIn.ToString() @homeOrSubpage @print" data-countrycode="@countryCode"> 499 <div class="wrap"> 500 <header id="headerContainer" class="container-fluid noPadding"> 501 <h1 class="hidden">@GetString("Title")</h1> 502 <div id="topHeaderContainer" class="col-xs-12 noPadding"> 503 <div class="container noPadding"> 504 @Logo("col-md-4 col-sm-6 col-xs-12", GetString("Item.Area.CompanyName"), designName) 505 @if (!string.IsNullOrEmpty(GetString("DwNavigation(topMenu)")) && !isPrint) 506 { 507 <nav id="topMenuContainer" class="navbar navbar-default col-xs-12 col-sm-6 col-md-8"> 508 <div class="col-xs-12 welcomeBack"> 509 @if (userIsLoggedIn) 510 { 511 string userName = !string.IsNullOrWhiteSpace(Pageview.User.Name) ? Pageview.User.Name : string.Format("{0}{1}", Pageview.User.FirstName, Pageview.User.LastName); 512 string pageId = Pageview.Page.ID.ToString(); 513 bool isImpersonate = Pageview.User.CurrentSecondaryUser != null; 514 string switchAccountUrl = string.Format("Default.aspx?ID={0}", (Pageview.Area.Item["ManageAccounts"] ?? "").ToString()); 515 516 if (isImpersonate && !(System.Web.HttpContext.Current.Session["AccountsNumber"] ?? "").ToString().Equals("1")) 517 { 518 <span>@Translate("managingAccount", "Managing Account"): @(!string.IsNullOrWhiteSpace(userName) ? userName : Pageview.User.UserName)</span> 519 <a href="@switchAccountUrl">@Translate("switchAccount", "SwitchAccount")</a> 520 <a href="/Admin/Public/ExtranetLogoff.aspx">@Translate("logout", "Logout")</a> 521 } 522 else 523 { 524 <span>@Translate("welcomeBack", "Welcome Back,") @(!string.IsNullOrWhiteSpace(userName) ? userName : Pageview.User.UserName)</span> 525 <a href="/Admin/Public/ExtranetLogoff.aspx">@Translate("logout", "Logout")</a> 526 } 527 } 528 </div> 529 @RenderSearchBar() 530 @GetValue("DwNavigation(topMenu)") 531 </nav> 532 } 533 </div> 534 </div> 535 <div id="menuMainContainer" class="col-xs-12 noPadding"> 536 <div id="mainNavContainer" class="col-xs-12 noPadding"> 537 <div class="container noPadding"> 538 @if (!string.IsNullOrEmpty(GetString("DwNavigation(menuMain)"))) 539 { 540 <nav class="navbar navbar-default"> 541 <div class="navbar-header"> 542 <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar"> 543 <i class="fa fa-bars"></i> 544 </button> 545 </div> 546 <div id="navbar" class="navbar-collapse collapse noPadding"> 547 @GetValue("DwNavigation(menuMain)") 548 </div> 549 </nav> 550 } 551 </div> 552 </div> 553 </div> 554 @RenderSnippet("loginForm") 555 </header> 556 @RenderPageImageVideo(GetString("Item.Page.Image"), GetString("Item.Page.Video")) 557 @RenderPageHeading(GetString("Item.Page.PageHeading"), GetString("Item.Page.PageSubHeading"), GetString("Item.Page.Image"), GetString("Item.Page.Video"), GetBoolean("Item.Page.PageHeadingAlignLeft")) 558 559 @if (!GetBoolean("Item.Page.Hide2ndLevelMenu") && !GetString("Item.ItemInstanceType").Equals("News")) 560 { 561 @GetValue("DwNavigation(groupMenu)") 562 } 563 564 <section id="contentWrapper"> 565 @inherits RazorTemplateBase<RazorTemplateModel<Template>> 566 @using Dynamicweb.Rendering; 567 568 569 @inherits RazorTemplateBase<RazorTemplateModel<Template>> 570 @using Dynamicweb.Rendering; 571 572 @helper Breadcrumb() { 573 if (!string.IsNullOrEmpty(GetString("DwNavigation(breadCrumbsMenu2)"))) 574 { 575 <div class="col-xs-12 noPadding"> 576 <nav id="breadMenuContainer" class="col-xs-12 noPadding"> 577 <ul id="breadCrumbsMenu"> 578 <li><a href="/">@Translate("home", "Home")</a></li> 579 @GetValue("DwNavigation(breadCrumbsMenu2)") 580 @if (!string.IsNullOrEmpty(System.Web.HttpContext.Current.Request.Params["productid"])) 581 { 582 <li> 583 &nbsp;»&nbsp; 584 @GetString("Title") 585 </li> 586 } 587 </ul> 588 </nav> 589 </div> 590 } 591 } 592 593 @helper PageTitle(string image, string video) 594 { 595 if (String.IsNullOrWhiteSpace(image) && String.IsNullOrWhiteSpace(video) && !GetBoolean("Item.Page.HidePageTitle")) 596 { 597 string heading = GetString("Item.Page.PageHeading"), 598 title = !String.IsNullOrEmpty(heading) ? heading : GetString("DwPageName"); 599 <div class="container pageTitle"> 600 <div class="h1">@title</div> 601 </div> 602 } 603 } 604 605 @helper CentralContent(string rightClass = "col-xs-12 noPadding") { 606 if (!string.IsNullOrEmpty(GetString("DwContent(fullWidthContent)"))) 607 { 608 <section id="fullWidthContainer" class="container-fluid fullWidthSection"> 609 <div id="fullWidthContent" class="row">@GetValue("DwContent(fullWidthContent)")</div> 610 </section> 611 } 612 613 if (!string.IsNullOrEmpty(GetString("DwContent(centralContent)"))) 614 { 615 <div class="container"> 616 <section id="centralContainer" class="col-xs-12 noPadding-xs"> 617 <div id="centralContent" class="row">@GetValue("DwContent(centralContent)")</div> 618 </section> 619 </div> 620 } 621 622 if (!string.IsNullOrEmpty(GetString("DwContent(fullWidthContent2)"))) 623 { 624 <section id="fullWidthContainer2" class="container-fluid fullWidthSection"> 625 <div id="fullWidthContent2" class="row">@GetValue("DwContent(fullWidthContent2)")</div> 626 </section> 627 } 628 629 if (!string.IsNullOrEmpty(GetString("DwContent(centralContent2)"))) 630 { 631 <div class="container"> 632 <section id="centralContainer2" class="col-xs-12 noPadding-xs"> 633 <div id="centralContent2" class="row">@GetValue("DwContent(centralContent2)")</div> 634 </section> 635 </div> 636 } 637 } 638 639 @Breadcrumb() 640 @PageTitle() 641 @if(!string.IsNullOrEmpty(GetString("DwNavigation(leftMenu)"))){ 642 <nav id="leftMenuContainer" class="col-sm-3 noPaddingLeft"> 643 @GetValue("DwNavigation(leftMenu)") 644 </nav> 645 } 646 @CentralContent("col-xs-9 noPadding") 647 </section> 648 649 @if (!isPrint) 650 { 651 <footer id="footer" class="container-fluid noPadding"> 652 <div id="footerLargeMenuContainer" class="container-fluid noPadding"> 653 <div class="container"> 654 <div class="col-sm-12 socialContainer"> 655 @if (socialMedia.Any()) 656 { 657 @SnippetStart("socialMedia") 658 <ul class="noPadding" id="socialMedia"> 659 @foreach (LoopItem socialItem in socialMedia) 660 { 661 string className = socialItem.GetString("Item.Area.SocialNetworks.Icon"), 662 socialName = socialItem.GetString("Item.Area.SocialNetworks.Name"), 663 socialLink = socialItem.GetString("Item.Area.SocialNetworks.Link"); 664 665 socialLink = !string.IsNullOrEmpty(socialLink) ? socialLink : "#"; 666 667 <li> 668 <a title="@socialName" class="@className fa" target="_blank" href="@socialLink"> 669 <span class="hidden">@socialName</span> 670 </a> 671 </li> 672 } 673 </ul> 674 @SnippetEnd("socialMedia") 675 @RenderSnippet("socialMedia") 676 } 677 </div> 678 679 @if (!string.IsNullOrEmpty(GetString("DwNavigation(bottomMenu)"))) 680 { 681 <nav id="bottomMenuContainer" class="col-xs-12"> 682 @GetValue("DwNavigation(bottomMenu)") 683 </nav> 684 } 685 686 <div class="footerContactInfo col-xs-12 noPadding-left hidden"> 687 <p class="noPadding"> 688 <a href="mailto:@email">@email</a> 689 </p> 690 <p class="noPadding"> 691 <a href="tel:@phone">@phone</a> 692 </p> 693 </div> 694 695 </div> 696 <div id="copyrightContainer" class="container-fluid"> 697 <div class="container"> 698 <div class="row"> 699 <div class="col-xs-12 col-md-6">@Copyright()</div> 700 <div class="col-xs-12 col-md-6"> 701 @if (!string.IsNullOrEmpty(GetString("DwNavigation(copyrightMenu)"))) 702 { 703 <nav id="copyrightMenuContainer"> 704 @GetValue("DwNavigation(copyrightMenu)") 705 </nav> 706 } 707 708 </div> 709 </div> 710 </div> 711 </div> 712 @DemoBanner() 713 </div></footer> 714 } 715 716 717 @if (bol_backofficeLogged) 718 { 719 <div id="urlPath" class="text-center col-xs-12"> 720 @Pageview.GlobalTags.GetTagByName("Global:Request.PathAndQuery").Value <br> 721 @Pageview.GlobalTags.GetTagByName("Global:Request.Url").Value 722 </div> 723 } 724 @RenderSnippet("bodyBeforeEnd") 725 </div></body> 726 <!--Start Cookie Script--> <script type="text/javascript" charset="UTF-8" src="//cookie-script.com/s/4615528e5aefd86935f9f18ffef91ed5.js"></script> <!--End Cookie Script--> 727 <!--Start Cookie Script--> <script type="text/javascript" charset="UTF-8" src="//eu.cookie-script.com/s/4615528e5aefd86935f9f18ffef91ed5.js"></script> <!--End Cookie Script--> 728 </html> 729 730 @SnippetStart("loginForm") 731 @{ 732 string createAccountPage = GetString("Item.Area.CreateAccount"); 733 string addUserPage = GetString("Item.Area.AddUser"); 734 string loginPage = GetString("Item.Area.Login"); 735 } 736 <form id="masterExtUserForm" class="col-xs-12 DMForms userRelatedForms hidden" action="/Default.aspx?ID=@Pageview.Page.ID" method="post"> 737 <fieldset class="mandatory TextInput"> 738 <label for="Username">@Translate("usernameEmail", "Username / Email")</label> 739 <input type="email" id="Username" name="username" value="" tabindex="1"> 740 </fieldset> 741 <fieldset class="mandatory TextInput"> 742 <label for="Password">@Translate("password", "Password")</label> 743 <input autocomplete="off" type="password" id="Password" name="password" value="" tabindex="2"> 744 </fieldset> 745 746 <div class="col-xs-12 noPadding"> 747 <input tabindex="3" class="btn btn-bg" name="LoginAction" type="submit" value='@Translate("Login", "Login")'> 748 </div> 749 <div class="forgotButtons col-xs-12 noPadding"> 750 <span class="title">@Translate("currentCustomer", "Current Customer?")</span> 751 <a id="forgotPassword" href="@loginPage&amp;LoginAction=Recovery">@Translate("forgotYourPassword", "Forgot your password?")</a> 752 <a href="@addUserPage">@Translate("addUserToExistingAccount", "Add new user to an existing PBi account")</a> 753 </div> 754 <div id="dontHaveAnAccount" class="col-xs-12 noPadding"> 755 <span class="title">@Translate("newCustomer", "New Customer?")</span> 756 <a href="@createAccountPage">@Translate("createAccount", "Create account")</a> 757 </div> 758 </form> 759 @SnippetEnd("loginForm")