Need advice on creating a taxonomy structure

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

Hey peoples,

I need some advice on creating a taxonomy structure for addresses. Specifically for a Spanish address block.

I need to have the structure:

Province
|----------Town/City

However I need to display this as select lists, and there are 45 Provinces. Upon selecting a Province, the Town/City select list will change to contain values specific to that Province.

The only way I can think of doing this is creating:
- a 'Province' vocabulary containing a list of provinces as terms
- 45 'Province - [provinceName]' vocabularies each containing a list of cities
- using conditional fields to hide all town/city fields, showing only each individual field as needed

However, this seems to be a bit cumbersome and I'm worried about the amount of dependencies being used. Any thoughts/tips?

Keith

Comments

45 'Province -

joachim's picture
  • 45 'Province - [provinceName]' vocabularies each containing a list of cities

Use a single 'Cities' vocabulary, and use a reference from each city to the province it belongs to. You can then use https://drupal.org/project/reference_option_limit to take care of limiting the options in the UI.

Thanks joachim. Is this

kaipee_s2s's picture

Thanks joachim.

Is this suggesting I add a new field of type 'term-reference' to the 'cities' vocabulary?

Yes. You add a field on the

joachim's picture

Yes.

You add a field on the Cities vocab, so each city term knows which region it is in.

Your module looks like what I

kaipee_s2s's picture

Your module looks like what I need, but I don't quite get the instructions on how to configure/use it.

Did you read the docs such as

joachim's picture

Did you read the docs such as the README? If that is not clear enough or lacks detail, please file bugs!

Hierarchical Select

markconroy's picture

Have you tried using Hierarchical Select?

https://drupal.org/project/hierarchical_select‎

Addressfield

alanburke's picture

https://drupal.org/project/addressfield
Not sure it has all the logic you require, but worth a look.

Ireland

Group notifications

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