I recently changed my backend and frontend code from kirby-builder towards the official kirby-blocks.
With kirby-builder it was quite easy to get a preview of the page contents by using a 1-line PHP file using the twig-function and defining a required CSS file. Using this, kirby-builder created an iframe showing the current content of the block using the intended template.
If I understood the documentation correctly, with kirby blocks I'd have to rewrite the entire template code as vue-template to get a working preview of the contents.
I wonder, is there any way to achieve a simmilar outcome as with kirby-builder. Of course, live editing wont work if it is not a vue template, but an iframe rendering the actual twig template would be fantastic.
Does anyone know a workaround to render a block preview using the actual twig templates?
That's a good question. I currently don't know how to tackle this. I suggest you create an issue in the Kirby Repo, as blocks is a core feature: https://github.com/getkirby/kirby
I recently changed my backend and frontend code from kirby-builder towards the official kirby-blocks.
With kirby-builder it was quite easy to get a preview of the page contents by using a 1-line PHP file using the twig-function and defining a required CSS file. Using this, kirby-builder created an iframe showing the current content of the block using the intended template.
If I understood the documentation correctly, with kirby blocks I'd have to rewrite the entire template code as vue-template to get a working preview of the contents. I wonder, is there any way to achieve a simmilar outcome as with kirby-builder. Of course, live editing wont work if it is not a vue template, but an iframe rendering the actual twig template would be fantastic.
Does anyone know a workaround to render a block preview using the actual twig templates?