I've been trying Categories, Taxonomy and other modules trying to get this specific feature. If you know what I need, please tell me.
I want to organize my content by location.
So a Node can be categorized as
"North America->USA->Michigan->Detroit"
The way drupal does this is... put everything in a drop down list and you choose the most exact category. But what I want it to do is have 4 drop down boxes and a text input field.
So first the user selects "North America" then the second drop down box is populated with all the countries in "North America". the second selection box is populated with "Canada, Mexico, USA, etc."
The user choses USA and the 3rd box is populated with all the states in USA.
Then the 4th box is loaded with cities and the user choses the city.
in addition I would like the user to add a city to that state if it is missing from the list (Free Tagging). Since there are thousands of cities around the world I don't have the time to type them all in as children.
As of what I have seen in the modules section, Either you get all thousand cities organized in a hierarchical tree in one pull down box, or you get a fill in the blank for use in Free Tagging.
But the first case doesn't allow users to add cities to the tree, and the second case there is no longer any hierarchical organization. Is there any way to categorize nodes based on a 4 step selection as i described above?
-----------------Other Ideas I had but don't know if it is possible--------------
have multiple vocabularies - First is a predefined "Country" vocabulary, second is "State" vocabulary and third is a "Free Tagging" city vocabulary. Then I would link the vocabularies USA Vocabulary has many children --- Michigan, ohio, new york, etc. and then "Michigan" has a 1 child vocabulary - "Michigan_Cities"
---------------------------------------------------------------------------------------------
Comments
Some Ideas...
Instead of trying to cram thousands of terms into your taxonomy, have you considered the Location Module? It's not a shrink wrapped solution, exactly, but more of a tool that would help you roll your own. You could use taxonomy for very broad categorization (ie, down the the country level). Then your actual nodes could be a custom content type with a "Location Field" in which the user inputs the postal code.
I see two problems with such an approach. First, the user has to know the the postal code. Second, the Location Module currently only has codes for North America and Germany.
If your content really needs to be as heavily structured as you describe, I don't think free-tagging is the answer. It leaves too much room for error on the users' part (misspellings, duplicates, cities entered into the wrong state/country). Have you considered scaling your scope back a bit? Like focusing on the state/providence at first, or even major metropolitan areas? I'm not sure what you're trying to create, so I'm just throwing these ideas out there...
I am just using one country,
I am just using one country, I guess I just expanded my description for clarity. And unfortunately, the country is not supported by the Location module.
For the city selection, I would like to use free tagging, but I think that users will be prone to errors in spellings etc. So I would pre-populate the city tags with popular city name tags.
So, the user choses the state, then javascript would load in all the popular tags for that state. Then the user can look at the popular tags and say..."That's the city I want" then click on the city name which then fills in the free tag input field.
or if the user is posting a city that is not so popular, they can look at all of the popular tags, then say... "No, my city is different," and type in a new city name into the free tag input filed.
My goal is to make a travel guide. users can search by State, and refine their search by city.
Solution?
Hey there!
Did you actually found any solution to the above problems?
not yet, but what i did
not yet, but what i did instead was create just the most basic location tags (prefecture (or state, depends on the country)) and I allow users to create groups using the OG module and tag the groups with the relevant location. The groups have become city groups, and the tags are prefectures.
It creates the function I wanted, allows users to create new cities and have the content categorized by cities.
The last added feature I used was an auto tagging system. That is if someone posts content, image, forum post, event to a group. the location of the content is inherited from the group.
so if an event is posted to the Seattle group, (Seattle is a city in Washington State) the event is tagged with washington.
It was not what I needed and may not fit your plan, just my work around solution.
If you got any better ideas post them here.