entity-extra-field.html.twig in Entity Extra Field 8
Same filename and directory in other branches
Default theme implementation to entity extra field.
Available variables:
- content: The content of the extra field.
- attributes: array of HTML attributes populated by modules, intended to
be added to the main container tag of this template.
- id: A valid HTML ID and guaranteed unique.
- content_attributes: Same as attributes, except applied to the main content tag that appears in the template.
See also
1 theme call to entity-extra-field.html.twig
- EntityExtraField::build in src/
Entity/ EntityExtraField.php - Build the extra field.
File
templates/entity-extra-field.html.twigView source
- {#
- /**
- * @file
- * Default theme implementation to entity extra field.
- *
- * Available variables:
- * - content: The content of the extra field.
- * - attributes: array of HTML attributes populated by modules, intended to
- * be added to the main container tag of this template.
- * - id: A valid HTML ID and guaranteed unique.
- * - content_attributes: Same as attributes, except applied to the main content
- * tag that appears in the template.
- *
- * @see template_preprocess_entity_extra_field()
- *
- * @ingroup themeable
- */
- #}
-
- <div{{ attributes }}>
- {% set label = label|render %}
-
- {% if label %}
- <h2{{ title_attributes }}>
- {{ label }}
- </h2>
- {% endif %}
-
- <div{{ content_attributes }}>
- {{ content }}
- </div>
- </div>