user3163515
user3163515

Reputation: 39

October CMS backend view pagination

I'm building a website that contains several thousand records. My backend listview of the items is terribly slow. I can't find out how to apply pagination in this view. There is documentation that states

$users = Db::table('tablename')->paginate(15);

I just don't know how to implement this code and where to do so.

Upvotes: 2

Views: 944

Answers (1)

Harmen Janssen
Harmen Janssen

Reputation: 71

In your list configuration, specify recordsPerPage. The default is 0, but any other number will activate pagination:

So in config_list.yaml, use: recordsPerPage: 20

See also: https://octobercms.com/docs/backend/lists

Upvotes: 5

Related Questions