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