container.html.twig in Zircon Profile 8
Same filename in this branch
Same filename and directory in other branches
Default theme implementation 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
1 theme call to container.html.twig
- forum_help in core/
modules/ forum/ forum.module - Implements hook_help().
File
core/modules/system/templates/container.html.twigView source
- {#
- /**
- * @file
- * Default theme implementation 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()
- *
- * @ingroup themeable
- */
- #}
- {%
- set classes = [
- has_parent ? 'js-form-wrapper',
- has_parent ? 'form-wrapper',
- ]
- %}
- <div{{ attributes.addClass(classes) }}>{{ children }}</div>