What is the functional benefit of hierarchical taxonomy?

Events happening in the community are now at Drupal community events on www.drupal.org.
Rdagast's picture

I'm fairly new to Drupal and am trying to formulate an approach to using taxonomy on a site I'm working on. I don't think I fully understand the use of hierarchical taxonomy and am looking for some insight.

I understand that by using hierarchies the terms appear in a nested "outline" style list, which helps the user select terms for node content. But what is the overall benefit of this structure? Is it purely visual?

For example, in a list of terms for movie genres I have the term "War". Nested below that are "WWII", "Vietnam", "Somalia", etc. to show specific wars a movie could be about. If I apply the term "Somalia" to a content node (for the movie "Black Hawk Down" in this case), in doing so I understand that "Somalia" is related to "War" because the list implies this through its nested structure. But once the node is saved, it bears only the genre "Somalia", which by itself is not recognizable as a film genre.

Furthermore, if someone then accesses the URL associated with the term "War", the movie "Black Hawk Down" does not appear, but it does appear under the URL for "Somalia". It seems against expectations that a node associated with a child term would not be associated with the parent term by default. The solution seems to be to manually select "War" whenever selecting any of its child terms, though it seems that this should be done automatically if "Somalia" is subordinate to "War".

Also, when looking at this content in a view, I can't find a way to sort the terms in the same hierarchical structure -- it's alphabetical at best -- so child terms are separated from their parents and seen out of the context of that relationship, often rendering them useless.

One workaround to both of these issues is to modify my terms so that "Somalia" becomes "War - Somalia", so that all War sub-genres are grouped together when sorted alphabetically. But this defeats the purpose of a nested, hierarchical list.

As someone fairly new to Drupal, I'm assuming that I am just not aware of the overall benefit to hierarchies or of how to solve the problems I cite above, though at the same time I don't know if that's true (maybe there is no satisfying answer?).

Thanks for reading and for any feedback!

Comments

Use with Pathauto & Taxonomy Menu?

jshock's picture

I'm not certain, but I think you need to use it in conjunction with modules like Pathauto and Taxonomy Menu. These will create paths based on menu paths and taxonomy terms. I think cron will add the paths to search. (I haven't tested this assumption)

Decide your taxonomy structure and make use of Views

Joyy's picture

Heirarchial Select module is useful especially when you want your site users to save the Node/Content using Taxonomy parent/child/subchild structure.
I believe it has options to allow either only the deepest term in the structure or any term in any of the parent/child level.

You have to structure your taxonomy properly, and then make use of Views to display them.

As per above description it seems your taxonomy structure is,
- Movie genre
-- WWII
--- War
-- Vietnam
--- War
-- Somalia
--- War
It looks bit complicated if I understand this correctly. Maybe you can try and simplify it.

When saving a Node with Term it will save only that particular term (you can see the insights of a node using Devel module). It will save the Node with that Term ID (TID).

But default Taxonomy module built into Drupal knows the place of the term in its structure.

When clicking any term it will take you to Drupal's default term page (views page). You can override this default views page for particular vocabularies (like Movie Genre in your case). There are many ways to do this viz. Views / Panels+Views / Context+Views. See example here how to automate creating of Term pages for particular Vocabulary with Panels+Views here, http://drupaleasy.com/blogs/ultimike/2010/10/taxonomy-term-pages-steroid...

When you are trying to achieve the desired results in Views you can achieve this by many ways, one of them could be using Exposed Filters [Taxonomy: Term ID (with depth) ], and thus giving option to your users to select the Term in your Movie genre vocabulary and filter into the desired results.
But if you want your users to reach to the desired results via Path / Breadcrumb, you can do this with Taxonomy Menu, which auto-updates your Menu system with any changes in your Taxonomy structure, maintaining the look of your structure through Menu, Sub-Menu. In this case you have to make sure that your Taxonomy structure, Term pages, and its Views are defined properly using Arguments [Taxonomy: Term ID] / Relationships [e.g. Organic Group Node post], as required. You can use Sort Criteria in Views to sort by 'Node: Post date' or something else you need. IF you are new to Views, you can learn basics from here, http://blip.tv/ladrupal/views-2-howto-drupal-6-2193931

Regards.

Taxonomy

Group organizers

Group notifications

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