Drupal基于词汇的变化展示

发布于 2024-11-03 15:18:39 字数 227 浏览 6 评论 0原文

我需要使用我设置的自定义视图来获取与特定词汇相关的术语。

例如:我有一个名为“图书类别”的词汇表,其中包含幽默、历史等术语。当导航到术语页面(分类/术语/7)时,我想仅显示书名和自定义书籍封面领域。默认情况下,Drupal 在所有分类术语页面上显示节点标题、预告片和链接。我遇到的问题是我希望属于“图书类别”词汇的术语使用我的自定义视图,而所有其他术语使用默认视图。

有办法解决这个问题吗?任何帮助表示赞赏。

I need to have terms related to a specific vocabulary use a custom view I have set up.

For example: I have a vocabulary called "Book Categories" with terms under it such as Humor, History, etc. When navigating to a term page (taxonomy/term/7), I would like to display just the book title and a custom book-cover field. By default, Drupal displays node title, teaser, and links on all taxonomy term pages. The problem I am having is I would like terms that fall under the "Book Categories" vocabulary to use my custom view, and all other terms to use the default view.

Is there a way around this? Any help is appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(2

度的依靠╰つ 2024-11-10 15:18:39

您可以根据需要克隆默认分类视图并更改字段部分。
在页面设置 -> 路径中删除“%”并添加图书类别的分类编号(例如“7”)
在上下文过滤器中删除所有过滤器。

该视图应该覆盖默认视图。
希望这有帮助。

You can clone default taxonomy view and change fields section as you like.
In PAGE SETTINGS->PATH remove "%" and add taxonomy number of your Book Category (like "7")
In contextual filter delete all filters.

This view then should override default view.
Hope this helps.

紫瑟鸿黎 2024-11-10 15:18:39

有一个名为 Taxonomy Views Integrator 的新模块,它似乎可以完成您想做的事情。尝试一下。

There is a new module called Taxonomy Views Integrator that seems like it does what you want to do. Try it.

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