Using schemas in the Frontastic studio
In the Frontastic studio, you'll find a schemas section (click Developer, then Schemas). This is where you can edit the schemas for your project configuration and page folder configurations.
Click on the schema type to open the right-hand drawer:
Click the Edit schema button to open the schema editor and make changes to the schema as you wish.
Let's look at an example. Say we wanted to add another field into our page folder configuration that was just a text field.
- Click Page folder schema, then Edit schema
You'll notice that the page folder configuration doesn't include the general settings or data source section in this configuration file, this is because these should never be edited or removed.
- Add a new section into the JSON editor, for example:
{
"name":"New Text",
"fields":
[
{
"label":"Text field",
"field":"newTextField",
"type":"string",
"translatable":true
}
]
}
- Click Validate, then Publish
- Go to the site builder and check your new section is now available in your page folder settings and you can now access this data
For more information, see the extending page folder schema article.
Updated about 1 year ago