Using enumeration in sorting function
Using enumeration in sorting function
I have a table with different fields. One of them contains keywords like "good", "bad", "terrible", "perfect". I would like to sort this column in a custom order (keywords would be enumeration like "perfect" = 1, "good" = 2, "bad" = 3, "terrible" = 4). I found the enumeration in the documentation but I did not succeed in using it properly. Can someone help? If you need a reference, here you find an example: http://www.lyra.it/blog/movie-list/
This question has an accepted answers - jump to answer
Answers
Sounds like you want this plug-in :-)
Allan
Thanks, I tried that already but I did not manage to make it work. This was my code: (hope it gets formatted properly)
How can I associate this sorting to a column?
Using the
columns.type
option. There is an example available here.Allan
Thanks a lot, that helped!