Summary

Drupal's default sorting isn't very useful. We showed how to set up single-level and multilevel sorting, then added exposed sorts. Using an exposed sort gives visitors flexibility in how they view the content not contained in tables, which can use the built-in sortable columns options. From order, we covered filtering. Filtering lets a View builder control what information should be displayed, selecting a subset of the query-generated extracts from the database. For those who know SQL, this is the WHERE clause in most SQL queries. Exposed filters again give the visitor more control of how and what is displayed—in our example, limiting property listings by size (bedrooms), cost, and/or neighborhood.

In the next chapter, we'll extend the ...

Get Mastering Drupal 8 Views now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.