Hello,
I believe this must be a duplicate request but have not been able to find a solution yet.
The condition is:
Have a taxonomy list that is made up of 5 parents, each have 7 children. When the nodes are created the users select the more detailed information (i.e. the child's value). Please see the attached image from the node edit screen.
Within views, have created an exposed filter that only shows the parents. Please see the attached image from the exposed filter block.
Desired result is when a user selects any of the (5) parent options within the exposed filter it inherits all the selected nodes that are assigned the child's values.
Thank you for any and all help.
Regards,
Hg
Comment | File | Size | Author |
---|---|---|---|
2011-10-22 02.09.28 am.png | 15.7 KB | HyperGlide | |
2011-10-22 02.10.50 am.png | 48.67 KB | HyperGlide |
Comments
Comment #1
HyperGlide CreditAttribution: HyperGlide commentedSolved.
Steps:
FILTER CRITERIA
and click add.Content: Has taxonomy terms (with depth)
. Description in views should read something likeVocabulary
for the term you want to filter for.Selection type
for how the user should interact with this filter.Depth
this is where you tell views how many children to included. The current description in views reads.Add
Expose this filter to visitors, to allow them to change it
.Apply
andsave
and done.Please note that you can limit your available choices to the user if you select
Dropdown
instead ofAutocomplete
in the setting screen.Good luck and ping me if need any help!
Comment #2
advan20092 CreditAttribution: advan20092 commentedHow did you configure exposed filter to show only parents?
Comment #3
HyperGlide CreditAttribution: HyperGlide commented@advan20092 which step are you stuck on from #1?
Comment #4
advan20092 CreditAttribution: advan20092 commentedHyperGlide, I think I sorted my issue, thank you very much
Comment #5
HyperGlide CreditAttribution: HyperGlide commentednp. and good luck.
Comment #6
Yazzbe CreditAttribution: Yazzbe commented@ hyperglide, can you please describe how you created the exposed filter with parents only ?
Comment #7
HyperGlide CreditAttribution: HyperGlide commented@yazzy008 -- same question -- which step are you stuck on from #1?
Comment #8
Yazzbe CreditAttribution: Yazzbe commented@hyperglide, #1 is no problem. I have setup a vocabulary country > city and created an exposed filter so that you can select a country or city (one select box, I believe the same setup as you 5 parents & childs). The result will be a list of all related nodes to that specific country/city. But I need 2 select boxes/exposed filters: 1 for all countries (all parents) and 1 for all cities (related childs).
Comment #9
Irwin Nerwin CreditAttribution: Irwin Nerwin commentedWanted to do the same thing; searched; found this; tried it; it worked! It's not always that easy, but sometimes. Yay, Drupal pholks!
Simply: thanks!
Comment #10
Gauravk CreditAttribution: Gauravk commentedThis was good explanation of what i was looking since few days. Can't figure out how and where to display the child selection field?
I have car listing site, where Parent is Make and Child is Model. In search field i want user to select Make and then Model field should auto filter and show child available under that Make.
I stick Make field as explained above Has taxonomy terms (with depth) works perfect
I stick Model field as explained above Has taxonomy terms (with depth) works perfect
But how to interlink them to filter based on previous selection (parent)
Comment #11
hellobank CreditAttribution: hellobank commentedExcellent!
Comment #12
pdeo CreditAttribution: pdeo commentedHello, I am new to Drupal and need some help. I need NLY PARENT terms to appear on the exposed filter (I have taxonomy defined as City>Locations within City). However, I have a search index on the content type and the view is based on the search index. Now, when I search on taxonomy while adding filter (Step 3) , I am unable to find (Taxonomy Terms with depth). I guess I am missing something basic here, can someone pls guide?
Comment #13
Pascal.s CreditAttribution: Pascal.s as a volunteer commentedJust want to share my solution... Maybe this can help some people here.
I use Simple hierarchical select. I created my Taxonomy terms, parents with there children. Then, i made a field (from that taxonomy term) in a content type. And then, This field become available in Filter Criteria as Content: Has taxonomy terms.
The result i get:
Image of hierarchical select
The children select menu appears after you select a parent item.
Comment #14
docans CreditAttribution: docans commentedI went through the steps above but it does not filter my taxonomies. I still see every child of every parent despite the fact that i set the depth to 1. Any advice.
Thanks
Comment #15
docans CreditAttribution: docans commentedComment #16
docans CreditAttribution: docans commentedComment #17
zietbukuel CreditAttribution: zietbukuel commentedI have the same issue as @docans all the child items are displayed no matter what depth I select.
Comment #18
Savannna CreditAttribution: Savannna commentedI have been looking for this. Works perfectly.
Comment #19
nigelwhitePascal.s #13. Thank you so much for pointing this out. It took me ages of trying all sorts, and failing, before your comment gave the solution I was looking for.
For any noob, like myself, if you want a Pascal.s result, start with a view of Content, not of Terms
Comment #20
renatogThank you @pascal.s
Your solution in #13 really helps a lot. Make sense.
Thank you very much.
Comment #21
renatogComment #23
Hejar CreditAttribution: Hejar commentedwhen you expose filter, choose "limit list to selected items" then only select the parent terms.