Changing of menu item changes login form

Events happening in the community are now at Drupal community events on www.drupal.org.
el_reverend's picture

Hi all,

I have a bit of a problem and I'm not quite sure how to tackle it. I have created a new menu that is set to display in a sidebar to authenticated users and contains only 3 items. One of the items links to 'user' so that the users can manage their account information.

I just found out that when I change the title of the menu item, it also changes the headline title of the login form. (see attached image) Why? And better do you have any ideas where I can look to solve this problem?

Any help is appreciated, thanks.

AttachmentSize
login-form-problem.png23.77 KB
Edit-menu-item-loginproblem.png9.69 KB

Comments

The menu system determines

christefano's picture

The menu system determines page titles, paths, etc. and changing the title of a menu item changes the page title, too. To override the page title (that is, the HTML <title> tag), check out the Page Title module.

For dynamic menu items (like the 'login' and 'logout' item for logging in and out), you can work around it by creating two separate menus (one for anonymous visitors and one for logged-in users) and creating 'login' and 'logout' links for the respective menus. These menus will show up as blocks and you can use block visibility rules to show the correct block to the correct role.

Blocks....

el_reverend's picture

Hi Christefano,

thanks for you help. I'm trying to avoid another block due to our layout. Could I customize the login form and have the override the basic log-in form? What is you experience with the Page Title module. I am already using quite a few and wonder how this will impact the rest of them.

Page Title is great. I

christefano's picture

Page Title is great. I recommend it.

Can you say more about what you're doing? I'm not sure what the login form has to do with the login links in your menus.

Hi Christefano, I am trying

el_reverend's picture

Hi Christefano,

I am trying to do several things at one, so I'll try to explain a little better.

First I am trying to streamline the user log-in, registration and password reset pages. I'd like them to be on one page. So far I have been able to do this with drupal_get_form('user_register'), etc.

Then I am trying to change the title of that user registration page. I am doing this because I have a small menu for authenticated users (I don't want a menu for anonymous users) that allows users to 'View/Edit my account' which changes the title link of the user log-in page. Currently, I have been successful by editing the user-login.tpl.php and including a drupal_set_title function call.

All this will get combined with the ability to log-in to the site using Drupal for Facebook and users using their FB credentials. At this point I'd like to display only a small block to allows users to log in that then get replaced by the small menu mentioned earlier.

Does this makes sense? Do you have any suggestions to achieve this? Thanks for your expertise,

Sebastian