Sortierrichtung als Auswahlelement im "panelLayout"
Per DCA kann eine Sortierung inkl. Sortierrichtung mit dem Parameter "flag" vorgegeben werden https://docs.contao.org/books/api/dca/reference.html#fields
es gibt aber im Backend keine Möglichkeit, mit einfachen Mitteln die Sortierrichtung umzudrehen ("Workaround" http://www.e-spin.de/dcaconfig-editor.html - siehe "Sortierung Auf-/Absteigend umstellen")
Mein Vorschlag wäre ein neuer Knoten in dem DCA z.B.
...
sortingdir => true,
...
welches bei "true" ein Selectfeld oder zwei Radiobuttons ausgibt, mit denen die Sortierrichtung umgestellt werden kann - ggf. auch per Icon mit Pfeil hoch/runter und Toggle-Funktion
A more simple solution would be to add two options for each field in the sorting dropdown, one for ASC and one for DESC
may be, we can add a array as flag value like
...
flag => array(5,6),
...
with the result of two entries
- my sorting attribute (asc)
- my sorting attribute (desc)
nice idea, that would mean we can add options to sort a date by month or by day etc.
flag => 5,
has one entry
- sort my date
and
flag => array(5,6),
has two entries (with the same name and different "sort-appendix")
- sort my date (asc)
- sort my date (desc)
the first num is the default direction - so we can use
flag => array(6,5),
with
- sort my date (desc)
- sort my date (asc)
See https://github.com/contao/contao/pull/5425