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
Views UI and the Views API are stable in Drupal core. Our content is up-to-date with the latest version of Drupal. Content labeled for Drupal 8 should also apply to Drupal 9.
Drupalize.Me resources
Drupal 7
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