benjaminkott / benjaminkott/bootstrap_package

add filelink sorting direction field to gallery content element

Open
#1,482 0 comments 0 reactions 0 assignees View on GitHub
feature
Dominant language
PHP
Stars
355
Forks
212
Avg merge
1h 4m
Merged PRs (30d)
31

Description

# 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
}
}
}
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the gallery content-element configuration and its FilesProcessor sorting setup described in the issue. Compare it with the uploads field's existing sorting-direction field. Done means editors can select a sorting direction per gallery without changing the global default.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.