Skip to content
This repository has been archived by the owner on Nov 6, 2022. It is now read-only.

Blade rendering engine for blocks #451

Open
guzart opened this issue Oct 25, 2019 · 1 comment
Open

Blade rendering engine for blocks #451

guzart opened this issue Oct 25, 2019 · 1 comment

Comments

@guzart
Copy link

guzart commented Oct 25, 2019

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'),
    ]);
@lukecarbis
Copy link
Member

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants