johjoh
johjoh

Reputation: 465

Typo3: How to make sorting of extension records visible in frontend?

If records are sortable in backend, this sortation isn't implicitly respected in the frontend. What needs to be set, to get the $this->extensionRepository->findAll() method return the records in the sorted order? (where "extension" is the name of the extesion)

Upvotes: 1

Views: 1981

Answers (1)

johjoh
johjoh

Reputation: 465

Add these lines to ExtensionRepository.php (while "Extension" is your extension name):

protected $defaultOrderings = array(
    'sorting' => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_ASCENDING,
);

Upvotes: 4

Related Questions