0

Just wondering whether I can use exposed filters to re-order a list of nodes rather than eliminating ones that don't fit the desired criteria.

E.g. If I filter for 'Monday' and have a list of nodes [Sunday, Saturday, Friday, Thursday, Wednesday, Tuesday, Monday], then I would like the list of nodes to return as Monday, Sunday, Saturday, Friday, Thursday, Wednesday, Tuesday.

At the moment my result when I filter for the term 'Monday', is just 'Monday'.

Any thoughts?

Cheers!

1 Answer 1

2

Depending on your display requirements, you might be able to use a table format. When using a table format, you have the option to set columns to "sortable".

Format section:

enter image description here

Sorting settings:

enter image description here

6
  • That's a good idea! What's the next step though? How do I make it sortable in the way I'd like?
    – Liam
    Commented Mar 13, 2015 at 1:24
  • 1
    This way would allow you to sort alphabetically, but you just add your fields and select which ones should be sortable in the format settings. If you needed something other than alphabetical sorting, you would want to write a custom module with a custom views sort handler. Commented Mar 13, 2015 at 1:36
  • I might have to do that, as I need sorting by an input. The user says 'Monday' and I need to bring 'Monday' to the top of the list.
    – Liam
    Commented Mar 13, 2015 at 1:40
  • 1
    There are a million jquery sort/filter plugins. You could likely find one that fits your specific needs and just drop it on top of your existing setup. Commented Mar 13, 2015 at 1:54
  • So you're talking not a module, but chucking it in the code instead?
    – Liam
    Commented Mar 13, 2015 at 5:14

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.