Error compiling template "Designs/PacificBag/_parsed/leftMenu.parsed.cshtml"
Line 805: 'Dynamicweb.Ecommerce.Products.Group.GetGroupById(string)' is obsolete: 'Use Services.ProductGroups.GetGroup instead.'
Line 1852: 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 var isGroupBanner = false; 330 if (request["groupid"] != null) 331 { 332 var group = Dynamicweb.Ecommerce.Products.Group.GetGroupById(request["groupid"].ToString()); 333 334 if(group != null){ 335 if (group.ParentGroups.Count > 0) 336 { 337 group = group.ParentGroups[0]; 338 } 339 340 var groupName = group.Name; 341 var groupImage = !string.IsNullOrWhiteSpace(group.LargeImage) ? group.LargeImage : group.SmallImage; 342 var groupDescription = group.ProductGroupFieldValues.GetProductGroupFieldValue("BannerDescription").Value.ToString(); 343 var bannerTextColor = group.ProductGroupFieldValues.GetProductGroupFieldValue("BannerTextColor").Value.ToString(); 344 var bannerTextBackgroundColor = group.ProductGroupFieldValues.GetProductGroupFieldValue("BannerTextBackgroundColor").Value.ToString(); 345 var bannerTextBackgroundOpacity = group.ProductGroupFieldValues.GetProductGroupFieldValue("BannerTextBackgroundOpacity").Value.ToString(); 346 347 if (!string.IsNullOrWhiteSpace(groupImage)) 348 { 349 isGroupBanner = true; 350 image = "/Admin/Public/GetImage.ashx?Image=/Files" + groupImage + "&Height=1080&Crop=5"; 351 352 <section id="pageHeadingContainer" class="groupBanner @topMediaContainerClass" style="background-image:url('@image')"> 353 <div class="col-xs-12 col-md-6 col-md-offset-3"> 354 <div id="bannerTextBackground" style="background: @bannerTextBackgroundColor; opacity: @bannerTextBackgroundOpacity"></div> 355 <h2 style="color: @bannerTextColor;">@groupName</h2> 356 <p style="color: @bannerTextColor !important;">@groupDescription</p> 357 </div> 358 </section> 359 } 360 } 361 } 362 363 if (!String.IsNullOrWhiteSpace(image) && String.IsNullOrWhiteSpace(video) && !isGroupBanner) 364 { 365 string layoutType = !string.IsNullOrWhiteSpace(subHeading) ? "twoColumn" : "oneColumn"; 366 string headerClass = leftAlign ? "text-left" : ""; 367 368 <section id="pageHeadingContainer" class="@topMediaContainerClass" style="background-image:url('@image')"> 369 <div id="pageHeadingContent" class="container @layoutType"> 370 <p class="h1 @headerClass">@heading</p> 371 <p>@subHeading 372 @if (!string.IsNullOrEmpty(buttonLink)) 373 { 374 <a class="btn btn-bg pull-left" href="@buttonLink">@buttonText</a> 375 } 376 </p> 377 </div> 378 </section> 379 } 380 } 381 @helper UserDoesNotExist() 382 { 383 if (Dynamicweb.Environment.ExecutingContext.IsFrontEnd() && !Dynamicweb.Security.UserManagement.User.IsExtranetUserLoggedIn()) 384 { 385 if (!string.IsNullOrEmpty(System.Web.HttpContext.Current.Request.Params["Password"]) && !string.IsNullOrEmpty(System.Web.HttpContext.Current.Request.Params["Username"])) 386 { 387 @SnippetStart("jsOnLoad") 388 @:var showLogin = true; 389 @:alert("@(Translate("userNotFoundInTheDatabase", "User not found in the database"))"); 390 @SnippetEnd("jsOnLoad") 391 } 392 } 393 } 394 @helper Logo(string cssclass, string companyName, string designName) 395 { 396 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"; 397 398 <figure class="@cssclass" id="logo"> 399 <a href="/"> 400 <img class="img-responsive" src="@logo" alt="@companyName" title="@companyName"> 401 </a> 402 </figure> 403 } 404 @helper DemoBanner() 405 { 406 if (GetBoolean("Item.Area.Banner") && System.Web.HttpContext.Current.Request.Cookies["demoMode"] == null) 407 { 408 <div class="demoMode">Demo</div> 409 } 410 } 411 @helper Copyright() 412 { 413 <div class="col-xs-12 copyright">&copy; @DateTime.Now.Year @GetString("Item.Area.CompanyName") @*- @GetString("Item.Area.Copyright")*@</div> 414 } 415 416 @helper RenderSearchBar() 417 { 418 var resultsPage = GetInteger("Item.Area.SearchResults"); 419 var q = (System.Web.HttpContext.Current.Request["q"] ?? "").ToString(); 420 421 <div id="searchContainer" class="col-sm-offset-4 col-sm-8 col-xs-12"> 422 <div class="searchContainer col-xs-12"> 423 <form action="/Default.aspx" id="searchForm"> 424 <fieldset class="col-xs-4 Select mandatory pull-right hidden"> 425 <label for="searchSubmit" class="hide">@Translate("search", "Search")</label> 426 <select name="ID"> 427 <option value="@resultsPage" selected="">@Translate("productSearch", "Product Search")</option> 428 </select> 429 </fieldset> 430 <fieldset class="col-xs-12 TextInput mandatory noPadding"> 431 <label for="searchSubmit" class="hide">@Translate("search", "Search")</label> 432 <input placeholder='@Translate("search", "Search")' id="searchSubmit" data-error='@Translate("searchText", "Search for something")' type="text" name="q" value="@q"> 433 </fieldset> 434 <input type="submit" class="hidden" value="send"> 435 </form> 436 </div> 437 <div id="autocompleteWrap">&nbsp;</div> 438 </div> 439 } 440 441 @functions { 442 private string CommaSplittedString(string CommaSplittedString, string NewString) 443 { 444 445 if (!string.IsNullOrEmpty(CommaSplittedString)) 446 { 447 CommaSplittedString += ", "; 448 } 449 CommaSplittedString += NewString; 450 451 return CommaSplittedString; 452 } 453 public static string StripHtml(string source) 454 { 455 return Regex.Replace(source, "<.*?>", string.Empty); 456 } 457 } 458 @{ 459 var currentQuery = "Default.aspx" + System.Web.HttpContext.Current.Request.Url.Query; 460 if (!string.IsNullOrEmpty(currentQuery) && currentQuery.ToLower().Equals(string.Format("default.aspx?id={0}", Pageview.Page.ID))) 461 { 462 var newQuery = currentQuery; 463 var filterParamters = GetString("Item.Page.FilterParameters").Split(new string[] {"&", "?"}, StringSplitOptions.RemoveEmptyEntries); 464 465 foreach (var fp in filterParamters) 466 { 467 if (!currentQuery.Contains(fp.Substring(0, fp.IndexOf("=")) + "=")) 468 { 469 newQuery += newQuery.Contains("?") ? "&" : "?"; 470 newQuery += fp; 471 } 472 } 473 474 if (currentQuery != newQuery) 475 { 476 System.Web.HttpContext.Current.Response.Redirect(Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(newQuery), true); 477 } 478 } 479 480 string device = Pageview.Device.ToString(); 481 string homeOrSubpage = GetString("DwAreaFirstPageID") == Pageview.Page.ID.ToString() ? "home" : "subpage"; 482 string print = !string.IsNullOrEmpty(System.Web.HttpContext.Current.Request.Params["print"]) ? "printOrPdf" : ""; 483 string contactUsPage = GetString("Item.Area.ContactUs"); 484 string countryCode = Dna.IP.Frontend.GetCountryCode(); 485 string longLang = Pageview.GlobalTags.GetTagByName("Global:Area.LongLang").Value.ToString(); 486 string email = GetString("Item.Area.Email"); 487 string phone = GetString("Item.Area.Phone"); 488 bool userIsLoggedIn = Dynamicweb.Security.UserManagement.User.IsExtranetUserLoggedIn(); 489 bool isPrint = !string.IsNullOrEmpty(System.Web.HttpContext.Current.Request.Params["print"]); 490 bool bol_backofficeLogged = Dynamicweb.Security.UserManagement.User.GetCurrentBackendUser() != null ? true : false; 491 List<LoopItem> socialMedia = GetLoop("Item.Area.SocialNetworks"); 492 List<LoopItem> websiteLanguages = GetLoop("WebsiteLanguages"); 493 if (userIsLoggedIn) 494 { 495 string logedUserId = Pageview.User.CurrentSecondaryUser == null ? Dynamicweb.Security.UserManagement.User.GetCurrentExtranetUserId().ToString() : Pageview.User.CurrentSecondaryUser.ID.ToString(); 496 System.Web.HttpContext.Current.Session["UserId"] = logedUserId; 497 498 if (System.Web.HttpContext.Current.Request["DWExtranetSecondaryUserSelector"] != null && Pageview.User.CurrentSecondaryUser != null) 499 { 500 System.Web.HttpContext.Current.Session["AccountsNumber"] = Pageview.User.CurrentSecondaryUser.GetUsersICanSetAsSecondary().Count; 501 } 502 } 503 }<!DOCTYPE HTML> 504 <!--[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)]><!--> 505 <html lang="@(longLang)"> 506 <!--<![endif]--> 507 @HtmlHead(designName) 508 <body class="@device logged_@userIsLoggedIn.ToString() @homeOrSubpage @print" data-countrycode="@countryCode"> 509 <div class="wrap"> 510 <header id="headerContainer" class="container-fluid noPadding"> 511 <h1 class="hidden">@GetString("Title")</h1> 512 <div id="topHeaderContainer" class="col-xs-12 noPadding"> 513 <div class="container noPadding"> 514 @Logo("col-md-4 col-sm-6 col-xs-12", GetString("Item.Area.CompanyName"), designName) 515 @if (!string.IsNullOrEmpty(GetString("DwNavigation(topMenu)")) && !isPrint) 516 { 517 <nav id="topMenuContainer" class="navbar navbar-default col-xs-12 col-sm-6 col-md-8"> 518 <div class="col-xs-12 welcomeBack"> 519 @if (userIsLoggedIn) 520 { 521 string userName = !string.IsNullOrWhiteSpace(Pageview.User.Name) ? Pageview.User.Name : string.Format("{0}{1}", Pageview.User.FirstName, Pageview.User.LastName); 522 string pageId = Pageview.Page.ID.ToString(); 523 bool isImpersonate = Pageview.User.CurrentSecondaryUser != null; 524 string switchAccountUrl = string.Format("Default.aspx?ID={0}", (Pageview.Area.Item["ManageAccounts"] ?? "").ToString()); 525 526 if (isImpersonate && !(System.Web.HttpContext.Current.Session["AccountsNumber"] ?? "").ToString().Equals("1")) 527 { 528 <span>@Translate("managingAccount", "Managing Account"): @(!string.IsNullOrWhiteSpace(userName) ? userName : Pageview.User.UserName)</span> 529 <a href="@switchAccountUrl">@Translate("switchAccount", "SwitchAccount")</a> 530 <a href="/Admin/Public/ExtranetLogoff.aspx">@Translate("logout", "Logout")</a> 531 } 532 else 533 { 534 <span>@Translate("welcomeBack", "Welcome Back,") @(!string.IsNullOrWhiteSpace(userName) ? userName : Pageview.User.UserName)</span> 535 <a href="/Admin/Public/ExtranetLogoff.aspx">@Translate("logout", "Logout")</a> 536 } 537 } 538 </div> 539 @RenderSearchBar() 540 @GetValue("DwNavigation(topMenu)") 541 </nav> 542 } 543 </div> 544 </div> 545 <div id="menuMainContainer" class="col-xs-12 noPadding"> 546 <div id="mainNavContainer" class="col-xs-12 noPadding"> 547 <div class="container noPadding"> 548 @if (!string.IsNullOrEmpty(GetString("DwNavigation(menuMain)"))) 549 { 550 <nav class="navbar navbar-default"> 551 <div class="navbar-header"> 552 <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar"> 553 <i class="fa fa-bars"></i> 554 </button> 555 </div> 556 <div id="navbar" class="navbar-collapse collapse noPadding"> 557 @GetValue("DwNavigation(menuMain)") 558 </div> 559 </nav> 560 } 561 </div> 562 </div> 563 </div> 564 @RenderSnippet("loginForm") 565 </header> 566 @RenderPageImageVideo(GetString("Item.Page.Image"), GetString("Item.Page.Video")) 567 @RenderPageHeading(GetString("Item.Page.PageHeading"), GetString("Item.Page.PageSubHeading"), GetString("Item.Page.Image"), GetString("Item.Page.Video"), GetBoolean("Item.Page.PageHeadingAlignLeft")) 568 569 @if (!GetBoolean("Item.Page.Hide2ndLevelMenu") && !GetString("Item.ItemInstanceType").Equals("News")) 570 { 571 @GetValue("DwNavigation(groupMenu)") 572 } 573 574 <section id="contentWrapper"> 575 @inherits RazorTemplateBase<RazorTemplateModel<Template>> 576 @using Dynamicweb.Rendering; 577 578 579 @inherits RazorTemplateBase<RazorTemplateModel<Template>> 580 @using Dynamicweb.Rendering; 581 582 @helper Breadcrumb() { 583 if (!string.IsNullOrEmpty(GetString("DwNavigation(breadCrumbsMenu2)"))) 584 { 585 <div class="col-xs-12 noPadding"> 586 <nav id="breadMenuContainer" class="col-xs-12 noPadding"> 587 <ul id="breadCrumbsMenu"> 588 <li><a href="/">@Translate("home", "Home")</a></li> 589 @GetValue("DwNavigation(breadCrumbsMenu2)") 590 @if (!string.IsNullOrEmpty(System.Web.HttpContext.Current.Request.Params["productid"])) 591 { 592 <li> 593 &nbsp;»&nbsp; 594 @GetString("Title") 595 </li> 596 } 597 </ul> 598 </nav> 599 </div> 600 } 601 } 602 603 @helper PageTitle(string image, string video) 604 { 605 if (String.IsNullOrWhiteSpace(image) && String.IsNullOrWhiteSpace(video) && !GetBoolean("Item.Page.HidePageTitle")) 606 { 607 string heading = GetString("Item.Page.PageHeading"), 608 title = !String.IsNullOrEmpty(heading) ? heading : GetString("DwPageName"); 609 <div class="container pageTitle"> 610 <div class="h1">@title</div> 611 </div> 612 } 613 } 614 615 @helper CentralContent(string rightClass = "col-xs-12 noPadding") { 616 if (!string.IsNullOrEmpty(GetString("DwContent(fullWidthContent)"))) 617 { 618 <section id="fullWidthContainer" class="container-fluid fullWidthSection"> 619 <div id="fullWidthContent" class="row">@GetValue("DwContent(fullWidthContent)")</div> 620 </section> 621 } 622 623 if (!string.IsNullOrEmpty(GetString("DwContent(centralContent)"))) 624 { 625 <div class="container"> 626 <section id="centralContainer" class="col-xs-12 noPadding-xs"> 627 <div id="centralContent" class="row">@GetValue("DwContent(centralContent)")</div> 628 </section> 629 </div> 630 } 631 632 if (!string.IsNullOrEmpty(GetString("DwContent(fullWidthContent2)"))) 633 { 634 <section id="fullWidthContainer2" class="container-fluid fullWidthSection"> 635 <div id="fullWidthContent2" class="row">@GetValue("DwContent(fullWidthContent2)")</div> 636 </section> 637 } 638 639 if (!string.IsNullOrEmpty(GetString("DwContent(centralContent2)"))) 640 { 641 <div class="container"> 642 <section id="centralContainer2" class="col-xs-12 noPadding-xs"> 643 <div id="centralContent2" class="row">@GetValue("DwContent(centralContent2)")</div> 644 </section> 645 </div> 646 } 647 } 648 649 @Breadcrumb() 650 @PageTitle() 651 @if(!string.IsNullOrEmpty(GetString("DwNavigation(leftMenu)"))){ 652 <nav id="leftMenuContainer" class="col-sm-3 noPaddingLeft"> 653 @GetValue("DwNavigation(leftMenu)") 654 </nav> 655 } 656 @CentralContent("col-xs-9 noPadding") 657 </section> 658 659 @if (!isPrint) 660 { 661 <footer id="footer" class="container-fluid noPadding"> 662 <div id="footerLargeMenuContainer" class="container-fluid noPadding"> 663 <div class="container"> 664 <div class="col-sm-12 socialContainer"> 665 @if (socialMedia.Any()) 666 { 667 @SnippetStart("socialMedia") 668 <ul class="noPadding" id="socialMedia"> 669 @foreach (LoopItem socialItem in socialMedia) 670 { 671 string className = socialItem.GetString("Item.Area.SocialNetworks.Icon"), 672 socialName = socialItem.GetString("Item.Area.SocialNetworks.Name"), 673 socialLink = socialItem.GetString("Item.Area.SocialNetworks.Link"); 674 675 socialLink = !string.IsNullOrEmpty(socialLink) ? socialLink : "#"; 676 677 <li> 678 <a title="@socialName" class="@className fa" target="_blank" href="@socialLink"> 679 <span class="hidden">@socialName</span> 680 </a> 681 </li> 682 } 683 </ul> 684 @SnippetEnd("socialMedia") 685 @RenderSnippet("socialMedia") 686 } 687 </div> 688 689 @if (!string.IsNullOrEmpty(GetString("DwNavigation(bottomMenu)"))) 690 { 691 <nav id="bottomMenuContainer" class="col-xs-12"> 692 @GetValue("DwNavigation(bottomMenu)") 693 </nav> 694 } 695 696 <div class="footerContactInfo col-xs-12 noPadding-left hidden"> 697 <p class="noPadding"> 698 <a href="mailto:@email">@email</a> 699 </p> 700 <p class="noPadding"> 701 <a href="tel:@phone">@phone</a> 702 </p> 703 </div> 704 705 </div> 706 <div id="copyrightContainer" class="container-fluid"> 707 <div class="container"> 708 <div class="row"> 709 <div class="col-xs-12 col-md-6">@Copyright()</div> 710 <div class="col-xs-12 col-md-6"> 711 @if (!string.IsNullOrEmpty(GetString("DwNavigation(copyrightMenu)"))) 712 { 713 <nav id="copyrightMenuContainer"> 714 @GetValue("DwNavigation(copyrightMenu)") 715 </nav> 716 } 717 718 </div> 719 </div> 720 </div> 721 </div> 722 @DemoBanner() 723 </div></footer> 724 } 725 726 727 @if (bol_backofficeLogged) 728 { 729 <div id="urlPath" class="text-center col-xs-12"> 730 @Pageview.GlobalTags.GetTagByName("Global:Request.PathAndQuery").Value <br> 731 @Pageview.GlobalTags.GetTagByName("Global:Request.Url").Value 732 </div> 733 } 734 @RenderSnippet("bodyBeforeEnd") 735 </div></body> 736 737 </html> 738 739 @SnippetStart("loginForm") 740 @{ 741 string createAccountPage = GetString("Item.Area.CreateAccount"); 742 string addUserPage = GetString("Item.Area.AddUser"); 743 string loginPage = GetString("Item.Area.Login"); 744 } 745 <form id="masterExtUserForm" class="col-xs-12 DMForms userRelatedForms hidden" action="/Default.aspx?ID=@Pageview.Page.ID" method="post"> 746 <fieldset class="mandatory TextInput"> 747 <label for="Username">@Translate("usernameEmail", "Username / Email")</label> 748 <input type="email" id="Username" name="username" value="" tabindex="1"> 749 </fieldset> 750 <fieldset class="mandatory TextInput"> 751 <label for="Password">@Translate("password", "Password")</label> 752 <input autocomplete="off" type="password" id="Password" name="password" value="" tabindex="2"> 753 </fieldset> 754 755 <div class="col-xs-12 noPadding"> 756 <input tabindex="3" class="btn btn-bg" name="LoginAction" type="submit" value='@Translate("Login", "Login")'> 757 </div> 758 <div class="forgotButtons col-xs-12 noPadding"> 759 <span class="title">@Translate("currentCustomer", "Current Customer?")</span> 760 <a id="forgotPassword" href="@loginPage&amp;LoginAction=Recovery">@Translate("forgotYourPassword", "Forgot your password?")</a> 761 <a href="@addUserPage">@Translate("addUserToExistingAccount", "Add new user to an existing PBi account")</a> 762 </div> 763 <div id="dontHaveAnAccount" class="col-xs-12 noPadding"> 764 <span class="title">@Translate("newCustomer", "New Customer?")</span> 765 <a href="@createAccountPage">@Translate("createAccount", "Create account")</a> 766 </div> 767 </form> 768 @SnippetEnd("loginForm") 769 <!--Start GDPR Cookie Script--> <script type="text/javascript" charset="UTF-8" src="/Files/Templates/Designs/PacificBag/=" ca-eu.cookie-script.com/s/4615528e5aefd86935f9f18ffef91ed5.js"=""></script> <!--End GDPR Cookie Script-->