Cross vocabulary hierarchy
Hi all,
Is there a way to make vocabularies hierarchically dependent, so that their terms would inherit this hierarchy?
Example:
voc 1: Countries
voc 2: Cities
voc 3: TheatersNow for tagging an event we first select Country, then City, then Theater.
I found no solution for this on D5, now I'm on D6.
Any ideas (patches are welcome too)?
And, of course, having this working together with http://drupal.org/project/hierarchical_select would be great.
p.s. Thing which is not an option - placing terms in one vocab.

Try Hierarchical_Select
Hi!
Yes, this is possible with Drupal no matter 5 or 6.
Here's how i did it. I created a voc regions and linked this voc with the right content types (hope you know how to do this). Then, inside the voc, add any term, assuming the first level is your Country, the second your city and the third your theater (you can add as many sub terms as you want).
An example would be:
Vocabulary: Regions
<em>Inside regions</em>Usa
Chicago
16th Street Theater
Actors Gymnasium
New-York
13th Street Repertory Theater
Alice Tully Hall
France
Paris
Théâtre des Champs-Élysées
Opéra Comique
Comédie Française
Marseille
Creuset des arts
L'Intermédiaire
The default behaviour of taxonomy doesn't make it possible to select a Theater after you selected the City and the Country. Here's where hierarchical select helps. Download and install the module. Only Hierarchical Select and Hierarchical Select Taxonomy are available to use inside the module. And they are enough to help.
Once you've installed them all, update the voc we created upper (regions), and select Use the Hierarchical Select form element for this vocabulary. Below there are many options you can use, depending on how you want hierarchical_select to function.
Wish I helped.
;) Then you title must be: Cross term hierarchy.
Cheers!
Life worth it to live. No matter what you're going through. Only your weakness can overcome your strenght.
http://www.bamena.com/
http://www.actumaroc.info/
Thanks, wilmar81 for
Thanks, wilmar81 for reply!
Yes, I understand your approach and considered this too.
Unfort. this is not an option for me, as I mentioned in P.S., for reasons.
One disadvantage of this is that countries, cities and theaters - are of different "types". If we want later, for example, to create a database of theaters, binding every theater-tag to a node ( http://drupal.org/project/taxonomy_node ) we will get a problem, since we have no theaters voc. , instead we have our tree. And I see no simple way, for example, to determine of which type an arbitrary term is? (By level?)
Another problem - having theaters in Cities, makes Cities having only theaters in them - not companies, stadiums, whatsoever. Or, having cities right into Countries, we can't create anything else inside them. Otherwise things of different types will mess up.
Hack it.
OnkelTem, your problem has a variety of solutions. They're not easy ones though...
First of all, countries and cities are not different things. They are toponyms (place names), and they can be represented as parent-child relationships (city is contained in country / country contains city) as dictated by administrative and bureaucratic entities like sovereign nation states and the law. All "things" in this vocabulary have a latitude and longitude. You could stretch this vocabulary to include theaters and other venues because these all also have latitude and longitude, but this is where you lose detail about what kind of things these are.
In Drupal 6, there's no good way to add more detail to taxonomy vocabularies except through hierarchy and relationships. While a vocabulary like "Geonames" will tell you that New York City is a city and the Trocadero is a cultural "spot." It's not easy to capture this information in Drupal until Drupal 7.
I don't know the full architecture of your site, but I think you could get somewhere by making theaters and venues into nodes of the same type. Use your vocabulary to classify these nodes for their city and country. Then when you create events, you will need a node reference field and a custom widget (or any of the contrib widgets that work for Node Reference field) that lets you link to a theater but also lets you narrow the selection on the node form using the toponym vocabulary. Likewise, the CCK node reference field formatter could be extended to display the city and country of the venue when the event node is displayed.
There may be other solutions people can propose, too.
I'm sorry it's not a simple answer! However, your instincts are mostly right to avoid merging your places with your venues. I think it's safe to merge country and city.