gutenberg-block.html.twig in Gutenberg 8.2
Default theme implementation to display a Gutenberg block server-side. This template should be overridden, and is only used if there's no default theme override.
Available variables:
- block_name: The Gutenberg block name.
- block_content: The content of this block.
- block_attributes: The attributes of this block.
- attributes: array of HTML attributes populated by modules, intended to be added to the main container tag of this template.
See also
1 theme call to gutenberg-block.html.twig
- DynamicRenderProcessor::processBlock in src/
BlockProcessor/ DynamicRenderProcessor.php - Process the Gutenberg block and its content.
File
templates/gutenberg-block.html.twigView source
- {#
- /**
- * @file
- * Default theme implementation to display a Gutenberg block server-side.
- * This template should be overridden, and is only used if there's no default theme override.
- *
- * Available variables:
- * - block_name: The Gutenberg block name.
- * - block_content: The content of this block.
- * - block_attributes: The attributes of this block.
- * - attributes: array of HTML attributes populated by modules, intended to
- * be added to the main container tag of this template.
- *
- * @see template_preprocess_gutenberg_block()
- *
- * @ingroup themeable
- */
- #}
- <div{{ attributes.setAttribute('style', 'background:red; color:white; padding:15px') }}>
- <div>
- {% trans %}
- Default server-side render for {{ block_name|placeholder }}. Override me!
- {% endtrans %}
- </div>
- <div>
- {{ 'Inner content:'|t }} {{ block_content }}
- </div>
- </div>