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

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