***I have just realised I am mixing up my filtering and sorting. I have amended the question to try and make it a bit clearer.
I'm trying to use SuperSort plugin to run different filters, but I'm struggling as only the last filter gets applied. I would like to add the filter to a button or link, so that when the user clicks on it, it activates the filter. Any tips?
<h1>search</h1>
<form action="{{ url('search') }}">
<input type="search" name="q" placeholder="Search">
<input type="submit" value="Go">
</form>
{% set query = craft.request.getParam('q') %}
{% set users = craft.users.search(query).order('dateUpdated')|reverse %}
{% if users|length %}
<p></p>
<ul>
<span<a href="{{ users.dateUpdated }}">{{ users|length }} results:</a></span>
<li><a href="{% set usersByFirstName = craft.users.search('sortAS', '{{ firstName}}') %}">A-Z</a></li>
<li><a href="{% set users = craft.users.search(query).order('firstName')|reverse%}">Z-A</a></li>
<li><a href="#">Nearby</a></li>
<li><a href="#">Newest</a></li>
<li><a href="#">Oldest</a></li>
</ul>
{% endif %}
For example:
link#1 - sort A-Z link#2 - sort dateUpdated