Skip to main content
al marks
Jr. Web Developer at Vette Marketing
Asked a question 11 months ago

How exactly would one go about adding next and previous buttons to the pagination built into SG. I cant find a detailed write up on the pagination system in the docs. Also, how do you handle when you have to many pages in the pagination, how do you hide some of the page numbers like in the included photo

Where am I?

In Siteglide Community Forum you can ask and answer questions and share your experience with others!

Hi @al marks27 

Just to check, did you read this documentation -> ?

As the pagination is in a forloop, you can check the index in liquid using {{forloop.index}} and then see what page you are on, if over X amount then stop showing the pagination numbers and output ... Then after that, have a space at the end for the last page number.


The forloops and available tags should contain everything you already need to achieve the above.  Let us know how you get on!