With D7, there is a new function :

// Allow modules to alter the breadcrumb, if possible, as that is much
// faster than rebuilding an entirely new active trail.
drupal_alter('menu_breadcrumb', $active_trail, $item);

Thanks to that alter function, we can make breadcrumb construction more flexible. I make a patch to show you how you could use it.
The advantages of this method is that another modules can complete breadcrumb links before links are generated and so add attributes, html or anything they want.
I make also possible to preprocess node->title and make taxonomy_breadcrumb compatible with taxonomy/term/% view.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

GoZ’s picture

Here is the patch to read my code

LonitaD’s picture

This patch was throwing a non-object error on the taxonomy/term/%/edit page. When on the edit page, $page_term->tid is an object instead of just a value like on the taxonomy/term/% pages. I changed

taxonomy_breadcrumb_menu_breadcrumb_alter 

to

if (!is_object($tid)){
   $active_trail = _taxonomy_breadcrumb_generate_breadcrumb($tid, TRUE);
}

If there is a better way to fix it, please let me know.

jantoine’s picture

Status: Active » Postponed

We can revisit this issue once 7.x-1.0 is released, but not before than!