Retrieving 2 different collections from config.yml. Gatsby & Netlify CMS #30269
Unanswered
Afarensis101
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I got a website using Gatsby, and a blog section using Netlify CMS that works just fine. Now, i want to add another section to display products to sell. My teammates asked to have the same netlify admin page for writing both blog posts and product posts.
From netlify its possible to do this so i wrote another collection in my config.yml file like so :
config.yml
It's working fine on the netlify admin page , users can select blog or market.
Now i need to add this new collection in the gatsby-node.js file
I can add something like this :
In the each loop.
My questions :
How to retrieve only blog datas in my blog post template and only product datas in the product template ?
Beta Was this translation helpful? Give feedback.
All reactions