You are here

uikit-view-list.html.twig in UIkit Components 8.2

Theme override 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.
    • 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

uikit_views/templates/views/uikit-view-list.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Theme override 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. * - content: The row's contents.
  10. * - title: The title of this group of rows. May be empty.
  11. * - list_attributes: HTML attributes for the list element.
  12. *
  13. * @see template_preprocess_uikit_view_list()
  14. */
  15. #}
  16. <div{{ attributes }}>
  17. {% if title %}
  18. <h3>{{ title }}</h3>
  19. {% endif %}
  20. <ul{{ list_attributes }}>
  21. {% for column in items %}
  22. <li>{{ column.content }}</li>
  23. {% endfor %}
  24. </ul>
  25. </div>