public MetadataModel(tbl_Content content) { if (content == null) { return; } this.Keywords = content.C_Keywords; this.Description = content.C_Description; this.MetaTags = content.C_MetaData; }
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); }