benjaminkott / bootstrap_package

Bootstrap Package delivers a full configured theme for TYPO3, based on the Bootstrap CSS Framework.
https://www.bootstrap-package.com/
MIT License
338 stars 205 forks source link

add filelink sorting direction field to gallery content element #1482

Open medarob opened 6 months ago

medarob commented 6 months ago

Feature Request

In the gallery content element you already have a field for various sorting options (filename, filesize, last modification date, etc). An editor asked if it would be possible to sort the image in an descending (filename) order?

There is no sorting direction field in this element.

You can add sorting.direction = descending to the fileprocessor but then every gallery is sorted in that direction.

It would be better to have a dedicated field, where you can change the sorting direction, like you have in the uploads field with sorting.direction.field = filelink_sorting_direction

Would it be possible to add that same field to the gallery content element?

tt_content.gallery {

    ################
    ### TEMPLATE ###
    ################
    templateName = Gallery

    ##########################
    ### DATA PREPROCESSING ###
    ##########################
    dataProcessing {
        10 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor
        10 {
            references.fieldName = image
            folders.field = file_folder
            sorting.field = filelink_sorting
            sorting.direction = descending
           # sorting.direction.field = filelink_sorting_direction
        }
    }
}