Vulnerability in EPiServer.Forms
Forgive me if this is documented and I missed it somehow, but I'm curious how I might be able to hide filter values on a catalog page that don't return results (products).
In the above example, how do I hide (client-side) or prevent rendering (server-side) the "Green" filter value. I can't think of how this might be possible without directly querying each filter value in the Find index to determine result count before rendering the page. That approach seems rather expensive from a performance standpoint, however.
I think you can try-
Thank you for your response - could you elaborate?
I believe the approach in the article helps with hiding/removing filters that lack any results, but I don't believe it helps solve for hiding filter values that lack any results. Or maybe I'm missing something.
I assuming that you are using the methods that are given this article so you can show or hide the filters based on the count.
@Ryan - can you post the code you use to generate the filters? Normally, there is no need to hide any empty filters, as facets are generated based on items present.