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.

CommentFileSizeAuthor
taxonomy_argument_with_depth.patch4.5 KBvoxpelli

Comments

anrikun’s picture

@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?

kenorb’s picture

Marked as duplicate: #1093680: Filter terms by depth inside of "Taxonomy view"
See as well: #769136: Taxonomy depth as field patch #70 could be useful.

kenorb’s picture

This patch provides only the argument.
I'm not sure how to test it.

Anonymous’s picture

(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.

mustanggb’s picture

Issue summary: View changes
Status: Needs review » Closed (won't fix)