Drupal 7, taxonomy exposed filter
I am working with drupal 7. How do I limit a taxonomy dropdown exposed filter to only display the terms used by nodes in view results?
I understand that the list is populated before the v开发者_C百科iews takes place, but this means that i am often left with tags that display nothing ( since they are hidden with my view) any help would be much appreciated
In views:
Filter Criteria
Add - Content: Has taxonomy terms
Settings: Select the Vocabulary name.
Checkbox Expose this filter to visitors.
If you are using single filter select that, where you can see the list of Taxonomy terms. If you have child terms select hierarchy
check box and specify the depth of it. only appears when you Add - Content: Has taxonomy terms (with Depth) -- refer to second step above.
Now select the terms you want to display, and make sure to checkbox Limit list to selected items
You can also add (Global: text area) under No result behavior in Advanced if you still want to show all taxonomy terms but want to show some thing to user like coming soon
instead of leaving the selected taxonomy term showing empty page.
精彩评论