Thanks for the great module!

My question is probably not biblio related per se. I'd like add the /biblio/import link as a tab under /biblio page (next to List and Filter) instead of the as a subitem of the Biblio menu links. How can I do this?

Comments

rjerome’s picture

You would have to edit the biblio.module file and make a slight modification to the biblio_menu() function. In there you will find a menu declaration that looks like this ...

  $items["$base/import"] = array(
    'title' => t('Import'),
    'page callback' => 'drupal_get_form',
    'page arguments' => array('biblio_import_form'),
    'file' => 'biblio.import.export.inc',
    'access callback' => 'user_access',
    'access arguments' => array('import from file'),
    'weight' => 10,
  );

you need to add on line so it looks like this (you can remove the comment "//<-----------add this line")...

  $items["$base/import"] = array(
    'title' => t('Import'),
    'page callback' => 'drupal_get_form',
    'page arguments' => array('biblio_import_form'),
    'file' => 'biblio.import.export.inc',
    'access callback' => 'user_access',
    'access arguments' => array('import from file'),
    'type' => MENU_LOCAL_TASK,        //<-----------add this line
    'weight' => 10,
  );

This is not a bad idea, and I may make it a part of the code in the future.

Ron.

sly5’s picture

This works really well, thanks! For those who want to try this, make sure to flush the menu cache after editing biblio.module.

liam morland’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

This version is no longer maintained. If this issue is still relevant to the Drupal 7 version, please re-open and provide details.