The base argument handler supports the use of 'name_field' in an argument definition, mapping a known field like node title or user name to summary titles and breadcrumb trails automatically.
The views_handler_argument_string class, however, ignores that value and forces the value and name fields to be the same. It's not a terrible assumption for strings, but with the rise of machine names and other similar key/value pairs in Drupal, it ends up being an unfortunate oversight. The attached patch adds support for name_field to string args by restoring the call to the summary_name_field() function. It's been tested with and without glossary handling, the only feature that might collide with it.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 1016814-name_field.patch | 2.04 KB | dawehner |
| views_string_arg_name_field.patch | 1.4 KB | eaton |
Comments
Comment #2
dawehnerHere is a patch fro 6.x-3.x, too.
Comment #3
merlinofchaos commentedCommitted to 6.x-3.x and 7.x-3.x