Drop the div for parent-less containers
This commit is contained in:
parent
e1f2d23c93
commit
eeeed27e97
1 changed files with 25 additions and 0 deletions
25
agaric/templates/form/container--no-parent.html.twig
Normal file
25
agaric/templates/form/container--no-parent.html.twig
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
{#
|
||||||
|
/**
|
||||||
|
* @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 \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 template_preprocess_container()
|
||||||
|
*
|
||||||
|
* Because stable's implementation only adds classes when the has_parent flag
|
||||||
|
* is true, we should be safe skipping the div when there's no parent.
|
||||||
|
*/
|
||||||
|
#}
|
||||||
|
{{ children }}
|
Loading…
Reference in a new issue