Drupal - 将分类法与序列中的视图链接在一起
我在 Drupal (v6) 中有一些东西想要解决,但遇到了一些困难。我列出了一份产品列表,其中附加了以下分类词汇表:
- 制造商
- 产品类型
- 使用
当输入使用自定义内容类型的产品时,管理员可以从每个词汇表中选择一个或多个术语。
然后,我需要使用视图布置前端,如下所示:
- 显示给用户的制造商列表 - 用户单击一个
- 显示给用户的产品类型列表,其中包含与所选制造商匹配的产品 - 用户单击一个
- 列表向用户显示的用途,其中包含与所选制造商和产品类型相匹配的产品 - 用户单击一个即可查看完整的节点详细信息
棘手的一点是使用视图在每个词汇之间建立链接。分类词汇表中没有定义层次结构,我只需要能够按上面的顺序向用户显示它们。我无法更改为仅在一个词汇表中使用嵌套层次结构,因为 3 个独立的词汇表在网站的其他位置用于其他目的,并且需要保持原样。
是否可以使用 Views 创建我想要的内容?关于如何最好地将其组装在一起有什么建议吗?
I have something in Drupal (v6) that i'm trying to nail, but having a little difficulty. I am laying out a list of products which have the following taxonomy vocabularies attached to them:
- Manufacturer
- Product Type
- Use
When entering a product, which uses a custom content type, the admin can select one or more terms from each of these vocabs.
I then need to lay the front-end out using Views as follows:
- List of Manufacturers displayed to the user - user clicks one
- List of Product Types displayed to the user that have a product contained within that matches the chosen Manufacturer - user clicks one
- List of Uses displayed to the user that have a product contained within that matches the chosen Manufacturer and Product Type - user clicks one to view full node details
The tricky bit is making the link between each of these vocabs using Views. The taxonomy vocabs have no hierarchy defined within them, I just need to be able to display them to the user in the order above. I can't change to using a nested hierarchy in just one vocabulary as the 3 seperate vocabs are used elsewhere on the site for other purposes and need to stay as they are.
Is it possible to create what i'm after with Views? Any tips on how best to rig it together?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
可以使用 3 个视图,其中第 2 个和第 3 个视图接受参数。
因此,网址可能类似于:
/products/ - 第一个视图
/products/Ford - 第二个观点,一个论点
/products/Ford/Cars - 第三个视图,两个参数
也就是说,对于这样的东西,我可能只是编写一个自定义模块。其实用性取决于您对 Drupal 和 PHP 的熟悉程度。
Could use 3 views, with the 2nd and 3rd taking arguments.
So a url could look like:
/products/ - 1st view
/products/Ford - 2nd view, one argument
/products/Ford/Cars - 3rd view, two args
That said, for something like this I'd probably just write a custom module. How practical that is depends on how comfortable you are with Drupal and PHP.