Drupal基于词汇的变化展示
我需要使用我设置的自定义视图来获取与特定词汇相关的术语。
例如:我有一个名为“图书类别”的词汇表,其中包含幽默、历史等术语。当导航到术语页面(分类/术语/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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以根据需要克隆默认分类视图并更改字段部分。
在页面设置 -> 路径中删除“%”并添加图书类别的分类编号(例如“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.
有一个名为 Taxonomy Views Integrator 的新模块,它似乎可以完成您想做的事情。尝试一下。
There is a new module called Taxonomy Views Integrator that seems like it does what you want to do. Try it.