I'm working on a drupal site that uses the CCK node-reference field type to create a parent-child relationships between nodes. There are two main types of content on the site: geographical areas ("geo") and businesses ("business"). The parent of a Geo node may be another Geo node (or null). The parent of a Business node must be a Geo node. This allows quite flexible relationships like this:
World - Europe - United Kingdom - England - London - Harrods
World - United States - IBM
The number of Geo and Business nodes is quite large (about 10,000 and 40,000 nodes respectively). Currently, when I add a new businesses, I must select a parent (Geo) node. As the CCK node-reference field is Ajax enabled, this works quite nicely. Taking Harrods as my example, I could link it to London or any other level in the hierarchy depending on my needs.
If I visit the Harrods page, I get to view info about Harrods. If I click the parent link to London, then I view information about London. I also see the backlinks to London (which would include Harrods, etc...). I can do this through the hierarchy. Having a node for each geographical area is an important part of the website.
What I can't currently do is view a breadcrumb trail, something that I could easily do using Taxonomy. I think that Taxonomy would also make it easier to create views and allow my users to search the website.
As I haven't previously worked with Taxonomy, I'm a bit confused about how to build my Vocabulary. Logic suggests I should create just one vocabulary named "Geographical location" and order the terms into a hierarchy. Okay for a small site with a limited number of geographical areas, but a drop down list of 10,000+ items is not going to work. Is there a module to get around this problem? I'm thinking of something that would use linked select lists and Ajax. I've searched but cannot come up with anything.
Comments
One other thing I forgot to
One other thing I forgot to mention is that every term in the Taxonomy hierarchy would need to point to a node. For example, the term London must point to the node about London. I don't know how I'd do this.
I think that may be possible
I think that may be possible using the Taxonomy Breadcrumb module. I will check it out as soon as I get a chance.
Try
Try this http://drupal.org/project/hierarchical_select it might be the answer.
Thanks. I followed your
Thanks. I followed your suggestion and took a look at HS. I waded through a lot of comments, and unless I've missed something it's not yet ported to drupal 6.9. Comment #184 on page http://drupal.org/node/232330 makes a very similar request to me. He also needs to select country -->province -->district -->town and thus has a sizable number of terms.
Very usefull Module
Checked out that Hierarchical Module and I must say it's very useful for what I was looking for.
Another solution...
...would be to use the Node Hierarchy module, which allows to choose which content types can be parents and which can be children (or both), and enables hierarchical breadcrumbs too.
Thanks, I will take a look at
Thanks, I will take a look at the Node Hierarchy module. I just checked the feature list - which includes breadcrumbs - and it will certainly be worth investigating.
Taxonomy manager
Since nobody has mentioned it, I will. The taxonomy manager allows you to merge taxonomy terms via an easy GUI.
It is not all powerful but it allows you to easily make changes to your taxonomy vocabularies. Of course, ideally to get you taxonomy right from the start is the ideal. Nevertheless keep in mind that you can make some adjustments later.
Hope this help
That could be useful to know,
That could be useful to know, but my main concern is the inability (or unsuitability) of Taxonomy to handle a large number of Terms. Thanks for the suggestion.
Taxonomy manager
Since nobody has mentioned it, I will. The taxonomy manager allows you to merge taxonomy terms via an easy GUI.
It is not all powerful but it allows you to easily make changes to your taxonomy vocabularies. Of course, ideally to get you taxonomy right from the start is the ideal. Nevertheless keep in mind that you can make some adjustments later.
Hope this help
Oops, sorry about double posting. Drupal.org gave me an error on the first attempt and I thought the post had not gone thru. Teething troubles, I guess.