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