Avoid using global 'page' variable in partial
This seems to have an undesired effect when called from a shortcode Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
This commit is contained in:
parent
f677a3731c
commit
13eeadf6f0
|
@ -1,12 +1,13 @@
|
||||||
|
{{- $page := . -}}
|
||||||
{{ $term := index (.GetTerms "series") 0 }}
|
{{ $term := index (.GetTerms "series") 0 }}
|
||||||
{{ with $term }}
|
{{ with $term }}
|
||||||
{{- /* No idea why the 'Reverse' is needed? */ -}}
|
{{- /* No idea why the 'Reverse' is needed? */ -}}
|
||||||
{{ $pages := (site.Taxonomies.series.Get .Data.Term).Pages.ByDate.Reverse }}
|
{{ $pages := (site.Taxonomies.series.Get .Data.Term).Pages.ByDate.Reverse }}
|
||||||
<nav id="SeriesNavigation" class="container">
|
<nav id="SeriesNavigation" class="container">
|
||||||
{{ with $pages.Prev page }}
|
{{ with $pages.Prev $page }}
|
||||||
{{ partial "serieslink.html" (dict "direction" "previous" "link" .RelPermalink "page" .) }}
|
{{ partial "serieslink.html" (dict "direction" "previous" "link" .RelPermalink "page" .) }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ with $pages.Next page }}
|
{{ with $pages.Next $page }}
|
||||||
{{ partial "serieslink.html" (dict "direction" "next" "link" .RelPermalink "page" .) }}
|
{{ partial "serieslink.html" (dict "direction" "next" "link" .RelPermalink "page" .) }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</nav>
|
</nav>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user