You are here

entity-pager.html.twig in Entity Pager 2.0.x

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

Default theme implementation for an entity pager.

The list of items are presented next to each other in a usable way using minimalist amount of CSS (see entity_pager.css).

Available variables:

  • count_word: The word to use for the count of items.
  • links: An array of links to render:
    • prev: Link to previous node.
    • all_link: Link to All listing group of records.
    • next: Link to next node in the sequence.
    • count: Count of number of nodes in the group.

See also

template_preprocess_views_view_entity_pager()

File

templates/entity-pager.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation for an entity pager.
  5. *
  6. * The list of items are presented next to each other in a usable way using
  7. * minimalist amount of CSS (see entity_pager.css).
  8. *
  9. * Available variables:
  10. * - count_word: The word to use for the count of items.
  11. * - links: An array of links to render:
  12. * - prev: Link to previous node.
  13. * - all_link: Link to All listing group of records.
  14. * - next: Link to next node in the sequence.
  15. * - count: Count of number of nodes in the group.
  16. *
  17. * @see template_preprocess_views_view_entity_pager()
  18. *
  19. * @ingroup themeable
  20. */
  21. #}
  22. {%
  23. set classes = [
  24. 'views-view-entity-pager',
  25. 'entity-pager',
  26. 'count-word-' ~ count_word
  27. ]
  28. %}
  29. <div{{ attributes.addClass(classes) }}>
  30. <ul class="entity-pager-list">
  31. {% for key, link in links %}
  32. {% if link %}
  33. <li class="entity-pager-item entity-pager-item-{{ key }}">
  34. {{ link }}
  35. </li>
  36. {% endif %}
  37. {% endfor %}
  38. </ul>
  39. </div>