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