Feature #56213
closedSorting Filelists by FAL attributes and provide sorting direction option
100%
Description
When creating a "File Links" CE and adding a file collection, there is the possibility to sort the files by File Extension, File Name, Size, etc., but sorting by FAL fileobject properties is not possible.
Use Case: To have files in a directory, giving them a speaking title, setting via TS to have the file-title rendered instead of the file-name, and hence wanting to have the list sorted by the title.
With the introduction of FAL attributes like "Title, Description, ...", and the possibility to set the sorting by TS to any arbitrary string/field, it would be useful to have the possibility to sort by specific FAL attributes.
I found out that sorting is possible by any property a file object exposes, but it seems the FAL properties are not attached to the fileobject itself, hence sorting by these (non-existent) properties is of course not possible.
I know this is a big one, but encountered several situations where this would make sense.
Updated by Mathias Schreiber almost 10 years ago
- Target version changed from 6.2.0 to 7.2 (Frontend)
Updated by Gregor Favre over 9 years ago
Update: The sorting on FAL properties is well implemented in FilesContentObject - however it is not documented how one can sort by FAL attributes correctly, and if there is no possibility in the backend (like the existing dropdown), the feature will hardly be ever used.
For documentation purposes:
Sorting filelink lists by FAL properties this way will not work:
tt_content.uploads.20.sorting.field = title
tt_content.uploads.20.sorting.direction = desc
Instead, sorting filelink lists by FAL properties is made with the following TS:
tt_content.uploads.20.sorting >
tt_content.uploads.20.sorting = title
tt_content.uploads.20.sorting.direction = desc
Purging the sorting-Config is needed, since by default stdWrap is used because of the default presence of the sorting.field key. As long as this key is present, sorting on FAL properties will not work, since in the context of stdWrap, the FAL properties are not present (only tt_content properties are present). Instead, the sorting of FAL properties has to be stated directly in the sorting key.
That's quite not obvious to understand for new users, therefore I'd suggest for 7.x implementing for filelinks a GUI dropdown in the backend, so the user can chose on which FAL property he wants to sort - also if ascending or descending.
Regarding me, the issue can be closed, or converted to a feature request.
Updated by Markus Klein over 9 years ago
- Status changed from New to Accepted
- Sprint Focus set to Remote Sprint
Updated by Markus Klein over 9 years ago
- Tracker changed from Feature to Bug
- Subject changed from Sorting Filelists by FAL attributes to Sorting Filelists by FAL attributes and provide sorting direction option
- TYPO3 Version set to 6.2
- Is Regression set to No
Updated by Benni Mack over 9 years ago
- Target version changed from 7.2 (Frontend) to 7.4 (Backend)
Updated by Susanne Moog over 9 years ago
- Target version changed from 7.4 (Backend) to 7.5
Updated by Markus Klein over 7 years ago
- Target version set to Candidate for Major Version
- Sprint Focus changed from Remote Sprint to On Location Sprint
Updated by Anja Leichsenring about 7 years ago
- Sprint Focus deleted (
On Location Sprint)
Updated by Marti McFlight about 7 years ago
Since fluid_styled_content is used, the typoscript for upload list sorting by FAL title has to be:
tt_content.uploads {
dataProcessing {
10 {
sorting >
sorting = title
sorting.direction = desc
}
}
}
But i think, this should better be an option to configure in the backend…
Updated by Gerrit Code Review over 5 years ago
- Status changed from Accepted to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/59897
Updated by Gerrit Code Review over 5 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/59897
Updated by Anonymous over 5 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset fcf92aca2006bf2ae59102123a4337ac87e76656.