No doubt, these two approaches aren’t suitable for letting users pick items – one after the other – from a large result set in order to find the ones that best cover what they are after. This is where pagination becomes attractive to visitors as it creates clearness and transparency regarding the pile in front of them.
Let’s get started.
We’re not going to reinvent the wheel but build on a known-to-be-reliable, Bootstrap-compatible third-party solution for the pagination part, react-js-pagination. We’ll combine the Pagination
component in this package, a search, and a nicely styled results list into a widget for editors to use wherever they want to provide pagination for browsing search results.
Note that ”search results” doesn’t necessarily refer to the outcome of a visitor’s site search. In Scrivito-based apps, the SDK’s built-in search is often used internally for collecting navigation items, creating tag lists, and similar tasks. In this guide, we’ll show you how to find all pages of a specific type and use pagination to render a subset of them.