I am trying to build a company website with ecommerce products and 2 different blogs, using Hygraph (GraphQl) for Headless CMS. I am not a coder and rely mostly on the visual dev side of Plasmic.
Currently, I am using dynamic data on the home page for repeating elements (the products) and it worked like magic but I am facing issues to build dynamic pages. Here is what I have tried and what I see:
Currently using Data Query on the Page Data and I manage to pass the slug when I click on the link from the overall blog page. However, I don’t seem to be able to override the slug in the URL parameters of the page and the elements in the page cannot be filtered to show the right item. Rather, I always see the preview which I put as default in the query.
Here is the query on the template page:
query MyQuery($slug: String = "zone-of-proximal-development") {
getFramework(where: {slug: $slug}) {
category
id
slug
shortDescription
subtitle
tag
title
contentExplained {
html
}
contentHowToApply {
html
}
contentQuickTip {
html
}
contentWhy {
html
}
visual {
altText
height
mimeType
url
width
}
}
}
Here is what I see in the Data Picker
The slug is correctly assigned but the specific product is the wrong one, i.e. the slug didn’t overwrite the info in the filter for the query “specificProduct”.
I read the docs on building dynamic pages and the numerous posts here but I am afraid the answer was not clear.
If anyone has an idea what I am missing, I will be very grateful!
Thank you,
Simona