{% set friends = profile.friends(2)|batch(12) %} {% set paginationPages = friends %} {% set paginationUrl %}{{ urls.format('USER_FRIENDS', [profile.id]) }}{% endset %}

Friends

{% for friend in friends[get.page|default(1) - 1] %}
{{ friend.username }}
{{ friend.username }}
{% endfor %}
{% if friends|length > 1 %}
{% include 'elements/pagination.twig' %}
{% endif %}