Only sort views after selected I am looking to sort nodes in a view, but only after the user has selected the sorting value.

So the nodes are currently listed in posting order, but I would like to provide the user to sort by price, but only once selected the price sorting?

Creating a standard sort by price, sets this from the initial page load and does not give the use a chance to see recently posted items.

How could this be achieved?
Two ideas:

(1) Expose the sort to the user to allow them to control sorting. You need to enable "Expose this sort to visitors, to allow them to change it" for the sort criterion in views. See below for more detail on how to get the two sorts grouped together.

(2) Present the data in a table and make the columns you want the user to be able to sort, "sortable". You'll find this option under Format: table > Settings.

With both approaches, you can set an initial sort, so the user will see content in the order you wish when the page first loads.

Edit: more detail for #1: by default, views will sort the output based the first sort criterion, and clutter the exposed form with sort order controls. To get the default sort you want, and to clean things up, you can try:


Add both sort fields and expose to visitors (post date first)
Under exposed form options: enable autosubmit and hide the submit button
Under exposed form options: disable "Expose sort order"
Adjust exposed sort labels if needed for clarity


(exposed form options are in the Advanced section of the view)

When the view loads, the user will see a single select list that contains both sort options, and no submit button. The view will be sorted according to the first option.