I'm using the notifications module and I'm trying to move t开发者_StackOverflow社区he notifications profile tab to a secondary tab under the profile/edit tab. I've used hook_menu_alter to add the tab under the user/edit path together with User profile and Account, and it appears as it should. But when I press it, both the Account tab and the User profile tab disappear. I only see the primary tabs. Any idea why this happens?
I ended up implementing the tab in hook_menu()
as
$items['user/%user/THING'] = array(
'title' => 'Edit Special THINGS',
...,
'tab_parent' => 'user/%/edit',
);
Two important considerations:
- Setting the path to
user/%user/edit/THING
did not work. tab_parent
works great.
精彩评论