Closed (won't fix)
Project:
Views (for Drupal 7)
Version:
6.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
19 Jun 2009 at 20:26 UTC
Updated:
17 Jul 2010 at 18:12 UTC
Jump to comment: Most recent file
Comments
Comment #1
summit commentedHi,
I tried another approach to get the filter working through php, using the arguments php possibilities. But it doesn't work.
I may be doing something wrong. Please anyone know how to get a filter using arguments (so a dynamic filter)?
See attached picture for what I tried.
Greetings,
Martijn
Comment #2
summit commentedset to version 3.
Comment #3
summit commentedtrying php-code underneath, but not succesfull yet.
Greetings, Martijn
Comment #4
summit commentedTrying code with depth = '2' to filter to get only the terms with the depth of 2, but still not working :(, see:
Comment #5
adam_b commentedsubscribing...
Comment #6
HedgeMage commentedThis is a duplicate of http://drupal.org/node/271833 which has since been fixed.
Comment #7
summit commentedHi,
This is NOT a duplicate of http://drupal.org/node/271833 . I have that issue working. This is another feature request to not have to choose specific terms, but ONLY filter on taxonomy depth.
So please do not handle this as duplicate before reading everything.
Feature request:
Would it be possible to filter ONLY on taxonomy depth. After choosing vocabulary NOT having to choose terms. Just filter on the results which have a certain hierarchy (depth) in the vocabulary?
So using for this filter 2, will give me any nodes which have the depth of 2 (diagonal through this vocabularies).
Thanks a lot in advance for answering this feature request. It would be great if it could be done by phpcode within filtering on taxonomy terms, while than flexibility is awesome.
Greetings,
Martijn
Comment #8
merlinofchaos commentedThe way the data is structured in the database, this isn't really possible. Depth isn't stored as a number; you have to climb the tree to figure the depth out. It's vaguely possible that a customized filter could be written to support it, but I'm not going to write it, and I'm not particularly interested in including it with Views because I find it likely that such a filter would be riddled with problems.
Comment #9
summit commentedHi Earl, Thanks for your update! And depth only within one vocabulary, so choose a vocabulary and then get only the terms with a certain depth?
Greetings, Martijn
Comment #10
merlinofchaos commentedUnfortunately, the database doesn't intrinsicly know what the depth is. In order to determine the depth, it has to link in the term_hierarchy table repeatedly and test to see if there's data there. This creates ugly, hard to manage queries and I don't know if they'd really work in all situations. I've *just* added a taxonomy term relationship in CVS. It may be possible using that and the taxonomy: parent relationship to write a view that can check for items that have a certain depth by chaining parents to the right number and making sure that there is a result on the 2nd parent and not on the 3rd.
Comment #11
summit commentedHi Earl,
that sounds interesting..will try the term-relationship when I am home next week again.
Greetings, Martijn
Comment #12
MBroberg commentedhttp://drupal.org/node/769136
Is this what you are looking for?
Comment #13
summit commentedHi,
Yes I think so! Subscribed to that issue :) Thanks for telling me!
greetings, Martijn