Modifying the content model
Our headless CMS is now able to present basic layouts and contents to our portfolio. It’s still very limited this way, so let’s find out how we can work with the content model so that it supports new features.
Updating existing types
Let’s assume that our Teaser block is a Heading block. I would recommend trying to keep blocks as static as possible, but let’s see what we need to do to change a name. If we navigate to the Block library in CMS and hover over the Teaser block, we can enter edit mode with the context menu. In the Config tab, we have the option to update the name:
Figure 10.13 – Updating an existing block’s name
The next step is simply renaming the Teaser.vue
component to Heading.vue
in the ./storyblok
folder. To keep stability in mind, I would strongly recommend planning ahead with content modeling instead of relying on rewrites of existing content types.
A rule...