1

I am struggling to find the solution for the following situation: I am building a tourism site with POIs as nodes (Drupal 7). The POIs are categorized/tagged in a State-County-City hierarchical vocabulary. I want to add two another cathegories - Historical region and Tourism region. Each City belongs to exactly one historical region and one tourism region and these regions do not cover the same area (meaning that e.g. two cities belong to the same county, but to different historical and tourism regions). While creating new node/POI the user/editor selects the State-County-City via Simple Hierarchical Select module (this structure is generally well-known) and I want to automatically assign the corresponding Historical and Tourism region to the node, based on the City selected (as the division into Historical and Tourism regions is not obvious for the general userbase, but I have the corresponding database available).

How to generate the relationship between the terms for Cities in the State-County-City vocabulary with the corresponding Historical and Tourism regions, while maintaining the possibility to list all nodes/POIs in a State/County/City/Historical region/Tourism region?

I have thought about having two additional vocabularies but failed to find a way to connect them with the City terms in the first. I also thought about having multiple parent terms in one vocabulary for the Cities - but this messes up the vocabulary (and Simple Hierarchical Select) completely and is therefore inapplicable. Any help appreciated.

1 Answer 1

1

It's quite simple:

  1. State-County-City hierarchy you have figured out
  2. Create separate taxonomy for regions
  3. Go to /admin/structure/taxonomy/*/fields and add a taxonomy field to terms in first tree. That way you will be able to assign cities, counties and states to regions

Later, you will have to switch to Views for display, as regular taxonomy pages will not be enough to display nodes by historical region - but that's for another question.

2
  • Thanks for the quick response and simple solution. Apart from switching to Views to display nodes by historical region, this solution will require a different approach to display the new taxonomy field in nodes. I believe this approach may be used. Jun 25, 2015 at 18:18
  • @tempusaviator seems legit. Fell free to ask follow up questions if problems arise.
    – Mołot
    Jun 25, 2015 at 18:44

Your Answer

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

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