<div class="per-page custom-dropdown-wrap">
  <div class="dropdown">
    <button class="dropdown-toggle" type="button" data-bs-toggle="dropdown">
      {{ 'entity.list.elements_per_page'|trans({ '%elements%': app.request.get('items') ? app.request.get('items') : '25' }, 'aa_admin') }}
    </button>
    {% set elementsPerPage = [25, 50, 100] %}
    <div class="dropdown-menu">
      {% for elementPerPage in elementsPerPage %}
        <a class="dropdown-item" href="{{ path(app.request.get('_route'), app.request.query|merge({ entitySlug: app.request.get('entitySlug'), action: app.request.get('action'), items: elementPerPage })) }}">
          {{ 'entity.list.elements_per_page'|trans({ '%elements%': elementPerPage }, 'aa_admin') }}
        </a>
      {% endfor %}
    </div>
  </div>
</div>