views-bootstrap-dropdown.html.twig in Views Bootstrap 8.3
{#
Render a view containing a list of rows as a drop-down.
@see http://getbootstrap.com/javascript/#dropdowns
#}
<div id="{{ id }}" {{ attributes.addClass(classes) }}>
<button {{ button.attributes }} type="button" id="{{ id }}-dropdown" data-toggle="dropdown">
{{ button.text }}
<span class="caret"></span>
</button>
<ul{{ list.attributes }} role="menu" aria-labelledby="{{ id }}-dropdown">
{% for key, row in rows %}
<li{{ row.attributes }}>{{- row.content|render|striptags('<a><img>')|trim|raw -}}</li>
{% endfor %}
</ul>
</div>
File
templates/views-bootstrap-dropdown.html.twig
View source
- {#
- Render a view containing a list of rows as a drop-down.
- @see http://getbootstrap.com/javascript/#dropdowns
- #}
- <div id="{{ id }}" {{ attributes.addClass(classes) }}>
- <button {{ button.attributes }} type="button" id="{{ id }}-dropdown" data-toggle="dropdown">
- {{ button.text }}
- <span class="caret"></span>
- </button>
- <ul{{ list.attributes }} role="menu" aria-labelledby="{{ id }}-dropdown">
- {% for key, row in rows %}
- <li{{ row.attributes }}>{{- row.content|render|striptags('<a><img>')|trim|raw -}}</li>
- {% endfor %}
- </ul>
- </div>