I am trying to use hook_nodeapi in my template.php file to alter the breadcrumb. I have tried altering the 'if' statement, but it seems as if Drupal is not even using this hook in my template.php.
function gh_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
$productNodeType = 'product';
$tid = preg_replace('#[^\d+]#i', '', $_GET['bc']);
if ($node->type==$productNodeType && $op=='view' && $tid) {
$breadcrumb[] = l(t('Home'), NULL);
if ($parents = taxonomy_get_parents_all($tid)) {
$parents = array_reverse($parents);
foreach ($parents as $p) {
$breadcrumb[] = l($p->name, 'taxonomy/term/'. $p->tid);
}
}
drupal_set_breadcrumb($breadcrumb);
}
}
I found this function (and modified it a bit) from http://stackoverflow.com/questions/1473093/drupal-hierarchical-taxonomical-breadcrumb-trail