Drupal 奇怪的分层选择要求
任何人都知道在 Drupal 中进行分层选择的模块或其他方式,它首先提取您从中选择的分类词汇表,然后根据您的分类选择将 CCK 相关节点字段限制为特定的内容类型。
Anybody know of a module or other way to do a hierarchical select in Drupal that first pulls in a taxonomy vocabulary from which you select and then based on your taxonomy selection limits a CCK related node field to a specific content type.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
AFAIK,没有模块可以做到这一点。节点引用字段确实允许您指定视图作为其源,但不幸的是,您无法将动态参数传递给该视图。
如果您能找到一种方法来获取选定的分类术语并将其作为参数传递给视图以过滤结果,那么您就完成了...
http://drupal.org/node/473670,但该代码从 GET 变量获取 PHP 级别的动态参数。您描述的行为应该在 Javascript 级别上工作,因为您的参数是用户在表单上选择的变量。
AFAIK, there is no module that does that. A node reference field does allow you to specify a view as its source, but unfortunately, you cannot pass a dynamic argument to that view.
If you can figure out a way to take the selected taxonomy term and pass it to the view as an argument to filter the results by, you're done...
There is a start for something similar on http://drupal.org/node/473670, but that code fetches the dynamic argument on the PHP level from a GET variable. The behavior you describe should work on the Javascript level, because your argument is a variable selected on the form by the user.