{% load cms_tags %}

<a href="{{ instance.get_link_url }}"
   class="
        {% if instance.type == 'btn' %}
            btn{% if instance.btn_context %} btn-{{ instance.btn_context }}{% endif %}
            {% if instance.btn_size %} btn-{{ instance.btn_size }}{% endif %}
            {% if instance.btn_block %} btn-block{% endif %}
        {% else %}
            {% if instance.txt_context %}txt-{{ instance.txt_context }}{% endif %}
        {% endif %}
        {% if instance.classes %} {{ instance.classes }}{% endif %}"
    {% if instance.type == 'btn' %}
        role="button"
    {% endif %}>{% spaceless %}
    {% if instance.icon_left %}{% with icon_class=instance.icon_left %}{% include 'aldryn_bootstrap3/plugins/includes/icon.html' %}{% endwith %}{% endif %}

    {{ instance.label }}

    {% for plugin in instance.child_plugin_instances %}
        {% render_plugin plugin %}
    {% endfor %}

    {% if instance.icon_right %}{% with icon_class=instance.icon_right %}{% include 'aldryn_bootstrap3/plugins/includes/icon.html' %}{% endwith %}{% endif %}
{% endspaceless %}</a>
