mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
1,013 B
1,013 B
title | description | categories | keywords | menu | weight | aliases | toc | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Pages Methods | Pages is the core page collection in Hugo and has many useful methods. |
|
|
|
21 |
|
true |
Also see List templates for an overview of sort methods.
.Next PAGE
.Next
and .Prev
on Pages
work similar to the methods with the same names on .Page
, but are more flexible (and slightly slower) as they can be used on any page collection.
.Next
points up to the next page relative to the page sent in as the argument. Example: {{ with .Site.RegularPages.Next . }}{{ .RelPermalink }}{{ end }}
. Calling .Next
with the first page in the collection returns nil
.
.Prev PAGE
.Prev
points down to the previous page relative to the page sent in as the argument. Example: {{ with .Site.RegularPages.Prev . }}{{ .RelPermalink }}{{ end }}
. Calling .Prev
with the last page in the collection returns nil
.