- 🇪🇸Spain aleix
Excuse the necrobump, not exactly what is looking for, but I want to be disabled if no query has been made, so it could be based on this to disable if no results.
So just for future references setting a flag like:
function yourtheme_preprocess_search_api_sorts_sort(&$variables) { $variables["searching"] = !empty(\Drupal::request()->query->all()); }
make it possible to wrap sorts links in template search-api-sorts-sort.html.twig
{% if searching %} <button ...> {% endif %}