You are here

views-view.html.twig in Zircon Profile 8

Default theme implementation for main view template.

Available variables:

  • attributes: Remaining HTML attributes for the element including:

    • class: HTML classes that can be used to style contextually through CSS, including:

      • view
      • view-[css_name]
      • view-id-[view_name]
      • view-display-id-[display_name]
      • view-dom-id-[dom_id]
  • css_name: A css-safe version of the view name.
  • css_class: The user-specified classes names, if any.
  • header: The optional header.
  • footer: The optional footer.
  • rows: The results of the view query, if any.
  • empty: The content to display if there are no rows.
  • pager: The optional pager next/prev links to display.
  • exposed: Exposed widget form/info to display.
  • feed_icons: Optional feed icons to display.
  • more: An optional link to the next page of results.
  • title: Title of the view, only used when displaying in the admin preview.
  • title_prefix: Additional output populated by modules, intended to be displayed in front of the view title.
  • title_suffix: Additional output populated by modules, intended to be displayed after the view title.
  • attachment_before: An optional attachment view to be displayed before the view content.
  • attachment_after: An optional attachment view to be displayed after the view content.

File

themes/zircon/templates/views/views-view.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation for main view template.
  5. *
  6. * Available variables:
  7. * - attributes: Remaining HTML attributes for the element including:
  8. * - class: HTML classes that can be used to style contextually
  9. * through CSS, including:
  10. * - view
  11. * - view-[css_name]
  12. * - view-id-[view_name]
  13. * - view-display-id-[display_name]
  14. * - view-dom-id-[dom_id]
  15. * - css_name: A css-safe version of the view name.
  16. * - css_class: The user-specified classes names, if any.
  17. * - header: The optional header.
  18. * - footer: The optional footer.
  19. * - rows: The results of the view query, if any.
  20. * - empty: The content to display if there are no rows.
  21. * - pager: The optional pager next/prev links to display.
  22. * - exposed: Exposed widget form/info to display.
  23. * - feed_icons: Optional feed icons to display.
  24. * - more: An optional link to the next page of results.
  25. * - title: Title of the view, only used when displaying in the admin preview.
  26. * - title_prefix: Additional output populated by modules, intended to be
  27. * displayed in front of the view title.
  28. * - title_suffix: Additional output populated by modules, intended to be
  29. * displayed after the view title.
  30. * - attachment_before: An optional attachment view to be displayed before the
  31. * view content.
  32. * - attachment_after: An optional attachment view to be displayed after the
  33. * view content.
  34. *
  35. * @see template_preprocess_views_view()
  36. *
  37. * @ingroup themeable
  38. */
  39. #}
  40. <div{{ attributes }}>
  41. {% if header %}
  42. <div class="view-header">
  43. {{ header }}
  44. </div>
  45. {% endif %}
  46. {% if exposed %}
  47. <div class="view-filters">
  48. {{ exposed }}
  49. </div>
  50. {% endif %}
  51. {% if attachment_before %}
  52. <div class="attachment attachment-before">
  53. {{ attachment_before }}
  54. </div>
  55. {% endif %}
  56. {% if rows %}
  57. <div class="view-content">
  58. {{ rows }}
  59. </div>
  60. {% elseif empty %}
  61. <div class="view-empty">
  62. {{ empty }}
  63. </div>
  64. {% endif %}
  65. {% if pager %}
  66. {{ pager }}
  67. {% endif %}
  68. {% if attachment_after %}
  69. <div class="attachment attachment-after">
  70. {{ attachment_after }}
  71. </div>
  72. {% endif %}
  73. {% if more %}
  74. {{ more }}
  75. {% endif %}
  76. {% if footer %}
  77. <div class="view-footer">
  78. {{ footer }}
  79. </div>
  80. {% endif %}
  81. {% if feed_icons %}
  82. <div class="feed-icons">
  83. {{ feed_icons }}
  84. </div>
  85. {% endif %}
  86. </div>

Related topics