我怎样才能用一个面板覆盖node/x/edit 和node/x/add 呢?

发布于 2024-12-23 02:04:45 字数 171 浏览 2 评论 0原文

我正在使用 durpal 6 并有一些面板页面。 /node/%node/edit 覆盖节点编辑页面。但在我的相关节点/添加页面上,面板页面未应用。

我必须添加新页面吗?有一个面板上下文“节点添加表单” - 如果我添加它,我是否可以使用一个面板页面变体作为节点/编辑作为节点/添加?或者我必须使用两种不同的形式?

I'm using durpal 6 and have some panel pages. The one for /node/%node/edit is overriding the node edit pages. but on my regarding node/add page the panel page is not applied.

Do I have to add a new page? There is a panel context "node add form" - if I add this, can I anyway use one panel page variant for as node/edit as node/add ? Or would I have to use 2 different forms ?

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

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

发布评论

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

评论(1

很酷不放纵 2024-12-30 02:04:46

终于解决了问题。在我们的例子中,这是与 i18n 模块的冲突。我已将其报告给 drupal.org,但它似乎按设计运行。

就您而言,如果您不使用 i18n,则可能有某些模块覆盖 ctools 之上的 node_page_edit 。检查menu_router表以查看哪个函数(模块)为node/add/%和node/edit/%路由注册了回调,然后尝试降低该模块的权重或增加ctools页面管理器的权重。清除缓存并检查节点添加和编辑路由的回调是否为 page_manager_node_edit。

/**
 * Entry point for our overridden node edit.
 *
 * This function asks its assigned handlers who, if anyone, would like
 * to run with it. If no one does, it passes through to Drupal core's
 * node edit, which is node_page_edit().
 */
function page_manager_node_edit($node) {
...

您可以在此处查看我的黑客和模块作者的评论: http://drupal.org/node/1561046 #comment-5997776

Finally resolved the problem. In our case it was a collision with the i18n module. I reported it to drupal.org but it seems it's working as designed.

In your case, if you are not using i18n, there may be some module overriding the node_page_edit on top of ctools. Check the menu_router table to see which function (module) is has their callback registered for the node/add/% and node/edit/% routes and then try to lower the weight of that module or increase the weight of ctools page manager. Clear your caches and check the callback for the node add and edit routes is page_manager_node_edit.

/**
 * Entry point for our overridden node edit.
 *
 * This function asks its assigned handlers who, if anyone, would like
 * to run with it. If no one does, it passes through to Drupal core's
 * node edit, which is node_page_edit().
 */
function page_manager_node_edit($node) {
...

You can check my hack and the module author's comments here: http://drupal.org/node/1561046#comment-5997776

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