Hey all,
Is it possible to render code from the blocks editor as the code itself and not as a snippet?
My blueprint:
html_blocks:
label: HTML blocks
type: blocks
fieldsets:
- code
Using it my template:
<?= $site->html_blocks()->toBlocks()->shuffle()->first(); ?>
At the moment, it is displayed as a code block, but I am trying to get it to render as the HTML itself. I have tried this as well:
<?= $site->html_blocks()->toBlocks()->shuffle()->first()->html(); ?>
But it returns empty. Thanks