Project

General

Profile

Actions

Feature #56213

closed

Sorting Filelists by FAL attributes and provide sorting direction option

Added by Gregor Favre over 10 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
File Abstraction Layer (FAL)
Start date:
2014-02-22
Due date:
% Done:

100%

Estimated time:
PHP Version:
5.4
Tags:
Complexity:
medium
Sprint Focus:

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.


Related issues 4 (0 open4 closed)

Related to TYPO3 Core - Bug #59297: sorting.direction in Content Object FILES has no stdWrapClosed2014-06-02

Actions
Has duplicate TYPO3 Core - Bug #63509: filelinks is missing sort by dateClosed2014-12-02

Actions
Has duplicate TYPO3 Core - Task #59296: Filelinks Content Element: Implement sorting direction, use FAL fieldsClosed2014-06-02

Actions
Has duplicate TYPO3 Core - Feature #65403: Filelinks : Allow sort directionClosed2015-02-27

Actions
Actions #1

Updated by Gregor Favre over 10 years ago

  • Target version set to 6.2.0

Better targeted at 6.2.x

Actions #2

Updated by Mathias Schreiber almost 10 years ago

  • Target version changed from 6.2.0 to 7.2 (Frontend)
Actions #3

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.

Actions #4

Updated by Markus Klein over 9 years ago

  • Status changed from New to Accepted
  • Sprint Focus set to Remote Sprint
Actions #5

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
Actions #6

Updated by Benni Mack over 9 years ago

  • Target version changed from 7.2 (Frontend) to 7.4 (Backend)
Actions #7

Updated by Susanne Moog over 9 years ago

  • Target version changed from 7.4 (Backend) to 7.5
Actions #8

Updated by Benni Mack about 9 years ago

  • Target version deleted (7.5)
Actions #9

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
Actions #10

Updated by Anja Leichsenring about 7 years ago

  • Sprint Focus deleted (On Location Sprint)
Actions #11

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…

Actions #12

Updated by Susanne Moog over 5 years ago

  • Tracker changed from Bug to Feature
Actions #13

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

Actions #14

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

Actions #15

Updated by Anonymous over 5 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #16

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF