Join the Webstudio community

Updated 6 months ago

I can't figure out how to edit the default system: JSON.

At a glance

The community member is trying to filter by tag in Ghost, and they know there is a template for this. They are trying to reproduce the template for their own learning. The issue is that the tag filtered page requires the system.params.slug, but their system JSON does not have this. Another community member suggests that the system.params.slug will show up when a parameter is defined in the page settings. They provide a link to more information on dynamic pages. The original community member thanks the other member and says they will use the template, as they were close but still couldn't get it to work. Another community member offers to take a look at the builder link to see where the issue is.

Useful resources
I want to filter by tag from Ghost. I know there is a template. I am trying to reproduce it for my own learning. On the tag filtered page I know I need to add the Ghost Tag variable. But it wants the system.params.slug. My system JSON does not have that. This is missing:
{
"params": {
"slug": "blog"
},
How can I add this?
I've copied over the various hidden Code Injections from the template as well.
Here is what my System JSON looks like.
{
"params": {},
"search": {},
"origin": "https://iryn-x9l0p.wstd.io"
}
J
S
4 comments
They show up in system.params when you define a parameter in your page settings > dynamic path. So something like /tag/:slug

:slug is your parameter.

As soon as you define the param, a new icon will show in your top bar which lets you test different values, like mytag. Fill that in.

Now inspect your system variable
Thanks John. That was the goodness I was missing. πŸ™‚ I still didn't get it to work so I will use the template. I think I was close. I learned a lot trying though. ...Little at a time...
Feel free to send your builder link (dm if you want) and I can see where the issue is
Add a reply
Sign up and join the conversation on Discord