{% with isDesc=(url_query.get('sortDir') == 'desc') %} {% for field in controller.inline_fields %} {% if controller.is_field_sortable(field, controller_view.infinite_scroll) %} {{ field }} {% if url_query.get('sort') == field %} {% if isDesc %} arrow_upward {% else %} arrow_downward {% endif %} {% endif %} {% else %} {{ field }} {% endif %} {% endfor %} {% endwith %}