Usage: {{pagination}}
{{pagination}}
is a template driven helper which outputs HTML for ’newer posts’ and ‘older posts’ links if they are available and also says which page you are on.
You can override the HTML output by the pagination helper by placing a file called pagination.hbs
inside of content/themes/your-theme/partials
. Details of the default template are below.
The data used to output the {{pagination}}
helper is generated based on the post list that is being output (index, tag posts, author posts etc) and always exists at the top level of the data structure.
pagination.hbs
in the partials directory of your theme.
{{page_url}}
- accepts prev
, next
and $number
to link to a particular page{{page}}
- outputs the current page number{{pages}}
- outputs the total number of pages