如何使用 drupal 6.x 视图 2 将表单添加到视图?

发布于 2024-07-07 11:57:34 字数 132 浏览 5 评论 0原文

我想将 drupal 表单添加到视图的顶部。 视图不需要接收表单的结果,但表单的 _submit 挂钩应该能够读取表单所在视图的第一个参数。

添加此内容的最佳位置在哪里? 自定义模块或模板文件以及必要的文件名/挂钩是什么?

I want to add a drupal form to the top of a view. The view does not need to receive the results of the form but the _submit hook of the form should be able to read the first argument of the view that the form was on.

Where is the best place to add this? Custom module or template file and what are the necessary filenames/hooks?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

权谋诡计 2024-07-14 11:57:34

看来您想要的钩子带有

_views_pre_view

变量 $view、$display_id、$args 并且您希望将 $view->attachment_before 设置为等于表单。

It appears the hook you want is

_views_pre_view

with variables $view, $display_id, $args and you want to set $view->attachment_before to equal the form.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文