{% load cms_tags %}
<div{% if instance.extra_css_classes %}class="{{ instance.extra_css_classes }}"{% endif %}>
    <ul class="nav nav-tabs">
        {% for plugin in instance.child_plugin_instances %}
            <li {% if forloop.first %}class="active"{% endif %}>
                <a href="#{{ plugin.get_tabid }}" data-toggle="tab">{{ plugin.title }}</a></li>
        {% endfor %}
    </ul>

    <div class="tab-content">
        {% for plugin in instance.child_plugin_instances %}
            <div class="tab-pane{% if forloop.first %} active{% endif %}" id="{{ plugin.get_tabid }}">
                {% render_plugin plugin %}
            </div>
        {% endfor %}
    </div>
</div>
