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.
Hi, I'm using shs in an exposed filter for the typical use of cars > models...
the problem is when a term exist but has not published nodes. For example: I have only a node under BMW > X6 and this node is unpublished. So I want that bmw and x6 don't appare in the exposed filter select list because their result is empty...
Can someone help me?
Thanks
Comments
Comment #1
Andrew Jamieson CreditAttribution: Andrew Jamieson commented+1
Comment #2
ledom CreditAttribution: ledom commentedSame request for ubercart stock level, show only taxonomy where there are some products available.
Comment #3
stBorchertYou will need to reduce the list of possible options using
hook_shs_term_get_children_alter()
. In an implementation of this hook within a custom module you can reduce the list of terms checking if there are any published nodes associated to the term.Comment #4
stBorchert