Tag suggestions per document type

Tags are really useful both for categorizing things in a way meant to be visible (like blog post categories) and meant primarily for branches in display code (like "featured").

It's been an annoyance on several projects now to content authors that tags used anywhere in the repository are all suggested when tagging a document. My current client just brought this up to me in a discussion and called it a "limitation of Prismic". I have to agree -- anything which makes the content author's time more confusing and annoying is a problem.

I don't know what the best solution would be but one suggestion is this:

Detect tag names which start with a string and then some separator string. If the string before the separator matches a document type name, and the current document is not of that type, do not offer it in the list of tag suggestions.

Example: if I have a document type Author which has some metadata tagging only relevant to Author documents, I can use tags like Author::Guest. On blog posts I can have tags for categories like Post::News and Post::Musings and the Author::Guest suggestion won't come up at all. I could use a tag Featured on either, and it'd come up as a suggestion on either.

Of course on my end, in my website code, I then snip out those prefixes before display.

It occurs to me that this wouldn't add any complexity to Prismic itself -- no need to stop the user from manually typing a namespaced tag to the wrong document type if they really need to -- and I think that'd mean this is just a tweak on the UI side, not really any changes under the hood necessary.

Hey Bart!

Thanks a lot for the feedback! We have had previews conversations about the current behaviour of tags, and we're doing small changes along the way. e.g., We're progressively deploying a change where it'll be possible to remove unused tags by just getting rid of them in all existing documents (including archived and docs in releases). But aside from that we haven't planned any big changes yet.

What I can recommend you is to create a Custom tagging system for your documents. That way you can use Content Relationship fields that are restricted to certain Custom types, like the example you gave: Author docs can only access Guest tags and so on...

As always, I'll share this idea with the product team and mark this thread as an open feature request so we can consider this for future improvements.

I think you may have already deployed that -- I noticed just yesterday that unused tags are disappearing from suggestions, which is a decent step forward in quality of life!

The "custom tagging system" described in that blog post has one big drawback: the tags applied in that way then no longer appear as part of the metadata available alongside a document where it's used in a link, whether in a "link" field or within a "rich text" field. Valuable in some use cases certainly, but a rather heavyweight solution where a simple one would suffice.

This issue has been closed due to inactivity. Flag to reopen.