Download & Extend

option to include term name rather than term id

Project:Taxonomy Redirect
Version:5.x-1.0
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

I would like to be able to redirect the links to a url including the term's name rather than its id. For example I would like to be able to redirect image vocabulary terms to "photos/tags/tag-name-1" or "photos/tags/tag-name-2", etc. Can this be easily implemented? Thanks.

Comments

#1

I figured it out...I just have to change the return statement slightly in the taxonomy_redirect_term_path() function.

#2

I think PathAuto would better compliment what you're trying to do.

#3

I agree, except that I want the url's like "photos/tags/tag-name-1" or "photos/tags/tag-name-2" to be directed to pages that have been created with views. When I tried to use pathauto, the urls would redirect to the standard taxonomy module pages that list node teasers...rather than to the pages that views created. So, I was trying to find another solution.

#4

I think that this would be good too. Like a drop down menu on the Admin page maybe.

Or, even just having a theme function, maybe like this, where we could overwrite the path:

theme_taxonomy_redirect_path($term) {
// Customised:
return ($path == NULL ? 'taxonomy/term' : $path) . "/" . strtolower($term->name);
}

#5

Status:active» fixed

I've changed the path format to replace !tid and !name with the term id and name respectively. You can also override this behaviour by defining the function taxonomy_redirect_custom_term_path($term, $path). These changes will be in the 5.x-1.1 release.

#6

Status:fixed» closed (fixed)

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