2

I am looking to create a user menu. The menu when not logged in should have two options: 1. create account 2. sign in. These items will be displayed in-line.

Once logged in, I want the menu to have two options: 1. account name 2. sign out

When logged in the "account name" menu item will have a drop down with menu items linking to the various user tabs present in the user backend.

Information: I am working with a theme I downloaded. The main menu has a fairly extensive dropdown function but I do not know how it is doing it. If I could figure that out then I could apply that to the user menu for the function I want.

The reason I want this done: I had a potential customer loose interest and leave my site because he could not figure out where he could download his files from. So I figured I needed to create a easy to understand user menu.

Thanks for your help!

Drupal 7 link to my website: sonikloops.com

5

This can be easily done with the available following contributed modules.

  • Create menus from Admin UI, and restrict the visibility by Menu Per Role module. Here, you might like to to show the menus Create Account and Sign In only to anonymous (not logged in) users.

  • You can use the Menu Token module, if you wish to show username as menu. You'll need to install the Token module and the Ctools module in order to do this. This can be done in following way:

    1. Create a menu link in your User menu using Admin UI by visiting http://yoursite.url/admin/structure/menu/manage/user-menu.
      snap1
    2. In the link title you input the user name. The following will replace the [current-user:name] with the username of the logged in user. You can even use other fields, under the "Menu Token Options" > "Replacement Patterns".
      snap2
    3. The output of the above: snap
      As admin: snap4
      As an authenticated user: snap5
  • For the dropdown feature of the menu, you can use the DHTML Menu or the Superfish menu.

Hope that helps. Please feel free to ask questions.

  • thanks for the info! #1 helps. Sometimes i get so bogged down in how open Drupal is i forget to check the simple things =-) – Tim Jones Nov 6 '12 at 6:55
  • #2 i have been searching for a few hours and everyone seems to be saying the same thing, "Menu token module." i did isntall it and have no idea how to use it. I read the documentation but that is showing how to link it to a view, which ended up confusing me more. could you explain to me how to use it? – Tim Jones Nov 6 '12 at 6:57
  • #3 if my site already has drop down funciton, do you think i should replace that function with a module? or keep its function the way it is? it might be java, or it might be a module, im not sure. – Tim Jones Nov 6 '12 at 6:58
  • @TimJones sorry for the late reply. See how to user tokens in Menu title in the edit for #2. And about #3 I'm not aware how your theme implements the menu (CSS3/JavaScript/jQuery ?), so I'm not in a position to suggest any solution. – AjitS Nov 7 '12 at 5:53

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.