{% assign collection_list = site.collections %} {% assign ordered = '' | split: '' %} {% assign endered = '' | split: '' %} {% assign unorder = '' | split: '' %} {% for collection in collection_list %} {% unless collection.label == 'posts' or collection.docs.size == 0 %} {% if collection.tab-order %} {% if collection.tab-order < 0 %}{% assign endered = endered | push: collection %} {% else %}{% assign ordered = ordered | push: collection %} {% endif %} {% else %}{% assign unorder = unorder | push: collection %} {% endif %} {% endunless %} {% endfor %} {% assign ordered = ordered | sort: 'tab-order' %} {% assign endered = endered | sort: 'tab-order' | reverse %} {% assign collection_list = ordered | concat: unorder | concat: endered %} {% for collection in collection_list %} {% capture tab_class %}ui {% if forloop.first %}active {% endif %}inverted tab segment{% endcapture %}
 
 
{% endfor %} {%- comment %} these fixed items (search & collection tabs) need to be above the tab segments {% endcomment -%}