Component

Views view

Some extra's for views-view components.

 

Extra template suggestions

Added 2 more specific template suggestions. One for the name of the view and one for the display name of that view.

<!-- THEME DEBUG -->
<!-- THEME HOOK: 'views_view' -->
<!-- FILE NAME SUGGESTIONS:
   x views-view--articles--last-published.html.twig
   x views-view--articles.html.twig
   * views-view.html.twig
-->

In above example:

  • articles is the name of the view
  • last-published is the name of the display used of the articles view

 

Better classes

The classes on taxonomy-terms has been changed to:

{%
  set classes = [
    'views-view',
    'views-view--' ~ id|clean_class,
    'views-view--' ~ id|clean_class ~ '--' ~ display_id,
    dom_id ? 'js-view-dom-id-' ~ dom_id,
  ]
%}

Which gives you the following classes:

.views-view {}
.views-view--articles {}
.views-view--articles--overview {}

// Drupal-supplied unique idendifier to be used by JS
.js-view-dom-id-683eb5bba {} 
views-view
Drupal Core
Responsive
Accessible
HTML
47 downloads
horizontal beam No open issue