It would be nice if there were an option in the settings to disable the "freelinks" link in the navigation menu. I realize that I could do this using the menu module, but using the menu module messes up the breadcrumb links for my books (http://drupal.org/node/26252).

Is there any easy hack I could employ to do this? I tried simply deleting or commenting out the freelinking_menu function in the module, but that pretty much broke the entire module for me.

Comments

eafarris’s picture

How about changing the type to MENU_SUGGESTED_ITEM in freelinking_menu() ?

eafarris’s picture

You'll have to delete the contents of your cache table to see any difference, I think.

eafarris’s picture

Version: 4.6.x-1.x-dev » master

It occurs to me that freelinking.module for 4.6 doesn't have the freelinking link in the menu, so you must be using the CVS version.

In that case, the module doesn't define a type for the menu, falling back to the default MENU_NORMAL_ITEM. To disable the menu (without using the menu.module, the preferred method), change the type of the menu item to MENU_CALLBACK. Like this:

function freelinking_menu($may_cache) {
  global $user;
  $items = array();

  if ($may_cache) {
    $items[] = array( 'path' => 'freelinking', 
                      'title' => t('freelinks'),
                      'access' => user_access('access content'),
                      'type' => MENU_CALLBACK,       // <----- ADD THIS LINE
                      'callback' => 'freelinking_page'
                    );
  }
  return $items;
} // endfunction freelinking_menu

Ought to do the trick.

spazfox’s picture

Status: Active » Closed (fixed)

Yes, sorry -- I forgot I switched to the CVS version.

Your fix did the trick. Thanks! Your support for this module has been great.