Hi,
I am coming from http://drupal.org/node/271833 on D6. I couldn't find a depth filter working on D5, D6. My hopes are that D7 will have this!
My use case is I think very general. And because of the changes in D7 that terms are almost the same as nodes, I think the request has more urgenty.
I would like to be able to filter my view with contextual filter on term depth.
I have terms in one vocabulary with the following depth:
Continent (depth = 0)
--Country (depth = 1)
----Area (depth = 2)
-------Village (depth = 3)
----------Accommodation (depth = 4)
I would very much like to use panels/views to arrange my content pages.
I would like to show the panels pages as different variants.
Variant Continent
Variant Country
Variant Area
Variant Village
Variant Accommodation
In these variants I would like to show views depending on the term-depth.
So on Area for instance I want to show only the terms that have the depth of 2.
Can anyone help me how to get this working in D7 with ctools. panels and views please?
Thanks a lot in advance for your reply!
Greetings, Martijn
Comments
Comment #1
summit commentedMay be this can help and be used in D7? http://drupal.org/node/1073170#comment-4144638
greetings, Martijn
Comment #2
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.
The vocabulary can be controlled by specifying validation on the argument as well as in the relationship field.
Comment #3
tahiticlic commentedI've the same needs of filtering Terms (view type : Taxonomy Term) so that I can retain only depth 1 terms.
I can't see how to use the solution given, since it seems to be applied to a Nodes view and not a Terms view.
Any solution to this problem? I thought it was possible in previous version of Views.
Comment #4
mefisto75 commentedSame here.
Want to output parent term along with subterms on a term view
Comment #5
tahiticlic commentedWell, I've used a custom modules in my case. I think this is a regression from older version of Views, except if it is on purpose, but why in this case?
Comment #6
justindodge commented+1
I also had to go with a code based solution to solve this, would love to see this feature again.
Comment #7
chrbak commented+1, This functionality would be very useful for me too.
Comment #8
FreeFox commentedCount me in too ^^
Comment #9
mustanggb commentedComment #10
markdcFor those of you still following this issue or others coming here looking for an answer, the Taxonomy Term Depth module provides a term depth filter for Views. There's a stable release for D7 and 8. Just tested it, and it works great with my multi-depth taxonomy.