I have a need to determine if a term is a 3rd level term (but not a 2nd level term). In D6 there is not currently a way to do this. In D7 the only way would be to use the "Taxonomy: term has parent(s)" options and specify all the parents (instead of a single grandparent) which - for large vocabularies, can be time consuming.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | add_term_has_grandparent_access-1344168-1-D7.patch | 5.02 KB | jenlampton |
| #1 | add_term_has_grandparent_access-1344168-1-D6.patch | 5.07 KB | jenlampton |
Comments
Comment #1
jenlamptonThis is a simplified check against grandparents - it does not return true for great-grandparents, great-great-grandparents, etc.
Comment #2
merlinofchaos commentedWouldn't it be better to use the "Term: has parent" and allow specifying a generation? i.e, 1 == parent, 2 == grandparent, 3 == greatgrandparent
It's all fundamentally the same, we just tweak a number and default it to '1'.
Comment #2.0
merlinofchaos commentedexplain more clearly, why D7 version won't work.
Comment #3
japerryDrupal 7 is no longer supported, closing.