Breadcrumb incorrect for node pages

cetacea - March 5, 2005 - 20:34

I installed drupal and assigned some categories(terms) and subcategories. I would like the breadcrumbs on node pages to show "Home >> Category >> Subcategory". The breadcrumbs display correctly for all the category pages, but on individual node pages, it displays "Home >> Content" for all nodes. I searched the forum and played with taxonomy_context but couldn't fix the problem. Could someone point me to the right direction? Any help is greatly appreciated.

Fixed. Hope didn't cause more problems

cetacea - March 5, 2005 - 21:37

Thanks oNyx. When I first tried to follow the instructions on Jeremy's page I was confused because the taxonomy_context I downloaded had different code and the part that I was supposed to modify got commented out due to some critical errors.

// $Id: taxonomy_context.module,v 1.25.2.6 2005/02/01 00:16:09 nedjo Exp $

snip...

  // Commented out in response to issue http://drupal.org/node/14472
//
  if (($mode == "node") && (arg(1)>0)) {
//    $node = node_load(array("nid" => arg(1)));
//    $node_type = $node->type;
//  }
  // Commented out in response to issue http://drupal.org/node/11407
//
  if (($mode == "taxonomy") || ($node_type == "story") || ($node_type == "page")) {
//    drupal_set_breadcrumb(taxonomy_context_get_breadcrumb($context->tid));
//  }

I went ahead and replaced the code anyway and now the breadcrumbs are working on all pages. I just hope I didn't break anything else.

Yea, I also had the same

oNyx - March 5, 2005 - 22:06

Yea, I also had the same problem (mentioned that somewhere down in the comments), but it seems to work just fine.

Taxonomy_context updated

Jaza - March 6, 2005 - 04:14

Wow, I'm really glad to hear that my patch helped you, and is also helping other people to make their Drupal sites better. Really cool!

From looking at the code snippet that you posted, it looks like taxonomy_context has been updated since I wrote my articles. The version that I used was updated around October 2004. I'll have to put a note about that on my site. Thanks for letting me know about it.

Jeremy Epstein - GreenAsh

 
 

Drupal is a registered trademark of Dries Buytaert.