I have the built in User Menu being displayed in a region of my template with the following code:


Drupal seems to automatically handle where thsis should be output. Generally it outputs in the /user/* pages.

However, I have recently started working on a custom module that had added a new menu item to /user/my_module but when I visit the page the User Menu is not displayed.

Could someone tell me how Drupal manages the output of the User Menu or possibly how to get it to display on this page/path?


You need to set menu_name for your menu item to user-menu, see userpoints_menu() for an example (the myuserpoints menu item).


If you're adding new items to the user menu with hook_menu_alter() you may need to clear your menu cache before you see your changes.

You can clear you cache at: "Administer > Site Configuration > Performance > Clear Cache"

Or better yet, use drush and use the command drush cc

You can also manually add items to the user-menu at "Admin -> Menus -> User Menu" (admin/structure/menu/manage/user-menu) though I'm guessing the menu/theme cache is the real issue here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.