Taxonomy Menu is a very nice Drupal module that lets you create a menu based on a content type’s taxonomy. The taxonomy terms form the menu structure, and the way the nodes are displayed when a menu item (= taxonomy term) is selected can be customised using a custom view. I really like it. I like it so much, that I wanted the taxonomy terms displayed in the header of my nodes to link to the same menu structure, so that clicking on them was the same as clicking on the same term in the Taxonomy Menu.
Here enters Taxonomy Redirect. This module allows one to rewrite the url that the Taxonomy module creates. So instead of blabla.com/taxonomy/term/999 you can make the link blablabla.com/goto/this/instead/999. For this, you can define a redirect as plain text, or with a php snippet. Due to the link structure Taxonomy Menu uses, I had to resort to php for dynamically creating the Redirect link. The standard format for the link structure for Taxonomy Menu is “sitename.com/category/vid/pid1/pid2/tid” (with vid the vocabulary id, pid a parent term id, and tid the term id). The term “category” can be set in the settings for Taxonomy Menuy. Using plain text to define the Redirect link would f*** things up when the taxonomy term did not have any parents. Php worked fine, once I found out that the Redirect module defines a variable $tid for the term id, that you can use in your script. The code I used:
$output = “category/1/”;
$parents = taxonomy_get_parents_all($tid);
$parents = array_reverse($parents);
// Remove the child term from the array
array_pop($parents);
foreach ($parents as $parent) {
$output .= “$parent->tid”;
$output .= “/”;
}
$output .= $tid;
return $output;
?>
The “1″ behind “category” in the first line is for the vocabulary, so you’ll have to check what value you need there. Note that using php might not work straight away for anonymous users. To resolve this, have a look here…

I too am using Taxonomy Menu and I want to be able to use different custom views depending on the term chosen. Right now, I have a View setup with the path “taxonomy/term/%” which gets invoked by any term being clicked in my menu. This works great but is used for all terms.
Would the Taxonomy Redirect module allow me to call my custom view for certain terms? Is so, what path would I use in both my view and the redirected term path?
Thanks
Yes, you can use Taxonomy Redirect for that. It allows you to choose either total vocabularies or specific terms.
Your free to choose the path you like. I think you’ll have to use arguments in your view, and pass them along with Tax Red, but I haven’t tried that myself.
Let us know how it works out!
Howdy :)
Could you inform which versions of Drupal and Taxonomy Menu and taxonomy Redirect you are using? I was scared off after reading these posts like this: http://drupal.org/node/353320
Cheers!
Hi mate, I’m using them on a Drupal 5 site, so I cannot comment on those posts. TM is 5.x-1.03 and TR is 5.x-1.3