By carn1x on
Basically I want to extract the most recently published nodes from a content type, but once I have the 5 most recent, I want to reverse their order so that the most recent appears last, whats the best way to go about this please?
Thanks :)
Comments
After you have your filters
After you have your filters set up the way you want, simply add an item to the "Sort criteria" box right above your filters (in views 2 which I would imagine you're using). Choose Node: Post date or Node: Updated date (depending on if you want to use the date created or last edited) and then choose ascending rather descending.
Boom!
I want to get the 5 most
I want to get the 5 most recent nodes, which means I need to do Sort Descending. However this outputs in the format
1st MOST RECENT
2nd MOST RECENT
3rd MOST RECENT
4th MOST RECENT
5th MOST RECENT
Once I have those 5 however, I want to reverse their order of output.
Thanks for trying!
_
Carn1x,
I don't think it is clear what you want.
The list you get is correct?
1st MOST RECENT
2nd MOST RECENT
3rd MOST RECENT
4th MOST RECENT
5th MOST RECENT
And once you have them you want to revert the order just of these 5 to ascending?
5th MOST RECENT
4th MOST RECENT
3rd MOST RECENT
2nd MOST RECENT
1st MOST RECENT
Sorry, why? If you want to show the latest item first, then the list you get is just that.
If however this is what you need - then you probably have to write a little php code to do that
Yes this is what I was afraid
Yes this is what I was afraid of. Sometimes Drupal is awesome, but sometimes it's a pain in the ass. :).
Thanks anyway!
_
Depending on what Style you are using under "Basic Settings" you can set the sort order there.
Some table styles including Views Calc Table (separate, add-on module) will allow you to define which Fields are sortable, which is the default and in what order - ascending / descending.
If you use tables you do not need to set sort criteria - but it should not conflict if you set both - I guess the table setting in Style overrides the sort criteria.