You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Any idea how to get Blade to compile the data that gets rendered through a gutenberg block?
I have the blocks all registered and the data flowing but if I write in blade instead of php it just outputs the plain text, it doesn't compile the blade code.
Here is my block:
/**
* ACF Blocks
*/
add_action('acf/init', 'my_acf_init_block_types');
function my_acf_init_block_types() {
// Check function exists.
if( function_exists('acf_register_block_type') ) {
// register a testimonial block.
acf_register_block_type(array(
'name' => 'image-hero',
'title' => __('Image Hero Block'),
'description' => __('A large image with square text box.'),
'render_template' => 'templates/partials/blocks/image-hero.blade.php',
'category' => 'custom',
'icon' => 'admin-comments',
'keywords' => array( 'image', 'hero' ),
));
}
}
From what I can tell I think adding something to the render template might do the trick but not sure exactly what.
Any idea how to get Blade to compile the data that gets rendered through a gutenberg block?
I have the blocks all registered and the data flowing but if I write in blade instead of php it just outputs the plain text, it doesn't compile the blade code.
Here is my block:
From what I can tell I think adding something to the render template might do the trick but not sure exactly what.
Not sure if this thread helps at all: I am registering blocks the same way as this guy was in this thread: https://discourse.roots.io/t/gutenberg-block-render-template-and-blade/20194
Thanks!
The text was updated successfully, but these errors were encountered: