I am creating a view which lists node titles for a specific node type. I want to display the 5 latest nodes with the latest at the bottom of the list.

If I sort using the post date criteria in an ascending manner, then the earliest 5 posts are shown. If I use descending, then the latest 5 are shown, but the the latest is at the top.


I'm fairly certain that Views does not support this. It's a somewhat frequent request for listing comments as well, but you can't add sorting after filtering/paging.

The easiest way is to change the view template to output the rows in reverse order.


You could use hook_views_pre_render() to reverse the order of the rows before they get to the template but after sorting/paging. That way you can keep php logic out of your template files.

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.