I'm looking to paginate my tag
page, but unfortuntately it throws a fairly strange error. Remove the pagination -> the page works perfectly? Bit confused, the only thing I think it may be is that it's only returning 1 result so errors?
{% set tag = craft.tags.title(tag).first() %}
{% set users = craft.users.group('influencer').relatedTo(tag).order('userTotalFollowers asc').all() %}
{% if users|length %}
{% paginate users as pageInfo, pageUsers %}
{% for user in users %}
{{ user.username }}
{% endfor %}
<div class="row justify-content-between">
<div class="col text-left">
{% if pageInfo.prevUrl %}<a href="{{ pageInfo.prevUrl }}" class="btn btn-outline-secondary">← Previous</a>{% endif %}
</div>
<div class="col text-right">
{% if pageInfo.nextUrl %}<a href="{{ pageInfo.nextUrl }}" class="btn btn-outline-secondary">Next →</a>{% endif %}
</div>
</div>
{% endif %}
Argument 1 passed to craft\helpers\Template::paginateCriteria() must implement interface yii\db\QueryInterface, array given, called in /app/storage/runtime/compiled_templates/ef/efb8567b56752c2a98d031bc1d51461f73acc6fdd1f2c8872e44feb2af18359c.php on line 133