Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Note

This has been migrated to https://docs.openedx.org/en/latest/educators/how-tos/content-tagging-how-tos/build_taxonomy_using_template.html - this wiki page is now locked.

Please backlink this article into the Redwood Release Notes (under Taxonomy Import & Updates) when put into RST on the docs site

Building a taxonomy using a template

Tags that can be applied to content are organized into hierarchical taxonomies. Currently, the only way to create or modify a taxonomy is by uploading a CSV or JSON file.

...

  1. Now, to add the “California” tag, we put it in the next row. Let’s give it the ID “2” and put the value as “California”. Now, because we want this tag to be a “child” of the “United States” tag in our taxonomy, we also need to set the parent_id field. In this case the parent is “United States”, which we gave the ID 1, so we’d put 1 as the parent_id, like this:

  2. Likewise, to create “Los Angeles” as a child tag of “California”, we need to give it an ID (say, 3), and set its parent ID to the ID we gave to “California” (in this case, 2).

    So far, this would result in the following taxonomy:

    • United States

      • California

        • Los Angeles

  3. Now, continue to add the rest of the tags. You can put notes in the “comments” column if you want; that column and any other columns besides “id”, “value”, and “parent_id” are ignored by the system during import.

  4. Save the spreadsheet using the default format (e.g. .xlsx), in case you want to edit it later.

  5. Export the spreadsheet to a CSV file.

    1. In Excel, use File > Save As…, and set the “File format” to “CSV UTF-8 (comma-delimited) (.csv)” (preferred) or “Comma Separated Values (.csv)” then enter a filename and save it.

    2. In Google Sheets, use File > Download > Comma Separated Values (.csv).

    3. In Numbers, use File > Export To > CSV… and use the default options.

  6. Navigate to Studio Home > Taxonomies and click on the Import button at the top right of the screen.

    Image Removed
  7. When prompted, click to select the CSV file from step 4 and upload it.

  8. When prompted, enter a name for the new taxonomy:

    Image Removed

  9. When prompted, enter a description for the taxonomy (recommended but optional).

  10. Then keep the page open until you get this message:

    Image Removed

  11. Find your taxonomy in the list of taxonomies, and click on it to verify the results:

    Image Removed

    (note: at each level, the tags are always sorted in alphabetical order, so the order may have changed from what was in your spreadsheet.) Import your taxonomy following the How-to: Import and export a taxonomy guide.