0

Hi I have a bunch of items which occur on a given day of the week. So i have a text field called Day, and it's populated by the words 'Monday', 'Tuesday', 'Wednesday' etc. Is there a way to sort this in views that will list items in Weekday order. I can only find options for alphabetical order.

  • You need to group, see stackoverflow.com/a/13829576 – No Sssweat Apr 17 at 16:19
  • 1
    These sound like strings, so, no you can't just sort by order of days in the week. They'd have to be taxonomy at a minimum, sorted by taxonomy order. – Kevin Apr 17 at 16:29
2

This could be working for example if you'd use a taxonomy term reference instead of a text field. Just create a taxonomy with your workdays as terms.

  • use these tags on your content
  • in views add a field to show the term your content is tagged with
  • in the format options choose 'group by' and select your taxonomy field

Now the content should be grouped by the workdays. To achieve the correct sorting order you can either rely on the term-ID (which is created in chronological order) or just arrange your terms with drag and drop (in the terms dialog).

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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