public static string siteApp(Domains site, LMApps app) { return site.ToString() + app.ToString(); }
//public static string GetUrl(SiteMapNode nd) { // string url = VirtualPathUtility.ToAppRelative(nd.Url.ToLowerInvariant()); // string[] parts = url.Split(new char[] { '/' }, 5); // if (parts.Length != 5) throw new Exception(); // return GetUrl((LMApps)Enum.Parse(typeof(LMApps), parts[2], true), parts[4]); //} public static string getTitle(Domains site, string lng, string path) { SiteMapNode nd = SiteMap.Provider.FindSiteMapNode("~/site-" + site.ToString() + "/web/lang/" + path); if (nd == null) return "urlInfo.getTitle"; CultureInfo oldCi = Thread.CurrentThread.CurrentUICulture; try { urlInfo.setCulture(lng); return nd.Title; } finally { Thread.CurrentThread.CurrentUICulture = oldCi; } }
public string Url(Domains homeSite, int dbId) { if (Type == SiteMapNodeType.folder) return "folder/" + dbId.ToString(); return string.Format(@"~/{0}/web/lang/{1}/{2}.{3}", homeSite != Domains.site && SiteId == Domains.site ? "site-" + homeSite.ToString() : SiteId.ToString(), Security, Name, Ext); }