I've patched my local copy of views to support more complex Representative views, but I've not tested to see if it broke Representative node functionality, haven't looked in to the Representative node problem with 'order by', and do not have time to test it further. I would like to see this in Views, but not without the additional time put in to making sure it's all working.

Changes:

  • views_join_subquery now supports arguments (by supplying them as an associative array in the definition key 'arguments')
  • Some of the logic in representative_groupwise_max was isolated to non-views (too lazy to fix/reevaluate), and new logic was added for views
  • The logic for finding the correlated argument in representative_groupwise_max was changed
  • Arguments in representative_groupwise_max are namespaced now and passed to views_join_subquery

Patch following.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ChrisRL’s picture

Patch for above issue.

askibinski’s picture

This issue is probably partly outdated by the patch in this one:
#1417090: Taxonomy term "Representative node" views with filters and sorts don't work