public static IEnumerable<ContentHead> GetRelatedContents(string[] tags, string location = null, string[] kinds = null, bool parseContent = false, int top = 0) { SiteService site = new SiteService(); return site.GetRelatedContent(tags, top, location, kinds, parseContent); }
public static IEnumerable<ContentHead> GetRelatedContents(string id = null, string location = null, string[] kinds = null, bool parseContent = false, int top = 0) { if (id == null) { Box.CMS.Web.ContentRenderView renderView = WebPageContext.Current.Page as Box.CMS.Web.ContentRenderView; if (renderView == null) return new List<ContentHead>(); id = renderView.HEAD.ContentUId; } SiteService site = new SiteService(); return site.GetRelatedContent(id, top, location, kinds, parseContent); }