1

How do I get pagination set up with the following? It should be easy but I'm getting in a muddle.

{% set myUserQuery = craft.users().group('members').order('companyName asc').limit(10).find %}
{% set users = myUserQuery %}


<div class="col-24 gutter-bottom--none flex-container">

  {% for user in users %}
      {% include "includes/_directory-list" %}
  {% endfor %}

</div>

{% include "includes/_pagination" %}

I thought I might be able to do this, but no

{% paginate users %}
1
{% paginate myUserQuery as users  %}

{% for user in users %}

{% endfor %}

This should help you also.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.