我有一个附加到节点的选项卡;它运行良好。
我想将一个子选项卡放在该选项卡下方,但是它并没有显示出来。
以下是与问题相关的菜单定义:
// Parent tab, attached to nodes.
$items['node/%node/layout'] = array(
'title' => 'Parent tab',
'description' => 'tab that is attached to the node, same level as edit tab',
'page callback' => 'my_callback',
'page arguments' => array(1),
'access callback' => true, // To test.
'type' => MENU_LOCAL_TASK,
'weight' => 200,
'file' => 'mymodule.admin.inc',
);
// Child tab, beneath parent tab.
$items['node/%node/layout/fields'] = array(
'parent' => 'node/%/layout',
'title' => 'child tab',
'description' => 'child tab, underneath parent tab',
'page callback' => 'my_child_callback',
'page arguments' => array(1),
'access callback' => true, // To test.
'type' => MENU_LOCAL_TASK,
'file' => 'mymodule.admin.inc',
);
非常感谢您可能提供的任何帮助。
$items['node/%node/layout/test'] = array(...
)。总是可以使用MENU_LOCAL_ACTION
选项,在父页面顶部添加链接而不是选项卡。 - Clive