开发者

Local tasks in drupal disappear on one path

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:

  1. Setting the path to user/%user/edit/THING did not work.
  2. tab_parent works great.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜