In Drupal 6 you could assign a taxonomy vocabulary to content types.

I can't see this option in Drupal 7 so I'm not sure how to assign a taxonomy term to content. I have the ability to assign tags to an article, but not any of the vocabulary/terms that I've created.

Any help appreciated, thanks.

Comments

yelvington’s picture

There's a lot about Drupal 7 that is designed to be more usable by beginners, but may be confusing if you come from D6 with expectations of where to find your tools. This is one of those situations.

Fields (CCK) have been moved into core, and taxonomy is treated as just another field -- not some separate and special concept.

If you edit your content type (admin->structure->content types) existing vocabularies will be available in the "add existing field" widget. To create a new vocabulary and associate it with a content type, just "add new field" of type "term reference."

You also can go admin->structure->taxonomy and add a vocabulary there, but (as you discovered) that doesn't glue it to the content type.

ChocolateTeapot’s picture

That's really helpful.

Thanks for your time.

aldim’s picture

I've had the same problem and now it's gone :) Thanks!

Stephen Winters’s picture

Hi yelvington,
Thank you so much for this post. Coming from Drupal 6, I couldn't find how to create taxonomy free tagging boxes, and just didn't understand what to do with the taxonomy. I set up a Drupal 7 test site to experiment with, and also searched and searched trying to figure out how to use Taxonomy in Drupal 7. While I don't fully yet understand it, your post has greatly helped me to begin to have a better understanding.

Your statement here...

Fields (CCK) have been moved into core, and taxonomy is treated as just another field -- not some separate and special concept.

.... helped me to get to thinking in a different way. Taxonomy is no longer a separate component, but is now a field. That took some real re-thinking on my part. Your short explanation was very helpful to me. Then, after you explained that it was a different concept, the other part of your post explains how to find and use the Taxonomy fields.

I had looked through the Drupal documentation on Taxonomy and non of this was explained. Your explanation here (perhaps go into just a bit more detail) would be very helpful if it was in the Documentation section. After much frustration, your message was very helpful to me.

After reading your message I have been able to create a taxonomy field and attach it to a node type in my Drupal 7 test site.

I hope you don't mind, but I found your message so helpful that I copied it into the Documentation here: http://drupal.org/node/774884 Feel free to go there and edit and improve it if you wish. I don't yet Drupal 7 taxonomy enough to write something up myself. But I thought your explanation was important enough to be in the documentation.

Thank you, Thank you, Thank you,
Best Wishes,
Stephen

kerala’s picture

excellent post..thanks a lot yelvington
but i am still confused
* i created some fields for a vocabulary.But i found no change or effect that it makes.
* i am curious to know what is the significance of the created fields of a vocabulary.that is why or for what purpose do we create fields for a vocabulary..
may be a silly question :)

cfox612’s picture

use it for my "event" content type for selecting the type of event (educational, committee, featured speaker, etc). It's just another way to categorize content for creating custom views to display it.

kerala’s picture

thanks cfox612..

arpas’s picture

I have another question. can I use taxonomy fields in views?

froboy’s picture

If you edit your content type (admin->structure->content types) existing vocabularies will be available in the "add existing field" widget. To create a new vocabulary and associate it with a content type, just "add new field" of type "term reference."

While most of this comment is great, it seems to me that the quoted section above is not quite right. Unless I'm missing something, I always have to create a new Vocabulary via Admin->Structure->Taxonomy before I can reference it in the "Manage Fields" dialog. Right?

kbell’s picture

That's why it says "EXISTING vocabularies will be available" (emphasis mine).

If you edit your content type (admin->structure->content types) existing vocabularies will be available in the "add existing field" widget.

-Kelly Bell
twitter: @kelly, @gothamdrupal
http://gothamcitydrupal.com

vfranklyn’s picture

Hi there,

I created a new vocabulary with terms in Taxonomy in Drupal 7 before I made the content type for it. However, the new vocabulary is not showing up in the 'add existing field' pull down menu. Any ideas?

vfranklyn’s picture

Never mind, I figured it out. You have to create a new field in the content type, under 'Select a Field Type', choose 'Term Reference', then when you hit save, you'll be prompted to add the vocabulary.