Hey folks - long-time reader, first-time poster!
I have a question on how to setup paginators for specific category pages or if that’s possible.
An example use case here would be having a page that has a paginator (12-page limit) with the data being any pages that have the category “press”.
Right now, I just render all the pages but this solution definitely doesn’t scale very well, especially since I have an image shown for each page I render.
You can see this page for an example of how my current implementation looks like or you can check the code snippet below.
<!-- all pages with 'press' category -->
{{ $press := ($.Site.Taxonomies.categories.press).Pages }}
<!-- columns -->
<div class="columns">
<!-- show card for each page -->
{{ range $press }}
<div class="column">
{{ partial "card.html" . }}
</div>
{{ end }}
</div>
I have been able to set up paginators for section templates.
You can see this page for an example that has a paginator from the same website or the code snippet below.
{{ define "main" }}
<!-- Hero -->
{{ partial "hero.html" . }}
<!-- Page -->
<div class="section">
<div class="content">
<!-- Content -->
{{ partial "content.html" . }}
<!-- Children -->
{{ partial "children.html" . }}
</div>
<!-- Pagination -->
<div class="mt-2">
{{ partial "paginator.html" . }}
</div>
</div>
{{ end }}
But again it’s still unclear to me how exactly I would create that same functionality for the use case described from earlier where the data is pages with a specific category.