Search by

normann / gridfieldpaginatorwithshowall

normann

A GridField paginator with a show all checkbox

Package info

github.com/normann/gridfieldpaginatorwithshowall

Type:silverstripe-module

pkg:composer/normann/gridfieldpaginatorwithshowall

Statistics

Installs: 6 458

Dependents: 0

Suggesters: 1

Stars: 8

Open Issues: 1

dev-master 2026-09-13 08:07 UTC

This package is auto-updated.

Last update: 2026-09-13 08:31:13 UTC


README

Latest Stable Version Total Downloads License

An extension of SilverStripe's GridFieldPaginator that adds a "Show all" checkbox to the bottom of a GridField, letting CMS users toggle between the normal paginated view and a single page containing every record in the list.

SilverStripe compatibility: this branch targets SilverStripe 3.1+ only. Support for SilverStripe 4, 5 and 6 is planned — see Roadmap below.

Requirements

Installation

Install via Composer:

composer require normann/gridfieldpaginatorwithshowall

Then run a dev/build?flush=1 so SilverStripe picks up the module's templates, CSS and JavaScript.

Usage

Swap out the standard GridFieldPaginator for GridFieldPaginatorWithShowAll on any GridField config, for example inside getCMSFields():

$gridField = $fields->dataFieldByName('MyRelation');
$config = $gridField->getConfig();

$config
    ->removeComponentsByType('GridFieldPaginator')
    ->addComponent(new GridFieldPaginatorWithShowAll());

Once added, a "Show all" checkbox appears alongside the normal pagination controls. Ticking it lists every record in the GridField on one page; unticking it returns to the regular paginated view.

Note: if the class name above doesn't match what's in code/forms/ in your checkout, please open an issue (or a PR!) so the docs can be corrected — see Contributing.

Configuration

Like the core paginator, the number of items shown per page can still be set via setItemsPerPage():

$paginator = new GridFieldPaginatorWithShowAll(20);

Translations live under lang/ — feel free to add or improve one for your locale and send a pull request.

Roadmap

This module was written for SilverStripe 3 back in 2013 and hasn't been updated for the namespaced (SilverStripe 4+) release line. Planned work:

  • Add .github/workflows CI (GitHub Actions) to replace the old Travis CI / Scrutinizer setup
  • Namespace the code and add a SilverStripe 4 compatible branch/tag
  • Verify/update for SilverStripe 5
  • Verify/update for SilverStripe 6
  • Add automated tests covering the "show all" toggle behaviour
  • Add a screenshot to this README

Contributions and testing on newer SilverStripe versions are very welcome.

Contributing

Bug reports and pull requests are welcome on GitHub. Please see CONTRIBUTING.md for guidelines before opening a PR.

License

Released under the BSD-3-Clause license.

Maintainers