Active
Project:
Taxonomy Lineage
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
22 Jan 2010 at 06:38 UTC
Updated:
29 Jul 2011 at 02:33 UTC
I have a term view where I only want to show terms with depth 0. Is this possible with this module? Thanks.
Comments
Comment #1
joel_guesclin commentedI would also like an answer to this. I have discovered (obvious I suppose) that if you have a node type view, then only terms with nodes attached are displayed. However, you can choose a filter "Taxonomy: TermId (with depth)".
If you have a Term-type view, on the other hand, this filter is not available - which seems strange on the face of it.
Consequently whereas you could do this using a Node view (but of course only if there are nodes attached to the top terms which you don't necessarily want - this is my case), you can't with a Term view.
Comment #2
MBroberg commentedIt seems to me that "Taxonomy: TermId (with depth)" allows a filter to select terms that are not actually attached to the node but are higher or lower in the tree. What I want is to actually show only terms with a specific depth, in my case depth of 2.
For example I have county, city, and park attached but only want to show the park name, yet be able to sort by the city or county.
If I had only attached the park name I should be able to use "Taxonomy: TermId (with depth)" to also show city and county, but that is not what I want, and I do need the other terms attached for other reasons.
Seems like this module gets close but not quite there yet.
Comment #3
xjmI'll look into this.
Comment #4
joel_guesclin commentedRereading my post I'm not sure if it is clear. To take MBroberg's example and apply it to my use case, I would have Parks as nodes, county and city as taxonomy terms. This means that there are never any Parks (or indeed any other nodes) attached to County. So if, for example, I want to show a list of counties, this won't work in a Node View because they have no nodes attached.
Comment #5
mxtSubscribing, I'm interested in too.
Comment #6
joel_guesclin commentedI managed to get this working in a very roundabout way using Semantic Views module to attribute classes to the different levels of the output, and then using CSS "display:none" to stop the class associated with the duplicated output from appearing. I don't know if this helps.
Comment #7
zship commentedIt looks like the functionality's there, but the Views hook defined in lineage.views.inc doesn't define that filter. Should be easy enough to implement, so someone do it.
...Just kidding. I changed a few lines and verified that it's working for me. The new code is the 'filter' element under $tables['term_lineage']['depth']['filter'].
Comment #8
xjm#7: Wanna roll that into a patch?
Comment #9
zship commentedI'm on a bit of a tight deadline for the project that required this change, and I'm afraid I don't have experience creating patches. Looked into the documentation on how to do it, and once I have time to install git or learn the old way, I'll add a patch here.
Comment #10
gotcha41 commentedsubscribing