When I access site via / or /fp, I always get 'Home', this only happens for the home page...How can I change the title?

$items['fp'] = array(
    'title' => 'Front Page',
    'page callback' => 'rocdocs_main_view',
    'access arguments' => array('access content'),
    'title callback' => 'rocdocs_main_view_title',
    'type' => MENU_CALLBACK

function rocdocs_main_view_title()
    return 'THIS IS A TEST';
  • Is this drupal 6 or 7? – LSU_JBob Nov 29 '11 at 17:14
  • This is drupal 7 – Chris Muench Nov 29 '11 at 21:15
  • 1
    In your code. The variable $items: Do you have a "return $items" at the end or is it not part of a function. Hard to see what's going on. Also what file do you have this in? your template.php file? or a custom module? – chrisjlee Dec 1 '11 at 17:51
  • go with @ChrisJ.Lee here... its easy to miss the return in hook_menu()... also suggest you could check the logs for page not found for the request if thats the case... – optimusprime619 Dec 1 '11 at 17:55

Just deactivate the predefined menu link and add a new one - use


as path.

In Drupal 7 and 8 go to

Home > Administration > Structure > Menus > Main menu > Add link

Drupal 7 Drupal 7

See tooltip for details (using Rubik Theme) See tooltip for details

| improve this answer | |

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.