Download

pagination.hbs partial

The pagination partial is responsible for rendering pagination links on your website's homepage, tag pages, and author pages:

{{> pagination}}

If you have not included a partials/pagination.hbs in your theme., then Publii will load the following default pagination.hbs file:

{{#if @pagination}}
    <ul>
        {{#if @pagination.previousPage}}
            <li>
                <a href="{{@pagination.previousPageUrl}}">PREV</a>
            </li>
        {{/if}}

        {{#each @pagination.pages}}
            <li>
                {{#isCurrentPage @pagination.currentPage this}}
                    <strong>
                        {{this}}
                    </strong>
                {{else}}
                    <a href="{{pageUrl @pagination.context this}}">
                        {{this}}
                    </a>
                {{/isCurrentPage}}
            </li>
        {{/each}}

        {{#if @pagination.nextPage}}
            <li>
                <a href="{{@pagination.nextPageUrl}}">NEXT</a>
            </li>
        {{/if}}
    </ul>

    <small>
        Page {{@pagination.currentPage}} of {{@pagination.totalPages}}
    </small>
{{/if}}

What are you waiting for?

Start building your site today.

  1. 1 Download Publii
  2. 2 Write your content
  3. 3 Publish your site
Create website