I'm looking to get the depth a category's subcategories.
Suppose I have a category 'grandparent' which has a subcategory 'parent' which in turn has a subcategory 'child'. How do I get to integer 2?
I suppose I could check if 'grandparent' has subcategories and if it does, check if they have subcategories, etc, until I hit 0. But that seems like a lot of unnecessary processing.
Isn't there a more elegant way?