I have a text CCK field for countries, with a "select list" of allowed values; each value is labeled - e.g. AL|Albania, AM|Armenia, so that country code ('AL') is a value, and country name ('Albania') is its label.
It works OK in views (including display of properly translated country names when switching the language), except for summary views: when I add the "country" field as an argument and set "Action to take if argument is not present" to "Summary, sorted [whatever]", I see each group marked with country code instead of country name - i.e., field values are displayed instead of their labels.
Am I missing something?
Perhaps it could be fixed by altering view theme templates?
views-view-summary.tpl.php seems to print the value via "print $row->link"; could anybody suggest what should be changed to print value labels instead of values?
Are there any other ways to fix it?
Thank you!
Comments
Comment #1
merlinofchaos commentedMy initial guess is that this is a bug in CCK -- the argument handler should be doing this translation.
Comment #2
merlinofchaos commentedComment #3
GN commentedThank you.
I read the submission guidelines before posting this issue, but I took into account that labels for CCK field values (keys) were properly displayed in various page views, except for summary views. I guess it may suggest that the problem is more likely to depend on Views output rather than its input from CCK.
Comment #4
yched commentedAdded that in a new views_handler_filter_many_to_one_content handler.
Uncovered a Views bug along the way : #296732: views_handler_argument_many_to_one misses arg = 0
So a views argument on field_number currently can't select nodes whose field_number value is 0 if field_number has 0 in its allowed values.
Comment #5
GN commentedThank you!
Is this updated handler intended for inclusion in the next cck release, or already included in the current cck dev snapshot (I guess it might be in content.views.inc v 1.68.2.15 2008/08/18)?
Comment #6
yched commentedIt is in content.views.inc v 1.68.2.15, included in the current -dev tarball
Comment #7
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.