1

Lets say I have 10 articles, tenth being the last one created. I want my view block to show 4 latest articles, but in ASCENDING order.

7,8,9,10 - something like this.

Can I somehow filter out the exact number of latest articles? View options

  • Combination of view filters, view sorting and displaying a specified number of items (5 in my example). – David Kovač Feb 22 '18 at 15:36
  • Can you add a screesnhot of your current view's configuration to your question? – leymannx Feb 22 '18 at 15:37
  • 1
    Can't you simply change the order from the dialogue that appears when you click on "Content: Authored on (desc)"? – leymannx Feb 22 '18 at 15:39
  • 1
    Oldest 4 articles would be shown then. – David Kovač Feb 22 '18 at 15:43
  • 1
    Not to worry, I found out that I don't need articles to be shown in Ascending order, so everything is alright. But still, i find this issue quite interesting. – David Kovač Feb 22 '18 at 15:49
3

Just output the rows you need and reverse them with CSS.

.view-content {
  display: flex;
  flex-direction: column-reverse;
}
  • +1 Absolutely agreed! Solve a simple problem with a simple solution. No extra processing or database queries needed. :) – leymannx Feb 23 '18 at 7:08
  • This definitely seems like the best solution. Though I was hoping for more site building solution. – David Kovač Feb 23 '18 at 9:09

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.