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.
I am using nodehierarchy module along with custom breadcrumbs module. Nodehierarchy module uses drupal_set_breadcrumb() to set breadcrumbs. This is called inside hook_node_view() of nodehierarchy module.
/**
* Implements hook_node_view().
*/
function nodehierarchy_node_view($node, $view_mode = 'full') {
if ($view_mode == 'full') {
nodehierarchy_set_breadcrumbs($node);
}
}
Custom breadcrumbs sets breadcrumb in hook_preprocess_page(), due to this breadcrumb is overridden by nodehierarchy and only link to home page is appearing as breadcrumb.
Comment | File | Size | Author |
---|---|---|---|
#1 | conflict_with_nodehierarchy-2098465-1.patch | 892 bytes | subhojit777 |
Comments
Comment #1
subhojit777Nodehierarchy tries to display breadcrumb by fetching ancestor menu links. I have attached a patch that gets weight of nodehierarchy module if it is enabled, and sets weight of custom breadcrumbs module by 1.
Comment #2
subhojit777Comment #3
subhojit777Status changed to need review.