Added nested blocks support (inner_blocks). ACF Only.
This commit is contained in:
@@ -119,6 +119,15 @@ function renderBlock(templateHbs, jsonData, target) {
|
||||
return '/';
|
||||
});
|
||||
|
||||
Handlebars.registerHelper('inner_blocks', function (options) {
|
||||
const content = options.data.root['inner_blocks'];
|
||||
if (!content) {
|
||||
return '';
|
||||
}
|
||||
|
||||
return new Handlebars.SafeString(content);
|
||||
});
|
||||
|
||||
let html;
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user