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.

Comments

jenlampton’s picture

Status: Active » Needs review
StatusFileSize
new5.07 KB
new5.02 KB

This is a simplified check against grandparents - it does not return true for great-grandparents, great-great-grandparents, etc.

merlinofchaos’s picture

Status: Needs review » Needs work

Wouldn'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'.

merlinofchaos’s picture

Issue summary: View changes

explain more clearly, why D7 version won't work.

japerry’s picture

Issue summary: View changes
Status: Needs work » Closed (outdated)

Drupal 7 is no longer supported, closing.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.