Base Page & Holder classes for managing SiteTree items in a Gridfield instead of via SiteTree
This module tackles the issue of a cluttered SiteTree by managing pages from a gridfield. It can easily handle thousands of subpages (production-tested with 65.000 pages under one parent).
This module is meant as base classes, it can be used on its own but usually you will want to subclass in order to add filtering/sorting, etc. An example module subclassing this module is Newsgrid (filterable newsitems managed from a gridfield).
- GridFieldPages extend SiteTree so no Page functionality is lost by using DataObjects.
- Custom GridField components for quickly adding new pages.
- Hides sub pages from the sitetree (via excludechildren).
- Drag 'n drop sorting of pages (optional) (loop over $SortedChildren in templates).
These will get auto-installed when using composer:
- SilverStripe 3.0 or newer
- PHP 5.4 or newer
- silverstripe-excludechildren module to hide pages from the sitetree
- silverstripe-gridfieldsitetreebuttons to manage SiteTree items in a gridfield
Optional, for drag & drop sorting (suggested, not auto-installed by composer):
composer require micschk/silverstripe-gridfieldpages dev-master
Drag and drop sorting is supported but not active by default, as often you will want to sort by other criteria, eg. Date or some other field. To activate drag & drop sorting, add to config.yml:
GridFieldPageHolder: apply_sortable_gridfield: true
Manage newsitems from a gridfield, with embargo & expire (auto-publishing) functionality