This one isn't of much use via the UI, but it's very useful for developers building data programmatically with Views. In particular, the Custom Pagers module: I need to run the View twice, once getting entries *higher* than a particular one in a sort, then again getting all values *less* than another.

Not all 'sort' handlers have an accompanying 'filter' handler, so programmatically adding a filter for each sort isn't possible. This code (suggested by merlinofchaos) adds a $sort->filter($operator, $value) function to the default sort handler. It would apply the sort as usual but also act as a built-in 'cutoff' for values above or below a particular spot in the sort. This is not currently exposed in the UI, but exists so developers doing similar things can quickly slice-and-dice a sorted view even if there are no matching filters defined.

Code needs testing, I was about to test another set of patches and wanted to make sure I rolled this and posted it so it didn't get munched when I applied subsequent patches.

CommentFileSizeAuthor
sort_filter.patch1.92 KBeaton
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

drewish’s picture

subscribing

dawehner’s picture

This definitive nehttp://drupal.org/files/issues/sort_filter.patcheds work, because it uses includes/query.inc

esmerel’s picture

Status: Needs work » Postponed

Sending this to the postponed bucket unless someone has time/inclination to work on it.

merlinofchaos’s picture

Category: feature » task
Status: Postponed » Active

I'd like to unbury this. This has always been something I wanted...

MustangGB’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)