Term Reference Hierarchy

Categories

Component ID

1202856

Component name

Term Reference Hierarchy

Component type

module

Maintenance status

Development status

Component security advisory coverage

not-covered

Component created

Component changed

Component body

Since there's no obvious way of saving term hierarchy when creating a node, this module was created.
The user creates 2 term reference fields, referencing the same taxonomy vocabulary.
Then, using this module you can set which field is the "parent" term and which one is the "child" term field. When saving the node, taxonomy terms are created and their hierarchy is saved.

Instructions on how to use:
a UI is not yet available but it's very easy to customize.

line 8 of term_reference_hierarchy.module
replace 'content' with your content type machine name.

line 9 of term_reference_hierarchy.module
replace field_tag_lvl_1 with the machine name of the field you want to declare as you "parent" term.

line 10 of term_reference_hierarchy.module
replace field_tag_lvl_2 with the machine name of the field you want to declare as you "child" term.

Module developed by http://yawd.eu