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.
In the current D7 versions, the fields use the default 'numeric' filter assigned by Views' field_views_field_default_views_data() (nid / uid are numeric columns). Picking nodes and users by ids is not too friendly.
In CCK D6, noderef and userref fields used the 'many to one' filter handler, which provides checkboxes / selectbox to pick nodes and users.
Comment | File | Size | Author |
---|---|---|---|
#3 | references_views_filter-1046886-3.patch | 5.68 KB | yched |
#1 | references_views_filter.patch | 5.86 KB | yched |
Comments
Comment #1
yched CreditAttribution: yched commentedAttached patch alters the filter handler, like was done in D6.
- unlike in D6, no need to go through a dedicated handler class, the basic views_handler_filter_in_operator and its 'options callback' and 'options arguments' are good enough.
- comes with a bit of refactoring to avoid duplicate code between the existing node_reference_options_list() (hook from options.module) and the new node_reference_views_filter_options() callback.
Comment #2
yched CreditAttribution: yched commentedGranted - the best option would be to let Views filters re-use 'official' widgets - notably handy for exposed filters.
That's another issue, though (belongs to Views module), and is outside our current scope of "get on-par with D6 functionnality"
Comment #3
yched CreditAttribution: yched commentedRerolled after #962694: [release blocker] Make Node Reference Relationships Work in Views, and committed.
Patch attached for reference.