Pagination not working

Hello there,

i have a Problem using the pagination plugin. I did everything as described at the github-page. I’m using the pagination inside a modular page. The definition of the collection is also made in the .md-file of the modular page.

—markup
content:
items:
@taxonomy.category’: blogitem
order:
by: date
dir: desc
pagination: true
limit: 3

pagination: ‘true’


While debugging i could see there are entries in my collection. I can see the entries on my page. The limitation works fine as well, but at the end of the page there is no pagination. =/ Pagination only shows up, when I made following changes:

---markup
content:
  items:
    '@taxonomy.category': blogitem
  order:
    by: date 
    dir: desc
  pagination: 'true'
  limit: 3

pagination: 'true'

But it’s still not working. there are no clickable links - just grey icons. I implemented the pagination like this:

—twig
{% set settings = {} %}
{% set collection = page.collection() %}

{% if header.bloglist %}
{% set settings = header.bloglist %}
{% endif %}

{% if page.header.bloglist %}
{% set settings = settings|merge(page.header.bloglist) %}
{% endif %}

{% for child in collection %} {% include 'partials/blog_item.html.twig' with {'blog':page, 'page':child, 'truncate':true} %} {% endfor %}
    {% if config.plugins.pagination.enabled and collection.params.pagination %}
        {% include 'partials/pagination.html.twig' with {'base_url':page.url, 'pagination':collection.params.pagination} %}
    {% endif %}
</div>
``` I don't get whats wrong. Can somebody help me? It seems the pagination-template requires somekind of pagination object, but there is none.

Regards,

Michael

Rather than trying to debug this via the forum, why don’t you download the blog-site skeleton from the downloads and compare your setup to that. That is probably the best way to see what you are missing.

That’s what I did. The pagination works on a normal template (like in the blog-timplate I downloaded). But in a modular site not. Sorry, I just try to find the reason why …

Perhaps you could ZIP up your site and send me a link so i can try it on my local?

Hello rhuskter,
I rebuild my template from modular to a normal one. It was the easiest way around the problem. But it’s not statisfying. ;D

Does pagination technically work for modular components? Would it just end up paginating that specific component?

Generally speaking you wouldn’t ever want to paginate with modular subpages, as these are just building-blocks for another page.

Yeah that makes sense. Thanks rhukster