Hi i have a website and when i visit the tags page i see all the tags that i used, i want to paginate them and only show like 10 tags in each page, in my template i have an html file ( tag.html ) located in layouts/taxonomy i have tried adding {{ template "_internal/pagination.html" . }}
but it didn’t work
Your template path ( layouts/taxonomy/tag.html
) is not valid.
See https://gohugo.io/templates/lookup-order/#examples-layout-lookup-for-taxonomy-pages
If you want to use the same template for all taxonomies, use:
layouts/_default/taxonomy.html
If you want to use a unique template for the tags
taxonomy, use:
layouts/tags/taxonomy.html
In either case, your template should contain something like:
{{ range (.Paginate .Pages).Pages }}
<h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
{{ end }}
{{ template "_internal/pagination.html" . }}
1 Like
it’s working, thank you
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.