How to order a node's taxonomy terms hierarchically?
-
16-10-2019 - |
Pergunta
Are the terms in a node's taxonomy array ordered hierarchically by default?
If not, what is the most efficient way to do so?
Solução
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
Licenciado em: CC-BY-SA com atribuição
Não afiliado a drupal.stackexchange