You are here

favlist-item-list.html.twig in Favorites 8.2

Theme override for an item list.

Available variables:

  • items: A list of items. Each item contains:

    • attributes: HTML attributes to be applied to each list item.
    • value: The content of the list element.
  • title: The title of the list.
  • list_type: The tag for list element ("ul" or "ol").
  • attributes: HTML attributes to be applied to the list.
  • empty: A message to display when there are no items. Allowed value is a string or render array.

File

templates/favlist-item-list.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Theme override for an item list.
  5. *
  6. * Available variables:
  7. * - items: A list of items. Each item contains:
  8. * - attributes: HTML attributes to be applied to each list item.
  9. * - value: The content of the list element.
  10. * - title: The title of the list.
  11. * - list_type: The tag for list element ("ul" or "ol").
  12. * - attributes: HTML attributes to be applied to the list.
  13. * - empty: A message to display when there are no items. Allowed value is a
  14. * string or render array.
  15. *
  16. * @see template_preprocess_item_list()
  17. */
  18. #}
  19. <div class="item-list" id="myfavlist">
  20. <ul>
  21. {% for list in content.items %}
  22. <li>{{ list.title_link }} <span id="del-{{ list.id }}">{{ list.remove_link }}</span></li>
  23. {% endfor %}
  24. </ul>
  25. </div>