在 Orchard CMS 中,有没有办法根据内容类型的标签显示列表?
我创建了一个自定义内容类型“书籍”,并将标签附加到每个项目(即“精选”、“新”、“儿童”、“成人”)。
我想创建要根据标签显示的书籍列表。例如,我想要一个“精选”列表来显示所有已标记为“精选”的书籍,以及一个“儿童书籍”列表来显示所有已标记为“儿童”的书籍。
有没有一种简单的方法可以做到这一点(对于每次必须输入代码时血压都会升高的视觉 UI 人员?):)
I created a custom content type "books" and I'm attaching tags to each item (i.e. "Featured", "New", "Children's", "Adults").
I'd like to create lists of books to display based on their tag. For example, I'd like a "Featured" list that displays all the books that have been tagged "Featured", and a "Children's Books" list that displays all the books that have been tagged "Children's".
Is there a simple way to do this (for a visual UI person who's blood pressure rises every time she has to go into the code?) :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
分类法是做到这一点的最佳方法。好吧,标签也可以做到这一点,但分类法要丰富得多。
最简单的方法:yoursite/tags/featured 将显示所有标记为“featured”的内容。更复杂一点的方法:分类法。
Taxonomies are the best way to do this. Well, tags can do that too but taxonomies are much richer.
So simplest way: yoursite/tags/featured will display all contents tagged with "featured". A little more elaborate way: taxonomies.