taxonomy: avoid error if all term pages are hidden #685

This commit is contained in:
Sören Weber 2024-09-20 21:31:40 +02:00
parent 7e28003401
commit 997e5c41d6
No known key found for this signature in database
GPG key ID: BEC6D55545451B6D

View file

@ -7,7 +7,9 @@
{{- else if eq .Page.Kind "taxonomy" }}
{{- /* go to first term page */}}
{{- $pages := partialCached "partials/_relearn/pagesTaxonomy.gotmpl" . .Path }}
{{- $next = (index $pages 0).Page }}
{{- with index $pages 0 }}
{{- $next = .Page }}
{{- end }}
{{- else }}
{{- $next = partial "inline/next-page" . }}
{{- end }}