bootstrap-dropdown.html.twig in Open Social 8.2
Same filename and directory in other branches
- 8.9 themes/socialbase/templates/form/bootstrap-dropdown.html.twig
- 8 themes/socialbase/templates/form/bootstrap-dropdown.html.twig
- 8.3 themes/socialbase/templates/form/bootstrap-dropdown.html.twig
- 8.4 themes/socialbase/templates/form/bootstrap-dropdown.html.twig
- 8.5 themes/socialbase/templates/form/bootstrap-dropdown.html.twig
- 8.6 themes/socialbase/templates/form/bootstrap-dropdown.html.twig
- 8.7 themes/socialbase/templates/form/bootstrap-dropdown.html.twig
- 8.8 themes/socialbase/templates/form/bootstrap-dropdown.html.twig
Default theme implementation to display a Bootstrap Dropdown component.
Available variables:
- alignment: (optional) The alignment of the dropdown menu.
- attributes: An array of HTML attributes intended to be added to the main container tag of this template.
- items: The dropdown menu items.
- toggle: The toggle element.
File
themes/socialbase/templates/form/bootstrap-dropdown.html.twigView source
- {#
- /**
- * @file
- * Default theme implementation to display a Bootstrap Dropdown component.
- *
- * Available variables:
- * - alignment: (optional) The alignment of the dropdown menu.
- * - attributes: An array of HTML attributes intended to be added to the main
- * container tag of this template.
- * - items: The dropdown menu items.
- * - toggle: The toggle element.
- *
- * @ingroup templates
- */
- #}
-
- {%
- set classes = [
- 'btn-group',
- 'dropdown',
- alignment == 'up' ? 'dropup',
- alignment == 'right' ? 'btn-group--primary',
- btn_context == 'operations' ? 'btn-group--operations',
- ]
- %}
- <div{{ attributes.addClass(classes) }}>
- {{ toggle }}
- {{ items }}
- </div>