3

I have views grouped by year (grouping field #1) that I want to sort from the most recent to the oldest. I have content referenced to the year.

This returns me a HTML list such as:

2013
- alpha
- gamma
- beta
- delta

2012
- zeta
- gamma
- epsilon

The years are correctly sorted (DESC) but I would like to have the content of each year sorted ASC to have the content listed alphabetically to have a list like this:

2013
- alpha
- beta
- delta
- gamma

2012
- epsilon
- gamma
- zeta

I have of course tried to apply a ASC sort on the content but it affects the years also and they become ASC sorted as well.

2

I have created a small test setup in Drupal, containing six nodes with each having a year (integer) and a content (text) field.

The view's configuration is displayed below:

enter image description here

The sort criteria is first on the year field (descending) and then on the content's text (ascending). The view generates the following result:

enter image description here

Note that I have excluded the year field from the display. Instead I'm using the grouping option on year in settings of the unformatted list (however, this is not necessary, but the result resembles your question more closely).

  • Thanks for your solution! I thought I did that but obviously, something was missing... – jozi May 8 '13 at 13:37
  • Glad I could help – Watergate May 8 '13 at 16:16

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.