Site Building

Overview: Theming Views for Drupal 8, 9, and 10

Like most output in Drupal, Views relies on Twig templates for a significant amount of its rendering. In this tutorial we'll identify where you can find the default Views templates within your file system, what the common templates are for, and how to name your templates so that they are applied to specific views.

By the end of this tutorial, you should be able to:

  • Identify where to find default views templates
  • Understand which templates apply to what part of a view
  • Get a sense of the template suggestions and how to use them to limit where your custom templates are applied
  • Identify a view's machine name
  • Identify a display's machine name
  • Identify a field's machine name