Sorting multiple fields
Hello @all, in my opinion it's not possible sorting tt_address items following multiple fields - for example sorting at first by name, than by first_name or sorting first by city, than by address or something else.
Is there any possibility via typoscript - I can't find anything in the documentation.
tt_address: 4.0.1
Currently not possible
Thanks for your reply @georgringer - than I would appreciate if you could make a note of this as a feature request.
three years late, but here's a "solution":
change line 68 in master / line 60 in tag 5.3 in /Classes/Domain/Repository/AddressRepository.php:
replace
$query->setOrderings([$sortBy => $order]);
with:
$sortByFields = explode(",",$sortBy);
$orderings = [];
foreach($sortByFields as $field){
$orderings[$field] = $order;
}
$query->setOrderings($orderings);
then you can set the fields comma separated in typoscript:
plugin.tx_ttaddress.settings.sortBy = country,city
...of course you have to clone the repository if you want to be able the migrate later.