Vocabulary Relationships / Hierarchy and Usability

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
Coupon Code Swap's picture

I've been trying to wrap my head around this for a while and I'm running into a roadblock in terms of providing good usability to community members vs. correct information architecture. As an example, let's say I'm running a website about plants, and visitors can add articles about different plants. This is just a crude example to help understand the problem. When a visitor goes to create a new article, they can categorize it as follows:

Plant Part
- Color
-- Produce

For Plant Part, the options are "Fruit" and "Flower". For Color, "Red" and "White". And for Produce "Rosa glauca" and "Red Delicious".

The problem is, both fruits and flowers can have red varieties. So, if I wanted to represent this taxonomy hierarchy in a single vocabulary, I would have to add the term "Red" under both "Fruit" and "Flower". This is not ideal because it duplicates the term and it doesn't allow visitors to view the category for all red plants (regardless of whether they are looking for a fruit or flower).

If I separate "Plant Part", "Color" and "Produce" into separate vocabularies then the information architecture will be better (no duplicated terms and better categorization). However, from a usability standpoint this is not acceptable because the user will be presented with options that shouldn't be available. For example, if the user chooses "Fruit" for plant part, they should not see the options for flowers. And, if a user chooses "Red" for color, they should not see any options for blue fruits.

I am aware of the hierarchical select module but it does not solve this issue. It only makes it easier to select terms within a single vocabulary.

My question is if there is any way to relate terms across vocabularies so that they are conditional. This would be ideal. If a user chooses "Fruit" from the plant part vocabulary, then only related terms in the "Color" vocabulary would then be displayed for the next option. Is this at all possible?

Comments

This is something I've

Aleet's picture

This is something I've struggled with myself and I hope more experienced people chime in.

This is how I would do it:

Plant Type
-Fruit
-Flower
Colors
-Red
-White
-other colors
Produce Type
-Rosa glauca
-Red Delicious

This is how I did it for this site I just built: http://tribalrugs.net

See the menu in the left sidebar. That's exactly how my terms are all under one vocab.

But admin is the only person who does the categorizing on this site. NOt sure how it would work if general users were picking their own categories.

Try hierarchical_select:

Summit's picture

Try hierarchical_select: www.drupal.org/project/hierarchical_select.
I am looking for a solution for 3 seperated vocabularies, but HS is great for one!
Greetings, Martijn

Taxonomy

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: