<nav id="tabs">
    <ul>
        {% for tabId, tab in tabs %}
            {% if tab %}
                {% set tabIsSelected = ((selectedTab is not defined and loop.first) or (selectedTab is defined and selectedTab == tabId)) -%}
                <li><a id="tab-{{ tabId }}" class="tab{% if tabIsSelected %} sel{% endif %}{% if tab.class is defined %} {{ tab.class }}{% endif %}" href="{{ tab.url }}" title="{{ tab.label }}">{{ tab.label }}</a></li>
            {% endif %}
        {% endfor %}
    </ul>
</nav>
