Site Building

Overview: Sort Criteria in Views for Drupal 8, 9, and 10

With sort criteria, we can specify how to order our list. We can specify sort criteria using any field on or related to our view's base entity, and then specify in which order to sort, e.g. ascending or descending. If you are familiar with MySQL, it may be helpful to know that sort criteria are the ORDER BY clause of the query that Views builds. In this tutorial, you'll learn:

  • How to add and configure sort criteria to a view to sort the list in various ways
  • What configuration options are available

By the end of this lesson, you should understand how to use and configure sort criteria in Views. (Note: We'll cover exposed sort criteria in Overview: Exposed Sort Criteria in Views)