/macros/Paginate
Type: /type/macro
description: Paginate Macro
macro: value: $def with (path="", limit=50, use_repr=False)

$ page = safeint(query_param("page", "0"))
$ pages = list_pages(path, limit=limit, offset=page * limit)

<div class="copyright-footer">
$if page != 0:
    &larr; <a href="$:changequery(page=page - 1)" rel="nofollow">$_.prev</a>

$if len(pages) == limit:
    ... <a href="$:changequery(page=page + 1)" rel="nofollow">$_.next</a> &rarr;
<div>