Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi, don't implement hook_menu() to override menu items of other modules. Implement hook_menu_alter() for that.
Use this function:
function nodeorder_menu_alter(&$items){
$items['taxonomy/term/%taxonomy_term'] = array(
'title' => 'Taxonomy term',
'title callback' => 'taxonomy_term_title',
'title arguments' => array(2),
'page callback' => 'nodeorder_taxonomy_term_page',
'page arguments' => array(2),
'access arguments' => array('access content'),
'file' => 'nodeorder.pages.inc',
'module' => 'nodeorder',
);
return $items;
}
Comment | File | Size | Author |
---|---|---|---|
#4 | Override_menu_URL-1878144-4.patch | 2.4 KB | intrafusion |
Comments
Comment #1
valthebaldGood point.
Can you please make a patch from this?
Comment #2
intrafusionThe dev version is substantially different from the recommended release and this bug actually stops the module from working unless you alter the weight in the system table of the database.
The change is simple, just change nodeorder_menu to:
And add:
Comment #3
valthebaldI'd love to see this as a patch. Please?
Comment #4
intrafusionMy bad, I checked out the wrong version from Git.
Patch attached
Comment #6
dieuwe