Pagination, load more, and infinite scroll Free & Pro

Set how many documents show per page, choose page numbers, load more or infinite scroll, give a library a fixed height, and see how paging interacts with search.

Updated August 23, 2026

FileDeck splits long libraries into pages, and can present the split as page numbers, a load-more button, or infinite scroll — choose under Documents → Settings → Display. All three work in every layout and re-paginate automatically when visitors search or filter.

Setting how many documents show per page

Set the site-wide default with Documents per page under Documents → Settings → Display, and override it per library with the per_page attribute in the shortcode or the equivalent per-page control in the Document Library block:

[filedeck per_page="20"]

With 87 documents and per_page="20", visitors get five pages. The right number depends on the layout: tables handle 20–50 rows comfortably, while grids usually look best with a per-page count that fills complete rows of cards, such as 12.

Page numbers, load more, or infinite scroll?

FileDeck offers three pagination styles, chosen with the Pagination setting under Documents → Settings → Display, or per library with pagination_mode on the shortcode:

  • Page numbers — numbered page links. Visitors can jump straight to any page, which suits reference libraries where someone may want "the older stuff."
  • Load more button — a button that appends the next page below the current documents. This keeps everything on one continuously growing list and feels natural in grid layouts and on mobile.
  • Infinite scroll — the next documents load on their own as the visitor reaches the end of the list.

Infinite scroll does not remove the Load more button; it keeps it on the page, because a list that only grows when you scroll is unreachable for someone navigating by keyboard or with a screen reader. It also stops loading automatically after five pages and waits for a click, so scrolling cannot pull a whole large library into one page.

All three use the same per-page value; they only differ in how the next page is presented. You can also let visitors pick their own page size: turn on the "documents per page" dropdown under Documents → Settings → Features and a dropdown appears above each library.

Giving the library a fixed height

By default a library grows as long as its documents need. Set Library height under Documents → Settings → Display — or height="600px" on the shortcode — to fix it at a CSS length (px, rem, em, vh or %) and scroll the documents inside it instead. The search box, filters and pagination stay put; only the documents scroll.

[filedeck height="600px" pagination_mode="infinite"]

That pairing is the common one: a library that occupies a predictable slot on the page and fills itself as the visitor scrolls within it.

How paging interacts with search and filters

When a visitor types in the search box or picks a category or tag filter, the library re-paginates the matching results using the same per-page size. So a search that narrows 300 documents down to 34 matches shows those matches paged from page one, and clearing the search restores the original paging. Nothing is hidden by pagination — matches on "page 12" are found just the same. See instant search, sorting, and filters.

Large libraries page themselves sensibly

Up to about 500 documents, the library ships an inlined index and paging, searching and filtering all run in the browser with zero extra requests. Past that threshold FileDeck switches the library to server mode automatically: page one still renders server-side, and searching, filtering, sorting and paging fetch just the rows they need from the server instead. Search-as-you-type keeps working either way — it simply queries the server rather than an in-page index. Your per_page setting works the same way regardless of library size. See large libraries and performance.

FAQ

What is a good per_page value?

For tables, 20–50 rows. For grids, pick a multiple of your cards-per-row so pages end on complete rows — 12 is a common choice.

Does searching reset the page the visitor is on?

Results re-paginate from the first page of matches, which is what visitors expect — the most relevant view of the narrowed list starts at the top.

Do pagination and load more work in the folder layout?

Paging applies to FileDeck libraries in all layouts, though in the folder layout visitors mostly navigate by opening folders, so page size matters less there.

Still stuck? Email support@getfiledeck.com.