Closed jodiedoubleday closed 4 years ago
I'm looking at adding categories in my page structure, which the user can set in Prismic, for example: www.fruit.com/apple/granny-smith.
The UID of the page is set to 'granny-smith' and I've created a new field in Prismic called 'category'
Looking at the documentation I know you can filter using extraPageFields but can you use this to generate the page structure.
extraPageFields
for example:
extraPageFields: 'category', pages: [{ type: 'Page', match: '/:category/:uid', component: require.resolve('./src/templates/page.jsx'), }]
This could be related to https://github.com/prismicio/gatsby-source-prismic-graphql/pull/38, if it is, then feel free to close.
I'm looking at adding categories in my page structure, which the user can set in Prismic, for example: www.fruit.com/apple/granny-smith.
The UID of the page is set to 'granny-smith' and I've created a new field in Prismic called 'category'
Looking at the documentation I know you can filter using
extraPageFields
but can you use this to generate the page structure.for example: