Drupal twig template file naming convention for views block

Note Statistics

Note Statistics

  • Viewed 203 times
Sat, 04/03/2021 - 15:37

The files with name bellow will be used when rendering a views block. The priority is from top to bottom.

  • block--views-block--VIEW_ID-BLOCK_ID.html.twig, for example for a view with machine name my_view and block with machine name block_1 the file name is block--views-block--my-view-block-1.html.twig.
  • block--views-block.html.twig
  • block--views.html.twig
  • block.html.twig
Authored by