如何在 Drupal 分类 URL 中使用 AND *and* OR
我是 Drupal 的新手,但感谢我们的老朋友 O'Reilly,我正在 Drupal 6 中快速完成我自己的基于分类的导航搜索范式菜单。目前仅使用核心模块(我不想< em>不必要地使事情变得复杂),我正在构建一个主导航菜单,它将几个分类术语放在一起。
现在我知道我可以使用 URL /taxonomy/term/1,2
实现 AND,并且可以使用 URL /taxonomy/term/1+2
实现 OR >。我需要做的本质上是一个 AND 加上一个 OR,并且我尝试了以下 URL,但都不起作用:
/taxonomy/term/1,7+8
/taxonomy/term/1/7+8
我想要在这里说的是“显示所有标记有术语 1 的节点,并且还显示所有节点用术语 7 或 8 标记。我尝试过搜索 Drupal 和 Google,甚至 StackOverflow,但是正如您可以想象的那样,像 AND 和 OR 这样的搜索词确实很难获得结果
。在这个阶段,我会尝试在开始将模块扔到墙上之前尽可能地浏览该站点;)
I'm new to Drupal but thanks to our old friend O'Reilly I'm blazing through my own taxonomy-based, navigational search-paradigmed menu in Drupal 6. Using only Core modules at the moment (I don't want to unnecessarily complicate things), I am building a Primary nav menu which pulls several taxonomy terms together.
Now I know that I can implement AND by using the URL /taxonomy/term/1,2
and I can implement OR by using the URL /taxonomy/term/1+2
. What I need to do is essentially an AND plus an OR, and I've tried the following URLs, neither of which works:
/taxonomy/term/1,7+8
/taxonomy/term/1/7+8
What I'd like to say here is "show me all nodes tagged with term 1, AND also show me all nodes tagged with EITHER terms 7 OR 8. I've tried searching Drupal and Google and even StackOverflow, but as you can imagine search terms like AND and OR really suck for results.
All comments, especially those concerning best practice, gratefully received. I would prefer not to have to resort to a module at this stage; I'm trying to get as far as I can through the site before I begin chucking modules at a wall. ;)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我将使用 Drupal 6 模块 Views 2 来满足这些要求,所以这个问题可以结束了。
I'm going to use the Drupal 6 module Views 2 to fulfil these requirements, so this question can be closed.