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; }
/// <summary> /// Deprecated Method for adding a new object to the tbl_Content EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddTotbl_Content(tbl_Content tbl_Content) { base.AddObject("tbl_Content", tbl_Content); }
/// <summary> /// Create a new tbl_Content object. /// </summary> /// <param name="contentID">Initial value of the ContentID property.</param> /// <param name="c_TableLinkID">Initial value of the C_TableLinkID property.</param> /// <param name="c_LanguageID">Initial value of the C_LanguageID property.</param> /// <param name="c_ModificationDate">Initial value of the C_ModificationDate property.</param> /// <param name="c_Deleted">Initial value of the C_Deleted property.</param> /// <param name="sUB_Twitter">Initial value of the SUB_Twitter property.</param> /// <param name="c_NewsSectionID">Initial value of the C_NewsSectionID property.</param> /// <param name="c_GalleryID">Initial value of the C_GalleryID property.</param> /// <param name="c_Approved">Initial value of the C_Approved property.</param> public static tbl_Content Createtbl_Content(global::System.Int32 contentID, global::System.Int32 c_TableLinkID, global::System.Int32 c_LanguageID, global::System.DateTime c_ModificationDate, global::System.Boolean c_Deleted, global::System.Boolean sUB_Twitter, global::System.Int32 c_NewsSectionID, global::System.Int32 c_GalleryID, global::System.Boolean c_Approved) { tbl_Content tbl_Content = new tbl_Content(); tbl_Content.ContentID = contentID; tbl_Content.C_TableLinkID = c_TableLinkID; tbl_Content.C_LanguageID = c_LanguageID; tbl_Content.C_ModificationDate = c_ModificationDate; tbl_Content.C_Deleted = c_Deleted; tbl_Content.SUB_Twitter = sUB_Twitter; tbl_Content.C_NewsSectionID = c_NewsSectionID; tbl_Content.C_GalleryID = c_GalleryID; tbl_Content.C_Approved = c_Approved; return tbl_Content; }
private ContentModel ContentModelFactory(tbl_Content content) { return new ContentModel() { Content = content, CSS = content.tbl_SiteMap.SM_CSS, Html = content.C_Content, HtmlElements = String.IsNullOrEmpty(content.C_Content) ? new List<object>() : ProcessHtmlContent(content.C_Content, this.Domain != null ? this.Domain.DO_CompanyName : string.Empty, DomainService.GetSettingsValue(SettingsKey.recaptcha_public_key)) }; }