W3cubDocs

/Drupal 8

container.html.twig

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 \Drupal\Core\Render\Element\RenderElement for more information on the #theme_wrappers render array property, and \Drupal\Core\Render\Element\container for usage of the container render element.

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

template_preprocess_container()

File

core/modules/system/templates/container.html.twig

Related topics

Theme system overview
Functions and templates for the user interface that themes can override.

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!modules!system!templates!container.html.twig/8.1.x