block-lab icon indicating copy to clipboard operation
block-lab copied to clipboard

Blade rendering engine for blocks

Open guzart opened this issue 6 years ago • 1 comments

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'),
    ]);

guzart avatar Oct 25 '19 03:10 guzart

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.

lukecarbis avatar Oct 27 '19 00:10 lukecarbis