Hi, Prismic ! is there a way to stop having the same name for tag and uid? or is there a way to build a URLResolver that can return a type?
In our app, we have blog/{blogName}
for a specific blog , and blog/{categoryName}
for the blog category page which list down all blogs under the same category/tag.
we can always search through all tags and all uid for a certain custom type to find out which component we should render, but just uncertain how to manage the situation when {catrgoryName} and {blogName} are the same.
Hi @sunpeiting07,
There is no way to make a UID unique between different document types. The routing structure that you described creates a namespace problem, which you're now encountering. For that reason, we discourage users from using the same route for separate types. Instead, you might use /blog/category/{categoryName}
or /blog/posts/{blogName}
.
Sam
1 Like
Thanks Sam, we will rethink our route set up then.
1 Like