在 Orchard CMS 中,有没有办法根据内容类型的标签显示列表?

发布于 2024-12-21 00:58:51 字数 201 浏览 3 评论 0原文

我创建了一个自定义内容类型“书籍”,并将标签附加到每个项目(即“精选”、“新”、“儿童”、“成人”)。

我想创建要根据标签显示的书籍列表。例如,我想要一个“精选”列表来显示所有已标记为“精选”的书籍,以及一个“儿童书籍”列表来显示所有已标记为“儿童”的书籍。

有没有一种简单的方法可以做到这一点(对于每次必须输入代码时血压都会升高的视觉 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

锦爱 2024-12-28 00:58:51

分类法是做到这一点的最佳方法。好吧,标签也可以做到这一点,但分类法要丰富得多。
最简单的方法: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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文