0

I have a menu item "My Shop" which redirects to the user/login page. But custom Drupal behavior hides this link whenever a user is logged in.
I would like to show this menu-item all the time. Is there a way to do so?

The reason why I do this is the following. It's a site with a webshop-portal. To access this portal, users need to log in. Whenever they are on their portal/webshop, he should keep seing the menu-link and when they return to the front-end of the site, the user should be able to go his webshop without loggin in again.
I hope I make myself clear on this one. If I don't, please let me know!

3
  • No point (or) logic in displaying login link after login. Is there is any particular reason ?
    – Bala
    Commented May 22, 2013 at 10:27
  • Can I ask why? What do you expect it to do? You can't even reach the /user/login page when you're logged in, it will only redirect you to /user. Commented May 22, 2013 at 10:28
  • I updated my question, I hope I made myself clear :)
    – Michiel
    Commented May 22, 2013 at 10:36

1 Answer 1

4

If you're trying to show a link called "My Shop" which takes anonymous users to the log in page and logged-in users somewhere else, you can just create a second menu item also called "My Shop" and set it to display only for users that have the authenticated user role. Then set the destination to whatever you want; that way both logged in users and anonymous users will have "My Shop" links pointing different places.

You can have multiple menu items on the same menu with the same name (Drupal doesn't check for uniqueness in order to allow for situations like this).

As long as you give the two "My Shop" menu items the same weight (or drag them so that they are next to each other), they will appear to be the same menu item.

0

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.