container.html.twig in Open Social 8.3
Same filename and directory in other branches
- 8.9 themes/socialbase/templates/system/container.html.twig
- 8 themes/socialbase/templates/system/container.html.twig
- 8.2 themes/socialbase/templates/system/container.html.twig
- 8.4 themes/socialbase/templates/system/container.html.twig
- 8.5 themes/socialbase/templates/system/container.html.twig
- 8.6 themes/socialbase/templates/system/container.html.twig
- 8.7 themes/socialbase/templates/system/container.html.twig
- 8.8 themes/socialbase/templates/system/container.html.twig
Theme override of a container used to wrap child elements.
Used for grouped form items. Can also be used as a theme wrapper for any renderable element, to surround it with a <div> and HTML attributes. See the Form API reference for more information on the #theme_wrappers render array property.
Available variables:
- attributes: HTML attributes for the containing element.
- children: The rendered child elements of the container.
- has_parent: A flag to indicate that the container has one or more parent containers.
See also
File
themes/socialbase/templates/system/container.html.twigView source
-
- {#
- /**
- * @file
- * Theme override of a container used to wrap child elements.
- *
- * Used for grouped form items. Can also be used as a theme wrapper for any
- * renderable element, to surround it with a <div> and HTML attributes.
- * See the @link forms_api_reference.html Form API reference @endlink for more
- * information on the #theme_wrappers render array property.
- *
- * Available variables:
- * - attributes: HTML attributes for the containing element.
- * - children: The rendered child elements of the container.
- * - has_parent: A flag to indicate that the container has one or more parent
- containers.
- *
- * @see template_preprocess_container()
- */
- #}
-
- {%
- set classes = [
- not attributes.hasClass('toolbar-menu-administration') ? 'form-group',
- has_parent ? 'js-form-wrapper form-wrapper',
- exposed_form ? 'views-exposed-form__actions',
- attributes.hasClass('field--name-field-comment-body') ? 'media-body',
- attributes.hasClass('field--name-message') ? 'media-body',
- attributes.hasClass('more-link') ? 'btn btn-flat',
- ]
- %}
- {% if bare %}
- {{ children }}
- {% else %}
- <div{{ attributes.addClass(classes) }}>
- {{ children }}
- </div>
- {% endif %}