I have a tab which I attach to nodes; it works just fine.
I have a sub-tab which I want to place beneath that tab. It does not show up.
Here is my menu definition related to the problem:
// 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',
);
Thanks in advance for any help you might offer.
As @Clive pointed out in a comment to my question: MENU_LOCAL_TASK requires at least two items.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With