Download & Extend

Create multiple sort criteria text

Project:Better Exposed Filters
Version:7.x-3.0-beta1
Component:User interface
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

Is it possible to create descriptive text for each sorting criteria when I have multiple ones using BEF to combine sort order with sort by?
something like:
Sort by:
Price highest
Price lowest
Date recent
Date old
Size biggest
Size smallest

The default is like this:
Price ascending
Price descending
Date ascending
Date descending
Size ascending
Size descending

Thanks in advance

Comments

#1

Component:Miscellaneous» User interface
Category:support request» feature request

I think this would be a great addition but I'm concerned how to build the UI without overwhelming the already complicated exposed form dialog.

One option would be to allow users to specify an array similar to:

<?php
array(
 
'Price ascending' => 'Price low to high',
 
'Price decending' => 'Price high to low',
 
'Date ascending' => 'Oldest to Newest',
 
'Date descending' => 'Newest to Old',
  ...
etc...
);
?>

That would require only a textarea that could be tucked away in an advanced options fieldset to prevent the UI from turning into a wall-of-options dialog.

Thoughts?

#2

Status:active» fixed

I've added a rewrite option for combined sorts (didn't make sense to add it for uncombined sorts, but feel free to convince me otherwise). It's in the latest 7.x-3.x-dev release.

NOTE: a bunch of the sort options were moved to an "Advanced options" fieldset to keep the UI from getting overly complicated. The new rewrite option is in there. Rather than risking eval'ing PHP as I suggested earlier, it's the more common old_value|new_value format. While that's a little less customizable, it's a LOT safer.

#3

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.