{# Source: http://dev.dbl-a.com/symfony-2-0/symfony2-and-twig-pagination/ Updated by: Simon Schick Parameters: * currentFilters (array) : associative array that contains the current route-arguments * currentPage (int) : the current page you are in * paginationPath (string) : the route name to use for links * showAlwaysFirstAndLast (bool) : Always show first and last link (just disabled) * lastPage (int) : represents the total number of existing pages #} {% spaceless %} {% if lastPage > 1 %} {# the number of first and last pages to be displayed #} {% set extremePagesLimit = 3 %} {# the number of pages that are displayed around the active page #} {% set nearbyPagesLimit = 2 %} {% endif %} {% endspaceless %}