如何使用 drupal 中的自定义模块在 myaccount 页面中创建新选项卡
我如何使用 drupal 中的自定义模块在 myaccount 页面中创建新选项卡。是否有任何挂钩?
提前致谢
How can i create a new tab in myaccount page using custom module in drupal.Is there any hooks for that?
thanks in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
选项卡使用菜单项类型
MENU_LOCAL_TASK< /代码>
和
MENU_DEFAULT_LOCAL_TASK
。要为用户帐户页面添加选项卡,您需要使用其中之一作为菜单项类型,并确保该路径是标准用户路径 (user/%user
) 的子路径。像这样的事情:
Tabs are handled using the menu item types
MENU_LOCAL_TASK
andMENU_DEFAULT_LOCAL_TASK
. To add a tab for the user account page you need to use one of these as your menu item type, and also make sure the path is a child of the standard user path (user/%user
).Something like this: