Reputation: 920
I'm implementing a table with 4 columns. School, Last name, First name, and Graduation date. Currently the table will sort if you click on the header of any column. My objective is to get it to sort based on 2 criteria. So if you click on school, it will sort the info by school first and then last name second. And vice versa if you click on last name. Is there a way to do this in drupals interface? If not does anyone know where the code is located for these types of things so i can directly query it myself?
Upvotes: 1
Views: 729
Reputation: 2456
There is a similar discussion for Drupal 6.x but it is the same: https://drupal.stackexchange.com/questions/5254/views-sortable-table-secondary-sort
You need a js plugin like tablesort or better, a module like tablesorter. See also the similar modules down the module page.
If you are in a good level with Drupal you can try the custom module described here which is a more Drupal friendly solution.
Upvotes: 1