A view is a listing of content on a website. The Views module handles the display of views, and the Views UI module allows you to create and edit them in the administrative interface. When you define views, you are taking data from your website and displaying it to the user.
Example tasks
You can create views to output practically any content entity that is stored in the system. For example, you can create the following lists using various display output for a farmers' market site:
- Vendors as a table
- Recipes in a grid
- The most recent content on the site as a bulleted list
Confidence
Currently, Drupalize.Me offers tutorials on Views for Drupal 8 (in core) and Drupal 7 (as a contributed module). While there are some new features, the Views UI hasn't changed very much, so most tutorials on Views for Drupal 7 will still be relevant to Drupal 8.
For themers and site builders, one key difference in Drupal 8 is how theme information is accessed and how to override template files. See Overview: Theming Views for more information.
For module developers, our Coding for Views series of tutorials applies to Drupal 7. Views plugins in Drupal 8 use Drupal's plugin system. Learn what plugins are in our Drupal 8 Module Development Guide and see the External resources section below for resources about coding views plugins for a Drupal 8 project.
Drupalize.Me resources
These tutorials in the Markup in Drupal series go into more detail about controlling markup output in Views:
- Introduction to Markup in Views
- Views Unformatted List Format
- Views HTML List Format
- Views Table Format
- Views Default Field Wrapper Markup
- Views Advanced Field Wrapper Markup
- Views Theme Information (Drupal 7 only)
- Theme Developer Module (Drupal 7 only)
- Views Template Files (Drupal 7 only)
- How to Add a Class to a View
- Recap and Challenge: Markup in Views
External resources
- Views module (drupal.org)
- Official documentation for the Drupal 8 core Views module.
Views API
- Views API overview (api.drupal.org)
- Overview of the Views module API.
- Building Views Query Plugins for Drupal 8, Part 1 (lullabot.com)
- Learn how to use a Views Query Plugin to use data from an external API in Drupal.
- Building Views Query Plugins for Drupal 8, Part 2 (lullabot.com)
- Learn how to build field plugins, filter plugins, and relationship plugins to expose custom data to the Views module
- Oleksandr Trotsenko wrote a series of articles on the Views API that do a great job of explaining a number of concepts for Views developers:
- Drupal 8 Views tutorial for developers. Part I -- Theory
- Drupal 8 Views tutorial for developers. Part II --Tables & Fields
- Drupal 8 Views tutorial for developers. Part III -- Sorts & Filters
- Drupal 8 Views tutorial for developers. Part IV -- Arguments
- Drupal 8 Views tutorial for developers. Part V -- Relationship