I have a complex taxonomy hierarchy for product categories.
Every main taxonomy term has at least one child term. Some of those child terms have child terms. So in some places the taxonomy tree is one level deep and in other places it is two levels deep.
I need to create two separate Drupal templates for the taxonomy terms depending on the level.
I have already created a custom template for the top level using a view.
I am trying to figure out how to dynamically render the taxonomy term using a custom template depending on whether it is in level 1 down or level 2 down.
I am guessing I will need to use a template pre-processing function?
Is that the best way to approach this?