【问题标题】:how can I override as well node/x/edit as node/x/add with just one panel?如何仅使用一个面板将 node/x/edit 覆盖为 node/x/add ?
【发布时间】:2011-12-26 16:59:50
【问题描述】:

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

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

【问题讨论】:

  • 我们遇到了完全相同的问题。想不通,所以我们使用一个面板进行节点/编辑,然后使用表单创建创建另一个页面

标签: drupal-6 panels


【解决方案1】:

终于解决了问题。在我们的例子中,它与 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) {
...

您可以在这里查看我的 hack 和模块作者的 cmets:http://drupal.org/node/1561046#comment-5997776

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-10-24
    • 1970-01-01
    • 1970-01-01
    • 2015-12-26
    • 2015-12-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多