$pagination
$pagination :
Pagination accepts a pagination object generated by the Builder system to create a loopable set of objects you can include in a template.
$builder = $this->getDI()->getArticleManager()->getBuilder()
->setPage($page)
->setLimit($perPage)
->byTags($section->tags)
->paginate();
$articles = $builder->getItems();
$paginator = (new Pagination)
->setPagination($builder->getPagination())
->setLimit($perPage)
->build();
Then in your template
{% for page in paginator %}
<a href="{{ page.url }}">{{ page.label }}</a>
{% endfor %}