diff -urp taxonomy_breadcrumb/taxonomy_breadcrumb.inc taxonomy_breadcrumb_new/taxonomy_breadcrumb.inc --- taxonomy_breadcrumb/taxonomy_breadcrumb.inc 2009-01-11 18:19:26.000000000 -0800 +++ taxonomy_breadcrumb_new/taxonomy_breadcrumb.inc 2010-02-08 10:11:21.000000000 -0800 @@ -42,6 +42,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 2009-01-11 18:19:26.000000000 -0800 +++ taxonomy_breadcrumb_new/taxonomy_breadcrumb.module 2010-02-08 10:11:38.000000000 -0800 @@ -86,8 +86,13 @@ function taxonomy_breadcrumb_nodeapi(&$n // THEN modify the breadcrumb trail. if ($in_list == variable_get('taxonomy_breadcrumb_include_nodes', FALSE) ) { - // Extract lightest term from lightest vocabulary assosciated with node. - $term = _taxonomy_breadcrumb_node_get_lightest_term($node->nid); + // Extract lightest term from lightest vocabulary assosciated with node. + if(isset($node->primaryterm)) { + $term = _taxonomy_breadcrumb_node_get_primary_term($node); + + } else { + $term = _taxonomy_breadcrumb_node_get_lightest_term($node->nid); + } $breadcrumb = _taxonomy_breadcrumb_generate_breadcrumb($term->tid); drupal_set_breadcrumb($breadcrumb); }