block-lab
block-lab copied to clipboard
Blade rendering engine for blocks
Hello 👋,
We are currently using Sage WordPress Theme which uses Laravel's Blade Templates. It would be amazing to be able to extend Block Lab to use any custom rendering engine.
So far I am able to render our Blade components with the following /blocks/button/block.php:
<?php
$template_path = get_stylesheet_directory() . '/views/components/button/index.blade.php';
echo \App\template($template_path, [
'slot' => block_value('text'),
]);
Hey @guzart – that's super interesting. I've come across this once before. We'll definitely have to take a closer look into how Blade Templates could work with Block Lab.