Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Multiple sorting #98

Closed
ihr opened this Issue · 4 comments

3 participants

@ihr

It would be nice to have a way to sort a collection by multiple criteria. In my example I have a sorting criterion which permits the same values for multiple entries and thus I would like to further sort all entries with the same values with an unique criterion so that the final results have always the same sorting order.

@addyosmani
Owner

Do you have any rough desired URL/URL config options you're able to share related to the above? It always helps to think of these things a little more visually :)

@ihr

A very rough version of a custom _sort function can be found here: https://gist.github.com/3972915 (The code that I've added is between /* BEGIN Code added / and / END Code added */) However, this version is custom one and should be ideally replaced by more generic one which permits to add multiple sorting criteria. As for the config option I would imagine having a sort : ['first_sort_criterion', 'second_sort_criterion', 'third_sort_criterion', etc.]. Let me know if I can be of further help.

@addyosmani
Owner

@ihr It's been a while since we've had a chance to discuss this thread, but I'd be more than happy for us to explore a more general version of your solution above if you're still interested.

@b-ash

@ihr @addyosmani This is addressed by #190

@addyosmani addyosmani closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.