Pagination with numbers instead of next/previous

hey guys,

I have pagination working nicely on my blog.

But I would like to have a list of page numbers instead of the standard next/previous buttons.

How would be this be possible with kirby?

My current code is

				<?php if($articles->pagination()->hasPages()): ?>
		<nav class="pagination">
  			<?php if($articles->pagination()->hasNextPage()): ?>
  				<a class="next" href="<?php echo $articles->pagination()->nextPageURL() ?>">Next Page &lsaquo; </a>
  			<?php endif ?>
  			<?php if($articles->pagination()->hasPrevPage()): ?>
  				<a class="prev" href="<?php echo $articles->pagination()->prevPageURL() ?>">Previous Page &rsaquo;</a>
  			<?php endif ?>
		</nav>
	<?php endif ?>

Thank you for any help!

If anyone else wants the same thing.

This document here has everything you need.

https://getkirby.com/docs/cheatsheet/pagination/next-page

You can try using $pagination->toArray() and then foreach page list it.
All the pagination helpers are explained here: https://getkirby.com/docs/cheatsheet#pagination

If you want to have pagination with a page range, check out this blog post.