Skip to content

Instantly share code, notes, and snippets.

View ardentsword's full-sized avatar

Tim ardentsword

  • The Netherlands
View GitHub Profile
@ardentsword
ardentsword / pagination.html.twig
Last active March 12, 2019 16:11 — forked from SimonSimCity/pagination.html.twig
A gist for pagination in Twig, based on the total number of pages, the current page and some URL-settings. Modified to work with bootstrap 4.
{#
Source: (removed because website is dead, is spam)
Updated by: ArdentSword
Modified to work with symfony/bootstrap and have default values for some of the arguments
Tested with Symfony 3.2/3.3/3.4 and Bootstrap 4 alpha/beta/release
Parameters:
* currentPage (int) : the current page you are in
* lastPage (int) : represents the total number of existing pages