Question

Are the terms in a node's taxonomy array ordered hierarchically by default?

If not, what is the most efficient way to do so?

Was it helpful?

Solution

No they are not ordered hierarchically by default...

In order to do it yourself you could take a look at the following functions: taxonomy_get_parents() and taxonomy_get_children().

Here is a great article with nice examples: http://davidherron.com/content/improving-navigability-drupal-taxonomy-hierarchies

Licensed under: CC-BY-SA with attribution
Not affiliated with drupal.stackexchange
scroll top