I wanted to list all terms in a term hierarchy that's x steps away from a specific term - but I found no way of doing so - I therefor ported the term_node handler that enables me to specify a depth to the term_data table.
A patch is attached.
| Comment | File | Size | Author |
|---|---|---|---|
| taxonomy_argument_with_depth.patch | 4.5 KB | voxpelli |
Comments
Comment #1
anrikun commented@voxpelli: I have just posted a issue with an attached module that I think is related to the same issue as this.
#1073170: Taxonomy: Term ID (with depth) : filter on term_node, not on node
Actually, I think your patch is better written as it seems to use API joins instead of subqueries like mine.
Maybe we could work together to create a complete patch: "real" Taxonomy Term ID with depth argument and filter?
Comment #2
kenorb commentedMarked as duplicate: #1093680: Filter terms by depth inside of "Taxonomy view"
See as well: #769136: Taxonomy depth as field patch #70 could be useful.
Comment #3
kenorb commentedThis patch provides only the argument.
I'm not sure how to test it.
Comment #4
Anonymous (not verified) commented(cross posted: #1073170: Taxonomy: Term ID (with depth) : filter on term_node, not on node)
The behavior of "Taxonomy Term ID (with depth)" still exists in Views 3, but it is now called something different. Instead look for, "Content: Has Taxonomy Term ID (With Depth)". It's in the content not taxonomy section of contextual filters.
In my use case, in order to select nodes with the child of a given term argument, I had to do the following:
1. Create a term relationship (named it term).
2. Added the term ID with depth filter.
3. Views automatically also created a contextual filter for Term using the relationship created earlier. I deleted this.
Comment #5
mustanggb commented