Category Field - Documentation topics on: adding a category field,categories,category,taxonomy,.

Category Field

Category fields offer a fixed list(s) of labels to the Content Contributor as content is stored in dotCMS. Categories are commonly used in dynamic displays of data to pull or sort by specific groupings of data onto a dynamic page.

Each top-level category contains a list of sub-categories which may be selected within that category. An appropriate category must be created before it can be assigned to a category field on a Content Type. For more information, please see the Adding New Categories documentation.

Steps to Add a Category Field

Perform the following steps to add a category field to a Content Type:

  1. Select the Content Types tab to display a list of Content Types.
  2. Select the title of the Content Type you wish to add the category field to.
  3. Click the +Add New Field button.
  4. Select Category from the Display Type selection box.
  5. Use the Category select box to choose the desired category.
  6. Fill out the other values for the new field as desired.
  7. Save the category field, and position the field in the Content Type field order as desired.

To verify the operation of the category field, select the Content Search tab, and add a new piece of content of the same Content Type.

Note:

  • Each category field will allow content contributors to select from only one top-level category.
    • If you wish for content contributors to be able to select from multiple categories on a single piece of content, you must add multiple category fields to that content type.
  • Category fields always allow content contributors to select multiple category labels for a single piece of content.
    • If you wish to limit content contributors to only select a single label for each piece of content, consider using a Select field instead.

For more information, please see the Categories documentation.

Important Note: Category Permissions

Categories in dotCMS have permissions, and the permissions on a category must be set to be viewable by any content contributors who will add content of the appropriate Content Type. If a content contributor does not have permission to view the category that is assigned to a Content Type, they will not be able to select the category when adding or editing content of that Content Type.