When I use this module as exposed filter in a views I would like to hide terms that not have associated nodes.
How can I do this? Is it possible to do?
Thanks a lot!!!

Comments

Nikolino created an issue. See original summary.

stBorchert’s picture

Status: Active » Needs review

Hi.
I thought, we had a similar support request and I had given some example on how to do so. But I couldn't find it anymore so here is a quick answer.

You need to implement hook_shs_term_get_children_alter() (see shs.api.php) loop through the given terms and remove all terms without children from the list.

Unfortunately the structure of $terms isn't really simple; please have a look at shs_term_get_children() in shs.module on how this array is built.

hope to help,

 Stefan

Nikolino’s picture

Thanks stBorchert for your answer.
After your reply I also found this post.
https://www.drupal.org/node/1926252
But unfortunately I'm not able to implement it. I'm not very good with the code.
Are you able to help me?

stBorchert’s picture

Status: Needs review » Closed (works as designed)