2

I've searched around, and there are responses to whether a Drupal term can have multiple parents in different vocabularies, but I'm wondering if I can do it for those within the same vocabulary?

Like this:

Vocabulary Name

Parent Term 1
  - Fruit
  - Protein
  - Candy
Parent Term 2
  - Dairy
  - Protein
  - Vegetables
Dan D.
  • 73,243
  • 15
  • 104
  • 123
user1154488
  • 157
  • 4
  • 12

2 Answers2

4

I believe that the existing answers/comments were correct at one time, but are now out of date. For both Drupal 7 and Drupal 8, this is currently possible in core. If you edit the term and expand the "Relations" section, you can select multiple parents from the multi-select input.

So for example, using the original question's taxonomy, you could edit the "Protein" term, expand the Relations section, and select both "Parent Term 1" and "Parent Term 2".

A side-note: Once you've given terms multiple parents in this way, Drupal disables the drag-and-drop mechanism for assigning hierarchy. (Since it no longer makes sense, given that the same term appears multiple times in the list.)

Brock Fanning
  • 129
  • 1
  • 6
0

Drupal core does not support that kind of functionality so there are two way to do it.

Programmaticly. That means that you will have to hack Drupal`s core in order to do it. Here is an instruction: http://greenash.net.au/thoughts/2005/02/cross-vocabulary-taxonomy-hierarchies/
Using modules. This will only give you parent relation like relationships between terms but it is much easier to set up. Modules like Term Relations or References or Vocabulary reference should do the job

Povylas
  • 776
  • 4
  • 16
  • 31
  • There is support for vocabularies with multiple parents in core, this is just not exposed through the user interface. It should not be necessary to hack core to provide this functionality, but could be done in a custom module, or using contrib modules. – pfrenssen Jun 03 '13 at 09:49
  • @pfrenssen: It would be more useful if you gave some more detailed information on this and how it might be done with a custom module (at least a point in the right direction). Without that information your comment is not useful. – rooby Apr 09 '14 at 06:18