I have a view which uses a custom field called article type as it's sorting criteria to sort articles. This article type field, has the following options:

8Research in Translation|Research in Translation
1PhotoEssay|Photo Essay

The reason I have a number preceding the text in every option is so that, when I use this field as a sort criteria and choose the order as ascending, Views actually looks for the key text and arranges the results in that order (0 to 8 in this case).

Now, I want to achieve this same order without having to tamper with the key|value pairs like I have done. I have heard of Draggable Views, but I'm not sure that solves the issue here, since this view takes a contextual filter value and the results are always dynamic based on the filter value that is passed to it from the URL.

So is there another way to use a select list's options as a sorting criteria, but in an order that we want it to be in?


Looking for approximately the same, but I believe this isn't easily solvable. What you could do is use taxonomy instead and then sort the view by the term weight (create a relation to the taxonomy in the view and you get term weight as sort criteria).

Not the answer you're looking for? Browse other questions tagged or ask your own question.