diff options
author | Emiel Hollander <EmielH@users.noreply.github.com> | 2018-11-04 14:11:56 +0300 |
---|---|---|
committer | Emiel Hollander <EmielH@users.noreply.github.com> | 2018-11-04 14:11:56 +0300 |
commit | 0128143d9e7fb0ae11d55d89c21ccc7114b21916 (patch) | |
tree | ab1b0ec915d3058176d958d29508548bb385ba37 | |
parent | a4040547736578f6baf05b41b6a5ecd52ff2f77b (diff) |
Remove deprecated .Next and .Prev calls
Page's .Next and .Prev are deprecated and will be removed in a future
release. Replaced these with .NextPage and .PrevPage. Also removed the
links to the previous and next page from the about template. This
assumes there is only ever one about page.
-rw-r--r-- | layouts/_default/single.html | 10 | ||||
-rw-r--r-- | layouts/about/list.html | 13 |
2 files changed, 6 insertions, 17 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html index f705d3c..b056b0e 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -13,15 +13,15 @@ </div> <div class="pagination"> - {{- if .Next }} - <a href="{{ .Next.URL }}" class="left arrow">←</a> + {{- if .PrevPage }} + <a href="{{ .PrevPage.URL }}" class="left arrow">←</a> {{- end }} - {{- if .Prev }} - <a href="{{ .Prev.URL }}" class="right arrow">→</a> + {{- if .NextPage }} + <a href="{{ .NextPage.URL }}" class="right arrow">→</a> {{- end }} <a href="#" class="top">Top</a> </div> </main> -{{ end }}
\ No newline at end of file +{{ end }} diff --git a/layouts/about/list.html b/layouts/about/list.html index 3458ca4..30dd850 100644 --- a/layouts/about/list.html +++ b/layouts/about/list.html @@ -9,17 +9,6 @@ {{ .Content }} </div> - - <div class="pagination"> - {{ if .Next }} - <a href="{{ .Next.URL }}" class="left arrow">←</a> - {{ end }} - {{ if .Prev }} - <a href="{{ .Prev.URL }}" class="right arrow">→</a> - {{ end }} - - <a href="#" class="top">Top</a> - </div> </main> -{{ end }}
\ No newline at end of file +{{ end }} |