[Answer]-Forloop generating output for unordered list

1👍

This is only dirty fix.. It MAY not work but as I can see You have an error. Below corrected template:

<!-- language-all: lang-html -->
<div class="standard-tabs">
        <!-- Tabs Headings -->  
        <ul class="tabs">
{% for vdev in pool.vdevs.all %}
        {% if forloop.first %}
                <li class="active"><a href="#{{ vdev.name }}">{{ vdev.name }}</a></li>
        {% else %}
                <li><a href="#{{ vdev.name }}">{{ vdev.name }}</a></li>
        {% endif %}
{% endfor %}
        </ul>

        <!-- Tab Content -->
        <div class="tabs-content">
            {% for vdev in pool.vdevs.all %}
                <div id="#{{ vdev.name }}" class="with-padding">
                    {% for disk in vdev.disks.all %}
                        {{ disk.serial }} <br />
                    {% endfor %}
                </div>
            {% endfor %}
        </div>
</div>
👤WBAR

Leave a comment