protected string GetLayout(tbl_Content content, IWebPages WebPagesService) { string layoutDir = DEFAULT_LAYOUT_LOCATION; if (!string.IsNullOrEmpty(ViewBag.Theme) && System.IO.File.Exists(Server.MapPath(String.Format("/Themes/{0}{1}", ViewBag.Theme, DEFAULT_LAYOUT_LOCATION)))) { layoutDir = String.Format("/Themes/{0}{1}", ViewBag.Theme, DEFAULT_LAYOUT_LOCATION); } if (content.tbl_SiteMap.SM_CustomLayoutID != null) { var customLayout = WebPagesService.GetCustomLayoutById((int)content.tbl_SiteMap.SM_CustomLayoutID); if (!string.IsNullOrEmpty(ViewBag.Theme) && System.IO.File.Exists(Server.MapPath(String.Format("/Themes/{0}{1}", ViewBag.Theme, customLayout.CL_Directory)))) { layoutDir = String.Format("/Themes/{0}{1}", ViewBag.Theme, customLayout.CL_Directory); } } return(layoutDir); }
protected string GetLayout(tbl_Content content, IWebPages WebPagesService) { string layoutDir = DEFAULT_LAYOUT_LOCATION; if (!string.IsNullOrEmpty(ViewBag.Theme) && System.IO.File.Exists(Server.MapPath(String.Format("/Themes/{0}{1}", ViewBag.Theme, DEFAULT_LAYOUT_LOCATION)))) { layoutDir = String.Format("/Themes/{0}{1}", ViewBag.Theme, DEFAULT_LAYOUT_LOCATION); } if (content.tbl_SiteMap.SM_CustomLayoutID != null) { var customLayout = WebPagesService.GetCustomLayoutById((int)content.tbl_SiteMap.SM_CustomLayoutID); if (!string.IsNullOrEmpty(ViewBag.Theme) && System.IO.File.Exists(Server.MapPath(String.Format("/Themes/{0}{1}", ViewBag.Theme, customLayout.CL_Directory)))) { layoutDir = String.Format("/Themes/{0}{1}", ViewBag.Theme, customLayout.CL_Directory); } } return layoutDir; }