soft2do/moduleview-draggable

Make Module List Of Typo3 Draggable

Installs: 73

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Language:JavaScript

Type:typo3-cms-extension

2.2.0 2022-11-02 09:08 UTC

This package is not auto-updated.

Last update: 2024-02-07 15:04:09 UTC


README

1 - Install Extension

composer require soft2do/moduleview-draggable:^1.0

2 - Add "sorting" column to databse

CREATE TABLE tx_project_domain_model_name (
	sorting int(11) NOT NULL DEFAULT 0
);

3 - Update TCA

$GLOBALS['TCA']['tx_project_domain_model_name']['ctrl']['default_sortby'] ='sorting';
$GLOBALS['TCA']['tx_project_domain_model_name']['ctrl']['sortby'] ='sorting';
$GLOBALS['TCA']['tx_project_domain_model_name']['ctrl']['draggable'] =true;

3 - Update Repository (To enable Sorting on frontend)

protected $defaultOrderings = [
        'sorting' => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_ASCENDING,
];