Hi,
I have a content type "News" with a field "News type" being a list (easier to export than a taxonomy and better for static usage).
In my "News list" view, I want to add a contextual filter on this field. It works well but for this kind of field, the value might be used instead of the key in the override title option.
Example (wanted)
-----------
Field configuration :
1|News
2|Press
3|Other
Views display URL => Title
news/1 => News
news/2 => Press
news/3 => Other
The only workaround is to use a "list (text)" field and to choose the options to uppercase the first letter. It work while you do not have any special chars in your field value.
Example (real, french)
-----------
Field configuration :
actualites|Actualités
breves|Brèves
presse|Presse
Views display URL => Title
news/actualites => Actualites (instead of "Actualités")
news/breves => Breves (instead of "Brèves")
news/presse => Presse (good because no special char)
Could you please take a look at this ?
Regards.
Comment | File | Size | Author |
---|---|---|---|
#6 | views-1382120-6.patch | 859 bytes | tim.plunkett |
#1 | 1382120.patch | 2.13 KB | dawehner |
Comments
Comment #1
dawehnerAh this seems to make sense, let's replace the title for list arguments with it's actual title via an extra argument handler.
As this is not a bug in the classical sense change the status.
Here is a patch for it.
Comment #2
dawehnerAh this seems to make sense, let's replace the title for list arguments with it's actual title via an extra argument handler.
As this is not a bug in the classical sense change the status.
Here is a patch for it.
Comment #3
DuaelFrHi dereine,
Thank you for your quickness but I tried to patch the 3.0
RCand dev version with this without any success.When patching Views then clearing cache I get a "Broken/missing handler" issue on my contextual filter.
Reverting and clearing cache again give me my handler back.
Regards,
Comment #4
Oleksa-1 CreditAttribution: Oleksa-1 commentedConfirm issue. As I see from here http://drupal.org/node/1137672 with taxonomy there is the same bug.
Comment #5
dawehnerThough i still think this is effective a feature not a bug.
Comment #6
tim.plunkettNot sure if this is still valid, since this file was added by #1395320: In a summary, view shows the key, not the value from List(integer) or List(Text) fields.
Here's a reroll anyway.
Comment #7
dawehnerI'm not really sure whether it's a good idea to use a string handler for a numeric internal data representation, even this works for the title, it could cause problems on other places now or in the future.
Comment #8
tim.plunkettTriggering the testbot.