public static bool IsContentPage(this SiteContent content) { if (content == null) { return(false); } return(content.ContentType == ContentType.ContentPage); }
public static bool IsPublished(this SiteContent content) { if (content == null) { return(false); } return(content.SiteContentStatusID == (int)ContentStatus.Published && content.PublishDateUtc <= DateTime.UtcNow); }
public static SiteContentVersion GetAffiliateVersion(this SiteContent content, int affiliateId) { if (content == null || content.Versions == null) { return(null); } return(content.Versions.FirstOrDefault(v => v.Affiliates.Any(a => a.AffiliateID == affiliateId))); }