I needed a way to get parameters which are lists in a template, but as I refactor the ugly bit above that outputs the sortable header this will probably fall away.