{% if swportvlans.0 %}
Swports on Vlan{{ swportvlans.0.vlan.vlan }} on {{ swportvlans.0.interface.netbox }}
{% for swportvlan in swportvlans %}
{% if swportvlan.interface.has_children %} {% else %} {% if forloop.last %} {% else %} {% endif %} {% endif %} {{ swportvlan.interface.netbox.sysname }} [{{ swportvlan.interface.ifname }}] {% if swportvlan.interface.ifalias %} ({{ swportvlan.interface.ifalias }}) {% endif %} {% if swportvlan.interface.to_netbox %} {% if swportvlan.interface.trunk %} {% else %} {% endif %} {{ swportvlan.interface.to_netbox }} {% else %} {% if swportvlan.interface.to_interface %} {% if swportvlan.interface.trunk %} {% else %} {% endif %} {{ swportvlan.interface.to_interface.netbox }} {% else %} ({{ swportvlan.interface.ifalias }}) {% if swportvlan.interface.trunk %} (trunk) {% endif %} {% endif %} {% endif %}
{% endfor %}
{% endif %}