1

What is the best way to add a link to the user menu for a menu defined in my custom module?

1 Answer 1

2

Implement the hook_menu() in your custom module, then clear the cache and you will see the link in the User menu (you need place the block for the User menu in a region).

function YOUR_MODULE_NAME_menu() {
   $items = array();
   $items['/path'] = array(
   'type' => MENU_NORMAL_ITEM,
   'menu_name' => 'user-menu',
   'title' => t('Title'),
  );
  return $items;
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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