Have read up on using plugins to register blocks in Sage 10 but I was wondering if there is a way to register Guternberg blocks using the more traditional method of acf_register_block_type.
So far, I’ve created a new file: acf-blocks.php in the /app folder and have the acf/init action to register them. So an example would be:
/resources/views/blocks/banner.php
And have registered it successfully with:
acf_register_block_type(array(
'name' => 'banner',
'title' => __('Banner'),
'description' => __('Banner Block'),
'render_template' => \Roots\view('blocks.banner')->render(),
'category' => 'media',
'icon' => 'images-alt2',
'supports' => array('align' => array('wide')),
'align' => 'wide'
));
The blocks are registered in the CMS fine and I can use them in the editor, however they are not rendering in the front-end and I’m sure the render_template isn’t right.
I’ve searched and tried numerous paths to no avail. Is there anyone who has successfully got their blocks working in the front-end using this way of registering acf blocks?
I don’t mind it they have to run as Blade or not. Any help would be appreciated.