Drupal6:主题节点编辑页面/在 Lightbox 中打开
我试图在灯箱中整齐地显示所有 node_edit 表单,而没有任何我不想要的多余内容。没有侧边栏、页脚、页眉,什么都没有。只是内容。所以我创建了一个 page-node-edit.tpl.php 文件。
我有两个问题让我感到畏惧,但现在我只提第一个问题,因为它更重要。
1) 在任何 drupal 页面中,单击节点的“编辑”链接都不会像应有的那样激活灯箱。相反,它会像平常一样点击链接。
通过标题中的 jQuery,我将灯箱的 rel 属性添加到链接中,但该框仍然没有激活。我在硬编码到页面中的链接上测试了灯箱,它激活得很好。对于由 Drupal 生成的元素,例如节点编辑链接/按钮,问题似乎是时间问题。
我认为 rel 属性需要与页面和链接一起构建,而不是附加到其上。问题是,链接缺少 id 和类,所以我不知道 hook_alter_link() 函数如何帮助我。
我愿意尝试任何事情。也许以前有人这样做过?在灯箱中打开节点/编辑表单。
任何建议将不胜感激。
I'm trying to display all node_edit form neatly within a lightbox without any of the excess content I don't want. No sidebars, footer, header, nothing. Just the content. So I created a page-node-edit.tpl.php file.
I have two problems daunting me, but for now I'll only mention the first since its more important.
1) From any drupal page, clicking on the "edit" link for the node doesn't activate the lightbox like it should. Instead it clicks-thru the link as normal.
With jQuery in the header I added a rel attribute for the lightbox to the links, but the box still doesn't activate. I tested the lightbox on a link I hardcoded into the page, and it activated just fine. For elements generated by Drupal, like the node edit link/button the problem seems to be timing.
I think the rel attribute needs to be built with the page, with the link, rather than appended onto it. The catch is, the link lacks an id and class, so I don't see how the hook_alter_link() function can help me.
I'm willing to try anything. Perhaps someone has done this before? Opened a node/edit form within a lightbox.
Any suggestions would be greatly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我已经看到在几个模块中使用了模态框架 API(节点关系使用它来执行与您正在执行的操作非常相似的操作);可能会有所帮助...
http://drupal.org/project/modalframe
I've seen the Modal Frame API used in a few modules (Node Relationships uses it to do something very similar to what you're doing); might be helpful...
http://drupal.org/project/modalframe