diff -urp taxonomy_breadcrumb/taxonomy_breadcrumb.inc taxonomy_breadcrumb.new/taxonomy_breadcrumb.inc --- taxonomy_breadcrumb/taxonomy_breadcrumb.inc 2010-03-30 18:46:35.000000000 -0700 +++ taxonomy_breadcrumb.new/taxonomy_breadcrumb.inc 2010-04-02 12:15:00.000000000 -0700 @@ -89,6 +89,16 @@ function _taxonomy_breadcrumb_node_get_l } /** +* return the primary id for the primary term in a format that taxonomy breadcrumb will understand +* based on ($node) since it doesn't not make since to reload the object into memory since it was already created +* and running a query for something we already have does not make sense +*/ +function _taxonomy_breadcrumb_node_get_primary_term($node) { + $term = (object)array('tid' => $node->primaryterm); + return ($term); +} + +/** * Return the administrator defined vocabulary path for a given vocabulary * ($vid). If a path doesn't exist, NULL is returned. */ diff -urp taxonomy_breadcrumb/taxonomy_breadcrumb.module taxonomy_breadcrumb.new/taxonomy_breadcrumb.module --- taxonomy_breadcrumb/taxonomy_breadcrumb.module 2010-03-30 18:46:35.000000000 -0700 +++ taxonomy_breadcrumb.new/taxonomy_breadcrumb.module 2010-04-02 12:11:40.000000000 -0700 @@ -76,7 +76,11 @@ function taxonomy_breadcrumb_nodeapi(&$n if ($in_list == variable_get('taxonomy_breadcrumb_include_nodes', 0) ) { // Extract lightest term from lightest vocabulary assosciated with node. - $term = _taxonomy_breadcrumb_node_get_lightest_term($node); + if(isset($node->primaryterm)) { + $term = _taxonomy_breadcrumb_node_get_primary_term($node); + } else { + $term = _taxonomy_breadcrumb_node_get_lightest_term($node); + } $breadcrumb = _taxonomy_breadcrumb_generate_breadcrumb($term->tid); if (variable_get('taxonomy_breadcrumb_include_node_title', FALSE)) { $breadcrumb[] = check_plain($node->title);