You are here

filebrowser-container-column.html.twig in Filebrowser 8.2

Same filename and directory in other branches
  1. 3.x templates/filebrowser-container-column.html.twig

Theme override of a container used to wrap child elements. For Flebrowser this template displays one gid of the icon grid display

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.

File

templates/filebrowser-container-column.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Theme override of a container used to wrap child elements.
  5. * For Flebrowser this template displays one gid of the icon grid display
  6. *
  7. * Used for grouped form items. Can also be used as a theme wrapper for any
  8. * renderable element, to surround it with a <div> and HTML attributes.
  9. * See \Drupal\Core\Render\Element\RenderElement for more
  10. * information on the #theme_wrappers render array property, and
  11. * \Drupal\Core\Render\Element\container for usage of the container render
  12. * element.
  13. *
  14. * Available variables:
  15. * - attributes: HTML attributes for the containing element.
  16. * - children: The rendered child elements of the container.
  17. * - has_parent: A flag to indicate that the container has one or more parent
  18. containers.
  19. *
  20. * @see template_preprocess_container()
  21. */
  22. #}
  23. {%
  24. set classes = [
  25. has_parent ? 'js-form-wrapper',
  26. has_parent ? 'form-wrapper',
  27. ]
  28. %}
  29. <div style="width:{{ width }}%;"{{ attributes.addClass(classes) }}>{{ children }}</div>