Skip to content

Commit

Permalink
taxonomy: avoid error if all term pages are hidden #685
Browse files Browse the repository at this point in the history
  • Loading branch information
McShelby committed Sep 20, 2024
1 parent 82524f6 commit e44f9fd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion layouts/partials/_relearn/pageNext.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down

0 comments on commit e44f9fd

Please sign in to comment.