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?

CommentFileSizeAuthor
#5 taxonomy_breadcrumb-226845-5.patch718 bytesagileware

Comments

joachim’s picture

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.

pillarsdotnet’s picture

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

sonictruth’s picture

Great module, thanks.

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

thanks

brnnrc’s picture

subscribe

agileware’s picture

StatusFileSize
new718 bytes

Here is a patch with change from #1

Works for me.

MGN’s picture

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.

Status: Fixed » Closed (fixed)

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