Richard Eriksson - December 22, 2004 - 19:17
You may want to take a look at our documentation on how you can benefit from the taxonomy system in Drupal and take a few minutes to decide what kind of structure your site will have. Having a structure plan ahead of time can save you some time in the future if you need to make changes. That said, you can always make changes with any taxonomy you create.
To Create a Vocabulary
- Click Administer » Content management » Categories.
- Click the add vocabulary tab.
- Type in a vocabulary name.
- Type in a longer description of the vocabulary.
- Type in the help text for the vocabulary.
- Select which types of content the vocabulary will be available for.
- This is useful for when one content type will have its own categorization scheme and another content type will have another.
- Select whether you want this vocabulary to have related terms.
- Choose whether you want "free tagging". This means users can add "tags", which are categories added at the time that someone writes content instead of being limited to those categories that administrators create for them.
- Select the type of hierarchy the vocabulary will take. See the Category Hierarchies section of our 'why use categories?' documentation for examples.
- Select whether the vocabulary will accept multiple select. That means that users can hold down a key (CTRL key for PC's, Apple/Command key for Macs) and select more than one category (or term) for content.
- Choose whether the user is required to select a category. If you check the box for the new vocabulary, and users don't select a category, they will be notified that they are required to do so before publishing their content.
- Select a weight for the vocabulary in the list. Higher numbers "sink" to the bottom, lower numbers "rise" to the top.
- Click the "Submit" button.
Now you will need to add "terms" to the vocabulary. Terms are what users will see as categories, to their content.
To Add Terms
- If you haven't already, list the vocabularies by clicking Administer » Content management » Categories.
- Find the category you want to add categories (terms), then click add term for that vocabulary.
- Type a name for the term. This is what users will see as the category name when creating content.
- Type a description for the term.
- This is used for different purposes by different modules. For example, the Glossary module uses the term title as the phrase to highlight and the description as the phrase's definition. The Forum module uses the term title as the forum name, and shows the description below the name.
- If you selected a hierarchy type for the vocabulary under which the term appears, you will be given the option to select the term's parent.
- For single-parent hierarchy, you will be given a simple drop-down menu from which you can only choose one parent.
- For multiple-parent hierarchy, you will be given a multiple-select box from which you can choose one or more parents. To select multiiple parents, hold down the CTRL key (on PC) or Apple/Command key (on Macs) and click each parent you wish the term to fall under.
- Select synonyms for the term. This becomes useful in modules like the Glossary module where you can define similar words for a term. For example, if you have a "Feline" category, you can add "cat" as a synonym to that category.
- Each synonym must be placed on a separate line in the Synonyms box.
- Select a weight for the term in the list of categories inside the vocabulary. Higher numbers "sink" to the bottom, lower numbers "rise" to the top.
- Click the Submit button.
To Edit a Vocabulary
Once you've created a vocabulary, the settings are not set in stone: they can be changed.
- Click Administer » Content management » Categories.
- In the list of vocabularies and terms, click the edit vocabulary link.
- Follow the same steps from #3 as above for adding a vocabulary.
To Edit a Category (Term)
- Click Administer » Content management » Categories.
- In the list of vocabularies and terms, click the edit term link next to the term you would like to edit.
- Follow the same steps from #2 as above for adding a term.
To See What the Vocabulary Form Looks Like for Users
- Click Administer » Content management » Categories.
- Click the preview form link in the row for the vocabulary you wish to preview.
- You will be shown the list of terms in the hierarchy you selected, as well as in the "select" format (that is, a drop-down list for single select, and a boxed list for multiple select).