Best practices for collections and tags?

Hey, Prismic community! I'm new to Prismic, struggling a bit with document search/organization, and looking for best practices on Collections and Tags. I've looked through the Prismic documentation for each, but I'm still looking for perspective on where it makes sense to organize around a collection versus where it makes more sense to organize via tags. Any thoughts/guidance?

1 Like

Hey @dan.duett, thanks for reaching out!

It really depends on the level of customization you require. Collections allow you to make much more specific filters because you can limit the type of Custom type to which it can be associated. And they also save you time when filtering your documents in the document overview.

I give you an example. You have two Custom Types a News and a Post. And you have two tags: 'Environment' and 'Politics'. You only want to see the Posts that have the 'Environment' tag. You can do this in two ways. The first is adding both filters to the list of documents, like this:

And the second option is to create a Collection that does this filter automatically. It's a better option if this is a search that you need to do repeatedly.

1 Like

Thanks, Pau! That's helpful. I'd still love to hear any applied heuristics/rulesets folks have that help determine how/when they use collections vs. tags. But your general pointers help, too. Thanks again!

Thanks for the comments!

A good example of this case that I told you about is our own technical documentation. We group the Collections so that we can see all the Documents related to a specific technology. For example, we have three custom types: navigation, article, and technical_reference. We can separate them by a framework (JS, Nuxt, Next, etc.) without including the technical reference type.

I'm going to let our Content team know about your case, and they might consider your feedback to write a post about Collections and Tags on our blog!

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.