Drupal Answers is a question and answer site for Drupal developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to set the active menu's text as the page title in drupal7. I tried using the page title module and found no replacement patterns to set the active menu as the page title. Any help is widely appreciated.


share|improve this question
Why can't you change the node title to be the same as the menu? Since your menu is static the page title can be too. – Neograph734 Nov 22 '12 at 15:40
As per my need I should have the Head and page title different, hence I cannot go with the above implementation !! – Gladiator Nov 23 '12 at 9:43
up vote 0 down vote accepted

I found the answer with this link http://sivaji.drupalgardens.com/how-set-custom-page-title-drupal-7.

There exists no way to dynamically set the active menu as the page title, but with the Classes_array from the vars, we can check the page's id and then set the page title as per our need.

In my case I used a if check to check the page id (Page-contact's page title to Contact) and so. It worked for me though, but still found no way to dynamically set the title from the active menu !

share|improve this answer
You are asking for a rare feature, but there are no replacement tokens for the menu items. (And why should there be, menu titles are usually shorter then the real titles). You could try to write a custom drupal modules that hooks onto the menu API ( api.drupal.org/api/drupal/includes!menu.inc/group/menu/7 ). But not sure whitch title they mean there. – Neograph734 Nov 23 '12 at 12:55

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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