This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{# | |
# count => total item | |
# limit => item by page | |
# offset => start item idex | |
# page => current page | |
# lastpage => last page = page number | |
# adjacents => page count display before and after the current page | |
#} | |
{% if limit is not defined %} | |
{% set limit = 10 %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//function to return the pagination string | |
function getPaginationString($page = 1, $totalitems, $limit = 15, $adjacents = 1, $targetpage = "/", $pagestring = "?page=") | |
{ | |
//defaults | |
if(!$adjacents) $adjacents = 1; | |
if(!$limit) $limit = 15; | |
if(!$page) $page = 1; | |
if(!$targetpage) $targetpage = "/"; | |
//other vars |