[FEATURE] Allow sorting by file metadata "Title" in CE FileLinks 97/59897/3
authorSusanne Moog <susanne.moog@typo3.com>
Thu, 7 Mar 2019 14:13:16 +0000 (15:13 +0100)
committerGeorg Ringer <georg.ringer@gmail.com>
Thu, 7 Mar 2019 17:14:25 +0000 (18:14 +0100)
FAL allows sorting by all metadata properties, the content element
file links had no interface for that until now. The possibility to sort
by the meta data "title" has been introduced. As "title" is provided by
the core, we can be sure that the field exists.

All other fields should be implemented by the integrators by extending

Resolves: #56213
Releases: master
Change-Id: I7eb6fb314d52e5bfff96fb5e32d210266edb57e9
Reviewed-on: https://review.typo3.org/c/59897
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Benni Mack <benni@typo3.org>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Benni Mack <benni@typo3.org>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
typo3/sysext/core/Documentation/Changelog/master/Feature-56213-AllowSortingFilelistByFileMetadataTitle.rst [new file with mode: 0644]

diff --git a/typo3/sysext/core/Documentation/Changelog/master/Feature-56213-AllowSortingFilelistByFileMetadataTitle.rst b/typo3/sysext/core/Documentation/Changelog/master/Feature-56213-AllowSortingFilelistByFileMetadataTitle.rst
new file mode 100644 (file)
index 0000000..b2343aa
--- /dev/null
@@ -0,0 +1,31 @@
+.. include:: ../../Includes.txt
+Feature: #56213 - Allow sorting file list by file meta data "title"
+See :issue:`56213`
+The possibility to sort files by their meta data title in the "File Links" content element has been introduced.
+The title attribute is part of the base metadata table and therefor available in all TYPO3 installations.
+If you need further FAL fields to sort by, extend the TCA of tt_content field `filelink_sorting` and add
+metadata fields as options to choose from.
+For example add the following in :file:`TCA/Overrides/tt_content.php`::
+   $GLOBALS['TCA']['tt_content']['columns']['filelink_sorting']['config']['items'][] = ['Sort by alternative Text', 'alternative'];
+Or use Page TSConfig `TCEFORM.tt_content.filelink_sorting.addItems.alternative = sort by "Alternative" metadata field`.
+The filelinks content element has a new option for sorting "by file metadata title" which can be chosen in
+the drop down when creating the element.
+.. index:: Frontend, ext:frontend
index f743bb1..65890c0 100644 (file)
@@ -1011,7 +1011,8 @@ return [
                     ['LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:filelink_sorting.type', 'type'],
                     ['LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:filelink_sorting.size', 'size'],
                     ['LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:filelink_sorting.creation_date', 'creation_date'],
-                    ['LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:filelink_sorting.modification_date', 'modification_date']
+                    ['LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:filelink_sorting.modification_date', 'modification_date'],
+                    ['LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:filelink_sorting.title', 'title'],
index f98a9f0..04e7519 100644 (file)
                        <trans-unit id="filelink_sorting.modification_date">
                                        <source>by file modification date</source>
+                       <trans-unit id="filelink_sorting.title">
+                                       <source>by file metadata title</source>
+                       </trans-unit>
                        <trans-unit id="filelink_sorting_direction">
                                <source>Sorting direction</source>