Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I have a path auto setting for a taxonomy vocabulary categories.
I created a view of taxonomy terms of type category and set it to display fields as a jump menu. I then went into rewrite results and set the path to category/[name]
It would not rewrite the path, I also set it to use dashes for spaces and tried with and without the setting that said use this to rewrite output.
Comments
Comment #1
Luca Cattaneo CreditAttribution: Luca Cattaneo commentedI've the same problem.. :-/
Comment #2
katebron CreditAttribution: katebron commentedI am also having a problem with Views not rewriting the results when using a jump menu. I want to link the taxonomy vocabulary listed to another view.
It will rewrite in an html list, but once changed to jump menu it will ignore the "path-of-view-name/[tid]" and go straight to the "tid".
I've created a global text field and put the path in there, and changed the jump menu settings to use the global text as the path, but this doesn't work either.
Any suggestions?
Comment #3
nepr1971 CreditAttribution: nepr1971 commentedI'm also fighting with this problem which persist in 7.x-3.5.
Does anybody have an idea on how to make a workaround?
Comment #4
nicxvan CreditAttribution: nicxvan commentedYou have to make sure the formatter is set to plain text for rewriting to work. Otherwise it links to the default tax page.
Comment #5
clayevans CreditAttribution: clayevans commentedTHANK YOU!
That worked for me.
Comment #6
adam_b CreditAttribution: adam_b commentedI'm having the same problem in 7.x-3.6.
I'm not sure what nicxvan is suggesting in #4 - I don't see any formatter which can be set to plain text?
I need to use tokens -
<a href="/buildings//[vname]/[tname]-[tid]">[name]</a>
is just giving/[tname]
. This happens whether I write the whole path in the rewrite field (as above) or use the "output field as link" setup. This works fine in other display formats, but not in jump menus.Comment #7
nicxvan CreditAttribution: nicxvan commentedNear the top of the add field piece there is an option to have the taxonomy field formatted as plain text or as a link. You need to select plain text.
Comment #8
adam_b CreditAttribution: adam_b commentedThanks nicxvan, but I still can't see such an option... am feeling very stupid. Could I ask you to attach a screengrab of the relevant bit?
ETA: I'm using the "Taxonomy term: Name" field - are you using another one?
Comment #9
nicxvan CreditAttribution: nicxvan commentedIt seems like some newer version of Views removed that because I can't see it any longer either.
Comment #10
jantoine CreditAttribution: jantoine commentedThis is still a problem in the 7.x-3.x branch. A workaround is to add a hidden 'Global: Custom text' field and set as it's value the token for the re-written taxonomy term id. Then use the 'Global: Custom text' field for the jump menu's path field.
Comment #11
decibel.places CreditAttribution: decibel.places commented@jantoine
Global: Custom text with display hidden didn't work; nothing showed up in the jump menu. It's unnecessary.
My setup: Entity Translation, Views Core Translation
Pathauto pattern for Vocabulary: topics/[term:i18n-vocabulary]/[term:name]
I use the Relationship: Taxonomy term: Entity translation: translations
Then for the term name: Taxonomy term: Rendered Taxonomy term
I added the field Taxonomy term: Term ID and hid that - but set it for the Jump menu path
I rewrite its results: taxonomy/term/[tid]
Works for me, in all languages, with a human readable path, not the tid number :)
Example, for term "Institución microfinanciera"
The path after the Jump menu is "es/topics/institución/institución-microfinanciera"
Comment #12
griz CreditAttribution: griz commentedI've just stumbled into this problem as well.
Relationships aren't necessary for this.
As mentioned above, add Taxonomy term: Term ID as a hidden field. Change the 'Thousands marker' to 'none'.
Rewrite the field tp 'taxonomy/term/[tid]'
Then in the Jump Menu format settings, select your Term: ID field.
The thousands marker was causing me issues on any term with a TID over 1000.