You are here

views-view-simple-timeline.html.twig in A Simple Timeline 8

Default theme implementation for a view template to display a list of rows.

Available variables:

  • attributes: HTML attributes for the container.
  • rows: A list of rows for this list.
    • attributes: The row's HTML attributes.
    • content: The row's contents.
  • title: The title of this group of rows. May be empty.
  • list:
    • attributes: HTML attributes for the list element.

File

templates/views-view-simple-timeline.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation for a view template to display a list of rows.
  5. *
  6. * Available variables:
  7. * - attributes: HTML attributes for the container.
  8. * - rows: A list of rows for this list.
  9. * - attributes: The row's HTML attributes.
  10. * - content: The row's contents.
  11. * - title: The title of this group of rows. May be empty.
  12. * - list:
  13. * - attributes: HTML attributes for the list element.
  14. *
  15. * @see template_preprocess_views_view_simple_timeline()
  16. *
  17. * @ingroup themeable
  18. */
  19. #}
  20. {{ attach_library('simple_timeline/timeline') }}
  21. {% if attributes -%}
  22. <div{{ attributes }}>
  23. {% endif %}
  24. {% if title %}
  25. <h3>{{ title }}</h3>
  26. {% endif %}
  27. <ul {{ list.attributes }}>
  28. {% for row in rows %}
  29. <li{{ row.attributes }}>
  30. <div class="timeline-item-wrapper clearfix">
  31. <span class="timeline-marker"></span>
  32. {{ row.content }}
  33. </div>
  34. </li>
  35. {% endfor %}
  36. </ul>
  37. {% if attributes -%}
  38. </div>
  39. {% endif %}