I have a taxonomy vocabulary with 'Countries' as parents and 'Cities' as children. I want to expose the terms with two views exposed filters,one for the parents and one for the children.But both filters show all parents and children terms. How can I accomplish that,to show only parents term to one filter and children terms to the other filter? Thanks in advance
Use Hierarchical Select module and you can show the related child term whenever you select the parent. (For example if you select the country UAE, then it shows the UAE cities like dubai, abu-dhabi,..). See the below screenshot for how it works.
If i select the community "Downtown Burj Dubai", it automatically loads the another list of child terms for Downtown Burj Dubai.
You can also try Simple hierarchical select. Unlike Hierarchical select this module provides a simple widget for taxonomy terms only. As an addition Simple hierachical select works as Views exposed filter.
http://drupal.org/sandbox/ser_house/1832320 is not done but i am using it on my site and works fine even with other exposed filters.
Only problem not really related to this module is that my vocabulary is 5000+ terms and its Drupal taxnonomy core issue on how to handle large amount of terms.
Here Depth means-The depth will match nodes tagged with terms in the hierarchy. For example, if you have the term "COUNTRIES" and a child term "CITIES", with a depth of 1 (or higher) then filtering for the term "COUNTRIES" will get nodes that are tagged with "CITIES" as well as "COUNTRIES". If negative, the reverse is true; searching for "CITIES" will also pick up nodes tagged with "COUNTRIES" if depth is -1 (or lower).
this can be of help if u don't mark any node with the COUNTRIES tag,but mark all nodes with the some children tags of COUNTRIES.
The Views module has a taxonomy_term View which can be used. You need to edit the View so that under the Arguments -> Taxonomy: Term ID (with depth) -> change the depth depending on your requirement. If you want to exclude the parent item, you can do this by adding a filter to exclude the parent term.
I found a link as well that might help: Display terms only if associated with a node