Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello everybody,
I have been struggling for quite a long time on my problem. What I want, is kinda simple to say : If there no result in my views, I want to display all the term of my facet.
Right now, the implemented empty behavior let's you add a text or hide the facet.
Is there a way to impleted that on the current code ? Or is there someone who already done that ?
Could someone give me a hint where to begin ?
Comments
Comment #2
eugene.ilyin CreditAttribution: eugene.ilyin as a volunteer and at DrupalJedi commentedSorry, but it's not possible. If you have no results (really not have but not the limit 0 in your query), then you have no facets. Because to show facets, you need the data. Facets can be displayed only for found data.
If you mean that you want to show all facet values when user tries to search by keyword and got 0 results, then you can perform the search without keywords in the background to render facets according to these search results.
I hope this helps.
Comment #3
eugene.ilyin CreditAttribution: eugene.ilyin as a volunteer and at DrupalJedi commented