I am making an affiliate webshop with products in various categories and I am using tags for the different products.
I am trying to make a dynamic route based on a specific tag
/search/tags/:tag
to display all products with that specific tag, f.x. "Kitchen".
but I am getting a 404 on that route.
My folder structure for the route are
search
- tags
- _uid
I have this in my linkResolver.js
if (doc.type === 'homepage') {
return '/'
}if (doc.type === 'product') {
return '/products/' + doc.uid
}if (doc.type === 'category') {
return '/categories/' + doc.uid
}
Do I need to create a "Tags" single type in Prismic or can I have Nuxt handle the route in the default way with some Prismic querying?
Any help is very much appreciated.