Adds the missing sorting mode to Contao: custom sort without the need for a parent table.
composer require oneup/contao-backend-sortable-list-views
# config/routes.yaml
OneupContaoBackendSortableListViewsBundle:
resource: "@OneupContaoBackendSortableListViewsBundle/config/routes.yaml"
# contao/dca/tl_my_custom_table.php
// Add sorting flag
$GLOBALS['TL_DCA']['tl_my_custom_table']['list']['sorting']['sortableListView'] = true;
// Add database field
$GLOBALS['TL_DCA']['tl_my_custom_table']['fields']['sorting']['sql'] = 'int(10) unsigned NOT NULL default 0';
Run a Contao migration / database update and enjoy happy drag&drop sorting!
composer install
php composer cs-fixer
php composer phpstan
php composer phpunit
npm install
npm run build