Getting an articles_paginator in template different to index.html
Opened this issue · 2 comments
- I have searched the issues (including closed ones) and believe that this is not a duplicate.
- I have searched the documentation and believe that my question is not covered.
Question
I created my simple site using pelican. I have a page for index that's not listing the articles in my blog, so, pagination is not required there.
I have a different url, blog.html to list my articles. But, from there, I cannot access the articles_paginator.
In Pelican, how can I create a page different to index.html with access to the articles_paginator?
I'm using Pelican 4.9.1.
See DIRECT_TEMPLATES
and PAGINATED_TEMPLATES
documentation. In your case, it would be:
DIRECT_TEMPLATES = ['index', 'authors', 'categories', 'tags', 'archives', 'blog']
PAGINATED_TEMPLATES = {'index': None, 'tag': None, 'category': None, 'author': None, 'blog': None}
or this could be also relevant.
Thank you very much for your kind response. I almost had it as you indicate it. The problem I'm actually having is having access to the paginator in the template.
Some templates I've checked has a reference in the templates named articles_paginator
. For example: https://github.com/getpelican/pelican/blob/main/pelican/themes/simple/templates/pagination.html
But, following that pattern results in a articles_paginator
not defined; failing the generation of the site. What would be the name of the paginator in the blog
page?