{{#isCurrentPage}} helper

(Used in pagination)

Helper for checking if a given page number is a current page. Use it in pagination links to mark the page the visitor is on, for example with an active class.

Syntax:

{{#isCurrentPage @pagination.currentPage NUMBER}}
   If current pagination page is equal to NUMBER
{{else}}
   If current pagination page is not equal to NUMBER
{{/isCurrentPage}}

Example:

{{#isCurrentPage @pagination.currentPage 5}}

Create your first website with Publii

Join thousands of creators who chose independence. Create content locally and publish lightning-fast, secure websites on your own terms.

Download Publii

Free and open source. Windows, macOS and Linux.

Read the getting started guide