block:
title-text:
title: Title with text
description: Title with text
render_template: 'templates/block/acf/title-text.html.twig'
category: 'layout'
icon: 'editor-alignleft'
preview_image: true
title-text-image:
title: Title with text and image
description: Title with text and image
render_template: 'templates/block/acf/title-text-image.html.twig'
category: 'layout'
icon: 'align-left'
align_text: 'left'
preview_image: true
To use block preview image feature, save block preview images as /uploads/blocks/{block-name}.png
Use blocks
Include blocks in template from loop
Please note that {{ post.content|raw }} will also display blocks html but for performance reasons, use post.blocks object
{# templates/page.html.twig #}
{% for block in post.blocks %}
{% include 'block/'~block.name~'.html.twig' with { props: block.content } %}
{% endfor %}