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 global filter with hiearchical select.
My taxonomy has 2 levels, i.e parent and child.
Nodes can be categorized with parent and child or just child, i.e not forced to choose from deepest level.
The problem is that when I select to filter on the deepest level, i.e a child value, I still see nodes which have only been categorized with the child's parent value.
For example:
I have 2 categories; A (parent) and A.a (child).
When I select to filter on A.a, I still see items that are only A.
Shouldn't I just see items that are A.a?
Thanks for your any ideas you may have!
Comments
Comment #1
ost87 CreditAttribution: ost87 commentedthink solved by the changing setting to "save only the deepest term"
Comment #2
RdeBoerThought that might be the case. Great it's working for you.
Comment #3
RdeBoerThought that might be the case. Great it's working for you.
Comment #4
RdeBoerComment #5
ost87 CreditAttribution: ost87 commentedHi RdeBoer,
Sorry, just noticed my issue isn't quite resolved.
I have the setting save whole term lineage set.
Example:
There is parent category A and child category A1.
If I filter on category A1, nodes that only belong to A are still visible.
Shouldn't it be that if I have selected to filter on A1, nodes that just belong to A shouldn't be visible. Right?
Thanks.
Comment #6
RdeBoer@0st87, #5:
But for what you're after shouldn't you set "save child only" or "save leaf only" or whatever it's called (sorry not a dev env. to check).
Rik
Comment #7
ost87 CreditAttribution: ost87 commentedThanks for your response.
If I set save child only, there is no way I can filter on the parent.
I would like to be able to filter on both the parent and the child.
Comment #8
RdeBoer@ost87:
Is what you want in #7 even possible with Hierarchical Select by itself in a local context, without Views Global Filter?
Rik
Comment #9
ost87 CreditAttribution: ost87 commentedSorry RdeBoer, don't understand what you mean.
But I take it you're saying that what I want is not possible?
Comment #10
RdeBoer@ost87, #9
What I mean is that if you use Hierarchical Select on a single View as an Exposed Filter, does that work?
If not, then what you want is probably not possible with Views Global Filter either.
Rik
Comment #11
ost87 CreditAttribution: ost87 commentedYes, I'm currently using HS on a single view in a block.
Not sure if I have explained the issue clearly enough, so I'll make another try just in case.
What I want is the following:
I have taxonomy, where "USA" is the parent and "New York" is the child.
I want to allow users to be able to tag a node with just "USA" or "New York". If they select "New York", the whole term lineage is saved, so that the node has both "USA" and "New York" saved.
If I in HS choose to filter on "USA", all items that have "USA" and "New York" should appear.
If I instead choose to filter "New York", items that have only been tagged with "USA" should not appear.
---------------------------------------------
This is what is currently happening.
1)If have the setting save term lineage.
When I choose to filter on "New York", items that are only tagged with "USA" are still visible. I want to filter them out in this case.
2)If I have the setting force users to select the lowest level (child).
When I choose "USA", items that are tagged with "New York" don't appear. I want them to appear in this case.
Hopefully this makes it clearer if I wasn't clear enough earlier.
Thanks
Comment #12
RdeBoerToo hard and too much a special case. Does not warrant the effort. Sorry.
Patches welcome.
Rik