简体   繁体   中英

TYPO3 sorting is not max value

I have a TYPO3 extension with over 2000 records that should be manuelly sorted. So I added the column "sorted" and set "sortby" => "sorted" in the TCA.

The newest record should have highest sort value.

Problem #1: Backend automatically sorts the records ASCENDING. So every time someone wants edit a record they have to manually switch to the last page of the extension list.

How can I correct the view in the backend? I can't set ASC or DESC in the TCA sortby value because then the queries won't work anymore.

  1. When I add a new record, the sorting value is the lowest one. So on a page with 2000 records sorted descending the new one never shows up? It's on the last position! How can I set the query so that new records have the highest sorting value?

The first problem is not that urgent but the second one - about new records - is really bad cause you can't work with the extension any more at all!

In TYPO3 it is important which button you use to insert a new record.

There are multiple Buttons. one at the headline and on sorted tables one at each record.

The usage of the button decides where the new record gets inserted in the line of existing records. The buttons at each record reads 'insert new record after this' and the top button means: 'insert at the top of the list'.

So your editors should first jump to the end of the table and then insert new records there. Otherwise you need to reposition the new record.

That can be done with the up and down buttons. That becomes nasty with many records.

But you also can reposition a record (or multiple records:) with the clipboard. sore the record in the clipboard and move it to the new position.

By using the multi-selection mode clipboard you can resort multiple records at once: insert the record one by one in the desired order to the clipboard and move them to the desired place. In this way you can record all records with just a few clicks:

Eg

  • select a multi-select mode clipboard,
  • sort the records by name (clicking on the name column),
  • mark all records with the checkbox in the header,
  • insert all records in the clipboard (they are inserted in the current order),
  • (select Move Elements for the clipboard)
  • insert the records where you want them (at the top).

all records are inserted in the new order.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM