Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Increasing pagination in Silverstripe admin

I'm using Silverstripe 3.1. The site will have hundreds of users and lots of files / assets.

How can I increase the number of items listed to (from 15 to 50 or so per page) in the admin for both users and files.

Even better if I can just set it by default for all areas of the admin.

like image 307
Legin76 Avatar asked Mar 14 '23 10:03

Legin76


1 Answers

You can do it manually by overloading getCMSFields() and using method $field->setItemsPerPage(50) on grid paginator field.

The other option is to use yaml file. You need create config.yml and put it in _config directory then put in your yaml file:

GridFieldPaginator:
    itemsPerPage: 50

Check also these links:

  • https://docs.silverstripe.org/en/3.1/developer_guides/forms/field_types/gridfield
  • https://docs.silverstripe.org/en/3.2/developer_guides/configuration/configuration/
like image 195
Robert Avatar answered Mar 29 '23 00:03

Robert