Multiple fields pointing to the one Vocabulary

Maedi - April 21, 2009 - 12:40

Hi,

I'd like to have 2 vocabulary fields on a node pointing to the one vocabulary. I have a games website (http://macintoshgarden.org) and I'd like users to be able to enter terms into a 'Developer' field and a 'Publisher' field like so:

Developer:
Maxis

Publisher:
Maxis

...But the trouble is that 2 separate terms are created in 2 separate vocabularies. I'd like these 2 terms to be associated with one term in a single vocabulary. With the Content Taxonomy module, I was trying to point 2 custom fields (Developer and Publisher) to the one vocabulary but with no luck.

What's the best way to do something like this?

Is it possible?

Maedi - April 23, 2009 - 23:50

Is it possible?

My apologies for bumping

Maedi - April 25, 2009 - 16:01

My apologies for bumping this.

_

WorldFallz - April 25, 2009 - 18:52

Create one multiselect vocabulary-- then add both "Publisher" and "Developer" on the same level as terms. Then add "Maxis" and in advanced options set the parents to both "Publisher" and "Developer". That will give you something that appears like your diagram above and the ability to select maxis at both levels.

Then, you might be able to add a content_taxonomy field twice, using the 1 vocabulary, once starting at "Publisher" and once starting at "Developer". Not sure about this part though-- you'll have to play around with it.

EDIT: i just did a quick test, it looks like you can do this with content_taxpnomy-- very slick.

_
Don't be a Help Vampire - read and abide the forum guidelines.
If you find my assistance useful, please pay it forward to your fellow drupalers.

Create one multiselect

Maedi - April 26, 2009 - 01:56

Create one multiselect vocabulary-- then add both "Publisher" and "Developer" on the same level as terms. Then add "Maxis" and in advanced options set the parents to both "Publisher" and "Developer". That will give you something that appears like your diagram above and the ability to select maxis at both levels.

I think the only problem with this approach is that it's an admin defined procedure. Users couldn't add in the term 'Maxis' as tags and have that term automatically assigned to Publisher and Developer as parents.

It's great to know that I can do this with Content Taxonomy. Where you talking about doing what you mentioned above with CT or just ponting multiple CT fields to one Vocab?

I've been having problems, but maybe it is possible after all... when I assign 2 Content Taxonomy fields to the one Vocab, I get this error after I save:

user warning: Duplicate entry '390-652' for key 'PRIMARY' query: INSERT INTO term_node (nid, vid, tid) VALUES (264, 652, 390) in /var/www/html/modules/taxonomy/taxonomy.module on line 694.

Any ideas?

Best wishes,
Maedi

 
 

Drupal is a registered trademark of Dries Buytaert.