Create a custom tagging system

Do you need more control of your document tags and tag management? If so, we suggest setting up a custom tagging system.

Note: This will not expand the capabilities of Prismic's default tagging system. This will be an entirely different system that is completely separate.

1. Create a "Tag" Custom Type

Create a "Tag" Custom Type which consists of at least a Rich Text field for the name of the tag.

2. Create all the tags you need

Create as many documents of the type Tag as you need. Doing it this way, you will be able to add more or modify any tag at any point.

3. Add a Content Relationship to your documents

In all the Custom Types where you want to be able to tag, add a Content Relationship field configured for your "Tag" Custom Type. This will allow your content authors to select any of your tags. If you put this field in a Group field, they will be able to select as many as they need.

4. Query all the tags and the documents linked to any given tag

In order to query all the tags in your system, you just need to query by the "Tag" Custom Type.Browse the developer docs to learn how to query all the documents of a given type in your favorite technology.

You will also be able to query any documents linked to a certain tag in your system. To do this, you must query by the Content Relationship field that you set up.