Hi all,

I was wondering if anybody could help me with a problem I am facing after having installed the Google PageRank module:

The problem is, this module automatically created a new menu item in my navigation. Right at the top. Now, I do want to keep that menu item, but would like to make it a submenu of another item.

However, this doesn't seem possible, because this menu item appears everywhere except on the administration page where I adjust the menu. There it simply vanishes from the menu. It isn't listed as menu item in the administration, either.
Nonetheless, there it is... right at the top of my navigation, on all pages, except one... :-(

Any help?

Comments

elven’s picture

*bump*

Is anyone able to help me?
Pretty please?

kjl’s picture

The menu item in question, in the module file, is in the !$may_cache section of hook menu, that's why you can't see it in admin. If you edit "!$may_cache" to read "$may_cache" you will be able to edit the item. You might want to ask the developer, by posting in the issue queue for this module, if there's a reason for this. Normally, !$may_cache is used for dynamic menu items, not static menu items.

function google_pr_menu($may_cache) {
  $items = array();
  if (!$may_cache) {
    $items[] = array(
      'path' => 'admin/settings/google_pr',
      'title' => t('Google PageRank'),
      'description' => t('Change how Google PageRank behave.'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array('google_pr_admin_settings'),
      'access' => user_access('administer site configuration')
    );
    $items[] = array(
    'path'     => 'google_pr',
    'title'    => t('Google PageRank'),
    'access'   => user_access('get pagerank'),
    'callback' => 'google_pr_page',
    'weight'   => 0,
    );
  }
  return $items;
}
elven’s picture

That was the solution to my problem.
Thank you very much, that helped a lot.