I am working the Workflow Summary page, which is populated by a view. This view has fields, filters and I can specify the sort order for it, which is all great and it has a surprisingly accessible interface considering all the ajax and whatever else that is going on in there. But the users wanted to be able to re-sort the columns as they went along. Guess what? Drupal already has a way to do this!
- Edit the view you want to add the column sorting to
- Under “Basic Settings”, look for “Style: Table” and click on the picture of a cog next to it. (if I were a serious blogger, I’d screenshot. Never mind, eh?)
- Scroll down to see the table settings
- There is a list of the fields, and a tickbox for each labelled “sortable” – tick the boxes for any columns you want users to be able to change the sort order on
I didn’t find this very fast but thanks to some help from #drupaluk on freenode someone pointed me in the right direction – my columns now have clickable headers and resort as expected! If this helps, or if you have any more tips for this type of thing, please do add a comment.