{% macro render_items_count(total_count, first_item = none, last_item = none) %} {% if last_item is none %} {% set last_item = total_count %} {% endif %} {% if first_item is none %} {% set first_item = last_item %} {% endif %} {% if total_count > 0 %} Items: {{ first_item }} - {{ last_item }} out of {{ total_count }} {% else %} No item {% endif %} {% endmacro %}