Gravatar for andrew.harbert@nttdata.com

Question by adharbert, Nov 4, 2014 9:58 PM

Setting up paging to use only previous and next buttons

I am trying to create a paging control that only has the previous and next button, I do not want to display the page numbers in-between them. Could someone provide me a little help for this?

1 Reply
Gravatar for lbergeron@coveo.com

Answer by Luc Bergeron, Nov 5, 2014 8:43 AM

Hi,

I assume you are using the JavaScript Search Framework. There might be a better way, but you can achieve it by adding this CSS snippet to your page.

.CoveoPager ul li {
    display: none;
}

.CoveoPager ul li.coveo-next,
.CoveoPager ul li.coveo-previous {
    display: inline-block;
}

It hides the page numbers but makes the previous and next buttons visible. The previous and next button will still be hidden when on the first or last page respectively.

Is it what you are looking for?

Gravatar for andrew.harbert@nttdata.com

Comment by adharbert, Nov 5, 2014 12:35 PM

That worked, thanks!

Ask a question