Breadcrumbs not obeying Taxonomy Redirect

jshuell - February 26, 2008 - 06:09
Project:Taxonomy Breadcrumb
Version:5.x-1.4
Component:Miscellaneous
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs review
Description

Im using the Taxonomy Redirect module to redirect taxonomy pages to a panel page. Unfortunately my Breadcrumbs want to point to the taxonomy/term/id page instead. Any way to get the breadcrumbs to recognize the redirect?

#1

joachim - June 22, 2008 - 13:40
Status:active» needs review

Part of the problem is that Taxonomy Breadcrumb also lets you override paths for terms, but one by one, on the properties page for a term. Also, the path override is only applied to breadcrumbs and not taxonomy links on the node themselves. Not sure why you'd want to do that...
I would suggest that this module stick to one thing -- adding breadcrumbs -- and leave overriding term paths to the Taxonomy Redirect.

In the meantime, here is a fix.
All you need to do is change the way the term path is generated if there's no override from this module.
At line 112, change this:

    if ($term_path == NULL) {
      $term_path = "taxonomy/term/$parent_term->tid";
    }

to this:

    if ($term_path == NULL) {
      $term_path = taxonomy_term_path($parent_term);
    }

This calls taxonomy module's function for creating a path, which correctly handles any term overrides from any other modules.

#2

pillarsdotnet - September 4, 2008 - 17:22

Marked http://drupal.org/node/268977 as a duplicate.

#3

sonictruth - October 30, 2008 - 01:29

Great module, thanks.

This is badly needed in this module. Can we expect to see it rolled into the next version?

thanks

#4

brnnrc - July 22, 2009 - 13:43

subscribe

#5

Justin W Freeman - November 14, 2009 - 13:28

Here is a patch with change from #1

Works for me.

AttachmentSize
taxonomy_breadcrumb-226845-5.patch 718 bytes
 
 

Drupal is a registered trademark of Dries Buytaert.