#Taxonomies
#Overview
A taxonomy is a group of terms arranged in a hierarchical structure. The primary purpose of a taxonomy is to classify and logically connect related content items using a more elaborate structure than enumerations. This helps with content management and improves user experience with enhanced searchability.
Taxonomies are an enterprise feature. Contact our sales team for access.
#How it works
- The developer or the administrator defines the taxonomy in the schema using hierarchical tags.
- Example:
Clothes → Men → Pants → Formal
- Example:
- The developer or the administrator adds the taxonomy to a model.
- While creating content based on the model, the content team classifies content using one of the predefined terms in the taxonomy.
#Benefits of taxonomies
- Your end users can find and filter content easily.
- Your content is well-organized and well-structured in your content management system.
- You can dynamically classify content for search, filtering, and personalization purposes. For example, a user could search for full-sleeve formal shirts or full-sleeve shirts. If the user is looking for a full-sleeve shirt, they would be shown both formal and casual shirts. Depending on the parent-child relationships you’ve set up, your options to dynamically classify content are limitless. Also, you could embed additional algorithms in your setup to personalize dynamic classification based on the user’s search history and persona.
#Permissions
Here, are the permissions given to the default roles in Hygraph:
Role | Permissions |
---|---|
Admin |
|
Developer |
|
Editor |
|
Contributor |
|
#Create a taxonomy
- Navigate to the Schema builder.
- In the Schema list, click + Add next to Taxonomies. Or, if you're adding a taxonomy for the first time in the project, click Taxonomies, and then click the + Add Taxonomy button located at the center of the screen. The New Taxonomy screen is displayed.
- Provide a Display name. This is the name of the taxonomy that is displayed in Hygraph. The API ID field is autogenerated as you enter the Display name, but you can edit this value. The API ID is used to access this taxonomy through the API.
- Optionally, you can add a Description.
- Click Add Taxonomy. Now, the Nodes tab is displayed. This tab displays the parent-child relationships defined in this taxonomy.
- The
Display name
of the taxonomy is available as the root node name. To modify this, hover over the root node, click ... (context menu), and then click Rename node. - To add a child node to the root node, hover over the root node, and click Add child node. Provide a name, and click Add. The
API ID
is autogenerated as you enter the name. This ID is used to access the taxonomy node through the API.
- You cannot have duplicate node or API IDs in the same taxonomy.
Repeat this step to create multiple parent-child relationships between the different nodes.
#Add a taxonomy to a model
- Navigate to the Schema builder.
- Select the model you wish to add the taxonomy to.
- From the Add fields right sidebar, select the Taxonomy field.
- Complete the
Display name
field. This autogenerates theAPI ID
field, but you can edit this value if you want. - Use the
Taxonomy
dropdown to select the taxonomy you want to add to this model. - Optionally, you can also add a
Description
. - This screen allows you to control different properties of your Taxonomy field: you can allow multiple values by selecting the checkbox under the
Field options
section. - Click
Add
to save.
After you add a taxonomy to your model, it is available for use in the Content Editor.
#Use demo taxonomy
- Navigate to the Schema builder.
- If you're adding a taxonomy for the first time in the project, click Taxonomies, and then click the Add demo taxonomy button located at the center of the screen.
- The system generates the demo taxonomy and displays the taxonomy nodes.
#Modify a taxonomy
-
Navigate to the Schema builder.
-
Under Taxonomies, select the taxonomy that you want to modify.
-
On the Nodes tab, you can do the following:
Task How to do it Add a child node Click Add child node next to the node. Edit name of existing node Click to update the name of the node.
Move node to a new parent Click and select a new parent from the list of existing nodes.
Delete the node Click to delete the node. You cannot delete a taxonomy node, if it is used in a content entry.
-
On the Settings tab, you can modify the display name and the API ID of the taxonomy, and add or update the description, if needed.
#Delete a taxonomy
- Navigate to the Schema builder.
- Select the taxonomy you want to delete.
- Click ... (context menu), and then Delete to delete the taxonomy.