I need to sort indexed contents by "modification date" per default.

An exposed button "Relevance" would sort by relevance instead.

views sort options does not seem to allow that. It allows to add different fields for sorting with relative weight of importance

I would need to sort by date ONLY unless i click on "sort by relevance".

It would then sort ONLY by relevance.

enter image description here

enter image description here

How could i achieve that ?

1 Answer 1


i managed to have an acceptable solutions by:

  • exposing both sorting fields
  • use the module "better exposed filters" to allow auto-submit on change and to exclude the exposed order

Changing from one option to the other do not remove the other sorting fields from the query but change the weight of both sorting, which is fine eventually

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.