field-gutenberg-text.html.twig in Gutenberg 8.2
Default theme implementation for a Gutenberg text field.
To override output, copy the "field-gutenberg-text.html.twig" from the templates directory to your theme's directory and customize it, just like customizing other Drupal templates such as page.html.twig or node.html.twig.
Available variables:
- attributes: HTML attributes for the containing element.
- label_hidden: Whether to show the field label or not.
- title_attributes: HTML attributes for the title.
- label: The label for the field.
- multiple: TRUE if a field can contain multiple items.
- items: List of all the field items. Each item contains:
- attributes: List of HTML attributes for each item.
- content: The field item's content.
- entity_type: The entity type to which the field belongs.
- field_name: The name of the field.
- field_type: The type of the field.
- label_display: The display settings for the label.
See also
File
templates/field-gutenberg-text.html.twigView source
- {#
- /**
- * @file
- * Default theme implementation for a Gutenberg text field.
- *
- * To override output, copy the "field-gutenberg-text.html.twig" from the templates directory
- * to your theme's directory and customize it, just like customizing other
- * Drupal templates such as page.html.twig or node.html.twig.
- *
- * Available variables:
- * - attributes: HTML attributes for the containing element.
- * - label_hidden: Whether to show the field label or not.
- * - title_attributes: HTML attributes for the title.
- * - label: The label for the field.
- * - multiple: TRUE if a field can contain multiple items.
- * - items: List of all the field items. Each item contains:
- * - attributes: List of HTML attributes for each item.
- * - content: The field item's content.
- * - entity_type: The entity type to which the field belongs.
- * - field_name: The name of the field.
- * - field_type: The type of the field.
- * - label_display: The display settings for the label.
- *
- * @see template_preprocess_field_gutenberg_text()
- *
- * @ingroup themeable
- */
- #}
- {% for item in items %}
- {{- item.content -}}
- {% endfor %}