Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Release: Opensolr Search 4.5.0 Minor update available for module opensolr_search (4.5.0). Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Usage Milestone: Simplify Module simplify crossed 10,000 active installs. Usage Milestone: Views Reference Filter Module entityreference_filter crossed 10,000 active installs. Usage Milestone: Dropdown Language Module dropdown_language crossed 10,000 active installs. Usage Milestone: Paragraphs Browser Module paragraphs_browser crossed 10,000 active installs. Usage Milestone: OpenAPI Module openapi crossed 10,000 active installs. Usage Milestone: Decoupled Router Module decoupled_router crossed 10,000 active installs. Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

Views Templates

15,750 sites Security covered Drupal 10–11 Views ecosystem
View on drupal.org

This module allows other modules to provide Views templates, which are reusable collections of templates and variable definitions that define a specific presentation style. These templates can be programmatically created or built from YAML files and can be overridden based on various view and display configurations.

This module is intended to be used by other modules to offer Views templates.
Modules can implement ViewsTemplateBuilder plugins to provide Views templates.

Extend the ViewsBuilderBase class to make View template programmatically

Extend the ViewsDuplicateBuilderBase class to make a View Template from a *.yml Views Template file.

Views Templates should put in the 'views_templates' in the root directory
of the module.

Creates the views templates functionality which was removed in D8 views. A view is effectively a collection of templates and/or variable definitions that can be passed around as a self-contained unit. This then represents a particular interface or presentation style for other objects or items of data. You can use views to implement custom "skins" for an application or content set. You can use them to help simplify the presentation of common objects or data types. You can even use them to automate the presentation of complex data structures such as that generated in an XML::DOM tree or similar. You let an iterator do the walking, and the view does the talking (or in this case, the presenting). Voila - you have to view independent, structure shy traversal using templates.

Views templates can be overridden with a variety of names, using the view, the display ID of the view, the display type of the view, or some combination thereof.

For each view, there will be a minimum of two templates used. The first is used for all views: views-view.html.twig.

The second template is determined by the style selected for the view. Note that certain aspects of the view can also change which style is used; for example, arguments that provide a summary view might change the style to one of the special summary styles.

The default style for all views is views-view-unformatted.html.twig

Many styles will then farm out the actual display of each row to a row style; the default row style is views-view-fields.html.twig.

Depends on

Dependencies of the latest stable release

  • views Drupal core

Required by

1 tracked project depends on this one

Activity

Tracked releases
1
Tracked since
Jan 2026
Latest release
7 months ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Slowing

Releases

Version Type Core Release date
8.x-1.7 Stable 10–11 Jan 30, 2026