view2 构建路径的多个参数
我已经找到了通常的嫌疑人。进行分类,例如:
+Guys
--Core Collection
--New Arrivals
-- etc, etc
+Girls
--Core Collection
--New Arrivals
-- etc, etc
+Sale Items
您在这里明白了。 不管怎样,我有分类菜单构建路径(带有路径别名),例如“/collection/guys/core-collection/some-clothing-name”。我想构建一个自定义视图,以便路径显示带有分类术语的视图,因为它们是要过滤的参数。有人知道如何从 url 中传递 2 个参数来过滤掉衣服吗?现在尝试构建我自己的模块,但似乎我可能必须走这条路。
理想情况下,我想要“collection/%/%”。感谢您的帮助。
I have the usual suspects in place. Have taxonomy such as:
+Guys
--Core Collection
--New Arrivals
-- etc, etc
+Girls
--Core Collection
--New Arrivals
-- etc, etc
+Sale Items
You get the idea here.
Anyway, i have taxonomy menu building paths (with path alias) like "/collection/guys/core-collection/some-clothing-name". I want to build a custom view so that the path displays the view with taxonomy terms as they arguments to filter on. Anyone have any information on how to pass 2 arguments from the url to filter out the items of clothing? trying now to have to build my own module but it seems i may have to go down that road.
ideally, i'd like to have "collection/%/%". Thanks for the help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您必须将
术语名称
转换为术语ID
。我不会将解决方案归功于此,但有一篇文章描述了如何解决从term name
到term 的转换ID
。Rafael 已经建议了如何处理路径别名,所以我认为该章已涵盖。
来源:http://groups.drupal.org/node/8500
You'll have to convert the
term names
toterm IDs
. I'm not going to take credit for the solution but there is a post where it describe how you can solve the transformation fromterm name
toterm ID
.Rafael already suggested how to approach the path alias, so I think that chapter is covered.
Source: http://groups.drupal.org/node/8500
让我看看我是否理解。例如,您想要一个视图来显示“家伙/核心收藏”类别中的所有项目,对吧?看看这是否有效:
Let me see if I understand. You want a view to show, for example, all items on the guys/core-collection category, right? See if this works: