0

I'm having some trouble with the titles of my pages.

English Settings Page :

Title

 $items['mymodule/admin'] = array(
    'title' => 'Administrate',
    'page callback' => 'mymodule_admin_home',
    'access arguments' => array('access content'),
    'type' => MENU_NORMAL_ITEM,
    // ...
 );
 $items['mymodule/admin/settings/english'] = array(
    'title' => 'English Settings',
    'page callback' => 'drupal_get_form',
    'page arguments' => 'mymodule_makeEnglishSettingsForm',
    'type' => MENU_DEFAULT_LOCAL_TASK,
 );

The title I set for my page in my hook_menu module doesn't stick, instead, it sets the title to it's parent-most item. I know that I can use drupal_set_title($my-new-title) to fix it. But why is this misbehaving? What did I do wrong?

rlb.usa
  • 14,942
  • 16
  • 80
  • 128

2 Answers2

1

Try clearing the menu cache after making your changes:

cache_clear_all('*', 'cache_menu', TRUE);

Or, if you have the Admin Menu module installed, go to /admin_menu/flush-cache/menu

psparrow
  • 9,808
  • 1
  • 17
  • 11
1

ITs problem with the cache, either you can clear the cache by navigating to admin/settings/performance or use cache_clear method.

easysys
  • 26
  • 1