0

I'm merging entries from two separate sections across locales. All going well but when I try to paginate the results I get the following error:

Recoverable error

Argument 1 passed to Craft\TemplateHelper::paginateCriteria() must be an instance of Craft\ElementCriteriaModel, array given,

The offending code as follows (simplified):

{% set pages = [] %}
{% set devNews = craft.entries.section('newsDevelopment').status(null).find() %}
{% set alumniNews = craft.entries.section('newsAlumni').status(null).locale('prior_alum').search('shareNewsAlumni:1').localeEnabled(false).find() %}
{% set pages = pages|merge(alumniNews) %}

{% paginate news as pages %}
    {% for article in news %}
        ...
    {% endfor %}
{% endpaginate %}

As I say, works fine/as expected without the paginate but as soon as I try to paginate I get the error.

Any thoughts on above appreciated.

  • {% paginate news as entries %} is a typo an you meant pages, right? – carlcs Mar 24 '16 at 15:57
1

The paginate tag requires a criteria model, which means you have to come up with your own pagination solution.

See an example here:
Paginate entries when I do not have a criteria model?

| improve this answer | |

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.