Take the 2-minute tour ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

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.

Thanks

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
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.