eleven-8.x-1.0-beta5/eleven/templates/component/navigation/dropbutton/links--dropbutton.html.twig
eleven/templates/component/navigation/dropbutton/links--dropbutton.html.twig
{% if links -%}
{%- if heading -%}
{%- if heading.level -%}
<{{ heading.level }}{{ heading.attributes }}>{{ heading.text }}</{{ heading.level }}>
{%- else -%}
<h2{{ heading.attributes }}>{{ heading.text }}</h2>
{%- endif -%}
{%- endif -%}
{% set removeclasses = [
'operations',
'clearfix',
]
%}
{# We dont want to remove dropbuttons from views but everyelse ... #}
{% if view_edit %}
<ul{{ attributes.removeclass(removeclasses) }}>
{%- for item in links -%}
<li{{ item.attributes }}>
foo
{%- if item.link -%}
{{ item.link }}
{%- elseif item.text_attributes -%}
<span{{ item.text_attributes }}>{{ item.text }}</span>
{%- else -%}
{{ item.text }}
{%- endif -%}
</li>
{%- endfor -%}
</ul>
{% else %}
{{ attach_library('eleven/nav.dropbutton.smallbutton') }}
{% for item in links %}
{% if item.link %}
{% set helptext %}
{{item.link['#title'] }} {{item.link['#options'].attributes.title}}
{% endset %}
<a href="{{item.link['#url']}}" class="smallbtn smallbtn--{{ item.attributes.class }}"
title="{{item.link['#options'].attributes.title}}"
data-helptext="{{ helptext }} "
>{{item.link['#title'] }} </a>
{% elseif item.text_attributes %}
{{ item.text }}
{% else %}
{{ item.text }}
{% endif %}
{%- endfor -%}
{% endif %}
{%- endif %}
