Can we use this to answer the question "HAS term got a child?"

Created on 24 May 2023, over 1 year ago

Problem/Motivation

I have spent a significant portion of my life hunting in vain for a way to answer the question "Has the current term got any children".

The reason I want to do that is that when I have a hierarchical taxonomy tree, I often want to find out whether a term is a true LEAF element of the tree.

It's pretty straight forward to ask questions about lineage (i.e. the parents) but I've never been able to the dame with children and I wondered if this developing module might be a route to have tow more simple attributes added:

  1. 'has_parent' - this is of course already answered by your module if depth > 0
  2. 'has_child' - the holy grail in that I am searching for!

What do you think?

I would then of course (as is always the way with us site builders) want to use that as a Views Contextual filter.

Thanks

💬 Support request
Status

Active

Version

2.6

Component

Miscellaneous

Created by

🇬🇧United Kingdom SirClickALot Somerset

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024