Download & Extend

Breadcrumbs not obeying Taxonomy Redirect

Project:Taxonomy Breadcrumb
Version:5.x-1.4
Component:Miscellaneous
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

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?

Comments

#1

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

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

#3

Great module, thanks.

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

thanks

#4

subscribe

#5

Here is a patch with change from #1

Works for me.

AttachmentSize
taxonomy_breadcrumb-226845-5.patch 718 bytes

#6

Status:needs review» fixed

Thanks for the patch. I made a slight change based on what is done in the D6 version. Now committed to 5.x-1.x-dev.

#7

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nobody click here