7

Is there a way to have a hierarchy of terms by reusing the same terms that reside in different vocabularies? There seem to be so many different options for dealing with taxonomies in Drupal 7 that it feels very daunting to figure out...

For example, let's say I want to make a directory of athletes for different sports. I've created 3 vocabularies, each with several terms:

Vocabulary: Sports
* Soccer
* Basketball
* Baseball

Vocabulary: Divisions
* Division 1
* Division 2

Vocabulary: Teams
* Team 1
* Team 2

Each type of sport will be divided into Divisions and then into different teams per Division.

The hierarchy looks like:

Soccer
* Division 1
--Team 1
--Team 2
*Division 2
--Team 1
--Team 2

Basketball
*Division 1
--Team 1
--Team 2
*Division 2
--Team 1
... and so on for each sport.

Since the terms for vocabularies Divisions and Teams are always the same, I'm thinking it would make more sense to be able to reuse the same terms under those two vocabularies instead of creating the same terms over and over again for each sport, each division...etc.?

Is that even possible and if so, what would be the best way to go about implementing it?

2
  • your vocabulary structure is correct. I am not getting what you are trying to achieve.
    – Cool
    Commented Dec 6, 2013 at 12:10
  • I was just confused about how to define or at least just display a hierarchical relationship between different vocabularies. So for example, at the top of the hierarchy there would be the Sports vocabulary and below that, the Divisions and then Teams.
    – user24216
    Commented Dec 8, 2013 at 9:19

3 Answers 3

2

You can make a term reference field on a vocabulary. So on a the team vocab one of the fields would be "division". So when you create a new team you would enter the team name and "tag" the division it is in using auto complete or a dropdown.

1

The only problem with free-tagging it (by that I don't mean allowing all users to tag the content), which is really the only solution except to create everything in one vocabulary, is that when users search or click on tags for the generic labels like "Division 1", it will not be focused enough in the outcome to be useful.

Since these items have a hierarchy, I think the only solution is to fully duplicate that hierarchy to make results relevant. Someone clicking a linked tag "Division 1" is going to get results for all sports, even when the page in question that is displaying the tags is only about 1 sport. And it won't sort your results based on the previous page unless you set some variable.

I see how the shortcut saves some time but in the long run it completely separates things and in search results only the first result with all terms will be relelvant, the rest will be listings of everything else. Just a thought.

Unless you're going to have separate term reference fields, I'd think it would be a better user experience to simply have the hierarchy in one vocab where pulling the dropdown down would make clear and concise sense.

I guess a good question would be: will you ever have a reason to pull a listing of all Division 1 teams across different sports?

Another question would be: are there so many teams and divisions that one dropdown is simply too long to be user friendly?

-1

It is also possible to assign multiple parents to a term. The easiest way to do this that I have found is with the Taxonomy Manager module.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.