You are here

eva-display-entity-view.html.twig in EVA: Entity Views Attachment 8.2

Same filename and directory in other branches
  1. 8 templates/eva-display-entity-view.html.twig

eva theme implementation for main view template.

the main difference between this and the canonical template is the exposed form is removed (because it is displayed as a separate field)

Available variables:

  • attributes: Remaining HTML attributes for the element.
  • 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.
  • dom_id: Unique id for every view being printed to give unique class for Javascript.

File

templates/eva-display-entity-view.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * eva theme implementation for main view template.
  5. *
  6. * the main difference between this and the canonical template
  7. * is the exposed form is removed (because it is displayed as
  8. * a separate field)
  9. *
  10. * Available variables:
  11. * - attributes: Remaining HTML attributes for the element.
  12. * - css_name: A css-safe version of the view name.
  13. * - css_class: The user-specified classes names, if any.
  14. * - header: The optional header.
  15. * - footer: The optional footer.
  16. * - rows: The results of the view query, if any.
  17. * - empty: The content to display if there are no rows.
  18. * - pager: The optional pager next/prev links to display.
  19. * - exposed: Exposed widget form/info to display.
  20. * - feed_icons: Optional feed icons to display.
  21. * - more: An optional link to the next page of results.
  22. * - title: Title of the view, only used when displaying in the admin preview.
  23. * - title_prefix: Additional output populated by modules, intended to be
  24. * displayed in front of the view title.
  25. * - title_suffix: Additional output populated by modules, intended to be
  26. * displayed after the view title.
  27. * - attachment_before: An optional attachment view to be displayed before the
  28. * view content.
  29. * - attachment_after: An optional attachment view to be displayed after the
  30. * view content.
  31. * - dom_id: Unique id for every view being printed to give unique class for
  32. * Javascript.
  33. *
  34. * @see template_preprocess_views_view()
  35. *
  36. * @ingroup themeable
  37. */
  38. #}
  39. {%
  40. set classes = [
  41. 'view',
  42. 'view-eva',
  43. 'view-' ~ id|clean_class,
  44. 'view-id-' ~ id,
  45. 'view-display-id-' ~ display_id,
  46. dom_id ? 'js-view-dom-id-' ~ dom_id,
  47. ]
  48. %}
  49. <div{{ attributes.addClass(classes) }}>
  50. {{ title_prefix }}
  51. {% if title %}
  52. {{ title }}
  53. {% endif %}
  54. {{ title_suffix }}
  55. {% if header %}
  56. <header>
  57. {{ header }}
  58. </header>
  59. {% endif %}
  60. {{ attachment_before }}
  61. {{ rows }}
  62. {{ empty }}
  63. {{ pager }}
  64. {{ attachment_after }}
  65. {{ more }}
  66. {% if footer %}
  67. <footer>
  68. {{ footer }}
  69. </footer>
  70. {% endif %}
  71. {% if feed_icons %}
  72. {{ feed_icons }}
  73. {% endif %}
  74. </div>