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.
When I try to Rewrite title in views that gets arguments from global filter it shows Id of global filter field (taxonomy reference) when I post My title %1.
It shows My title + id number!
May you recheck it?
Comments
Comment #1
RdeBoerThanks for the report. Will look at this later this week.
Comment #2
RdeBoerSo I had a look. Not sure if this is Global Filter's fault.
If I select "Provided default value" and then "Fixed value" and enter a taxonomy term id, then the %1 in title also renders as the term id, not the term name.
Do you find this too?
Comment #3
Jarviss CreditAttribution: Jarviss commentedWell I found it on taxonnomy term page where views is active and Term Name it shows, but when I try to add %2 that is global filter term reference field it shows id.
Comment #4
Jarviss CreditAttribution: Jarviss commentedWhen I use simple tag argument and rewrite for title %1 it shows Title not id.
I think it comes from Global filter!
Comment #5
RdeBoerI think it is because Global Filter uses the Term ID not the Term Name. So the Term ID is in fact the contextual argument and that is what shows up when you use %1 or !1....
Comment #6
Jarviss CreditAttribution: Jarviss commentedYes I think you are right and it shows id! Rik have you thought about it, how to change output?
I think Views module makes the same change and answer can be in code of Views, because if Argument/Contextual filter is term id it will rewrite title with term name!
Comment #7
RdeBoerAs far as I can see this is a Views thing. Global Filter doesn't touch the %-syntax. But it requires taxonomy term id's, it can't work with term names.
Are you saying that when you disable Global Filter those same %1's suddenly change from showing term Id's to showing term names?
Comment #8
RdeBoerThe canned view /taxonomy/term/% that comes with Views uses a different contextual argument, namely "Has taxonomy term ID (with depth)".
That contextual argument cannot be used by Views Global Filter, which requires a true FIELD on the content type. For these contextual arguments Views renders %1 when entered for the View Title as the term id, not the term name.
Nothing Views Global Filter can do about that. Sorry.