I use this great plugin to display the block’s fields in the preview: GitHub - jongacnik/kirby-fields-block: Kirby block preview plugin to directly render block fields
Since Kirby comes with some default blocks I want to overwrite their previews, too. But it seems like the preview is hardcoded. These blocks have names like
text so it would be great to use them.
Some background info on how the plugin works: it registers a “fields” block with the magic preview. To use this preview you can simply add
preview: fields to custom blocks.
# site/blueprints/blocks/image.yml name: Image preview: fields fields: image: type: files multiple: false
No matter what I try, the block uses the default
image preview. Same for every other default block.
This is not only relevant if you use the plugin but also if you want to set the default blocks previews to something else. E.g. you’re adding/changing the fields of the default blocks and you have to adjust the preview. There’s also this sentence in the docs: “You can take our core blocks as a starting point for your own custom blocks and extend them with your own fields, snippets and previews.” (Blocks | Kirby CMS)