Answered

How to add paging with a dynamic results per page?

How do I add paging for a module that displays all items in a content list and has a "results per page" field for the user to customize?

I did not see an example of this in either the Agility Starter Site in Gatsby or the Agility CMS Site in Gatsby on Github (but maybe I missed something) so I started following this guide: https://www.gatsbyjs.org/docs/adding-pagination/

However, it has me setting the results-per-page to a static number in gatsby-node.js and I do not know how to make that dynamic on a per-module-instance basis.

1

Comments

1 comment

Please sign in to leave a comment.

Didn't find what you were looking for?

New post