【发布时间】:2014-07-29 17:02:50
【问题描述】:
在 Orchard CMS 中,我试图找到一种方法来过滤标签云中的标签,以便仅从博客文章中返回标签。目前,标签云会返回所有内容类型的标签。
我在 Orchard 1.7.1 中使用默认的标签云。
如果管理员中有设置,很好,如果没有,我在 TagCloudService.cs 中找到了一个查询。这是我需要编辑的。如果是这样,有人可以帮助我使用我需要在此处添加的过滤器以仅包含博客文章
tagCounts = _contentManager
.Query<TagsPart, TagsPartRecord>(VersionOptions.Published)
.Join<CommonPartRecord>()
.Where(t => t.Container.Id == containerId)
.List()
.SelectMany(t => t.CurrentTags)
.GroupBy(t => t)
.Select(g => new TagCount {
TagName = g.Key,
Count = g.Count()
})
.ToList();
谢谢
【问题讨论】:
标签: orchardcms tag-cloud