Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我使用分类模块创建了一些术语。我在自定义内容类型中添加了分类字段。现在,在页面上,我想显示已用相同分类术语标记的其他项目,我该怎么做?
如果您知道术语名称,则可以使用以下查询 -
var _taxonomyService = WorkContext.Resolve<ITaxonomyService>(); var termContentItems = _taxonomyService.GetContentItems(termname) .Where(c => c.ContentItem.ContentType == "YourContentTypeName") .ToList();