{% for columnDisplayName, columnName in config %}
    {%- if not with_sort or has_prefix(columnName, '*')-%} {# 停用搜尋 #}
        <th class="footable-sortable
        {%- if loop.first %} footable-first-column{% endif -%}
        {%- if loop.last %} footable-last-column{% endif -%}
        ">{{ columnDisplayName|trans({}, 'forms') }}</th>
    {%- else -%}
        <th data-href="{{ path(_config['route']['sort'], {sort: columnName|filter_prefix, slug: app.session.get('Site').slug}|merge(app.request.attributes.get('_route_params'))) }}" class="footable-sortable
        {%- if loop.first %} footable-first-column{% endif -%}
        {%- if loop.last %} footable-last-column{% endif -%}
        {%- if sort and (sort[0] == (columnName|filter_prefix))%} {{ sort[1]?'footable-sorted':'footable-sorted-desc' }}{% endif -%}
        ">{{ columnDisplayName|trans({}, 'forms') }} <span class="footable-sort-indicator"></span></th>
    {%- endif -%}
{% endfor %}