{% if offset >= total_results %} {% set current_page = 1 %} {% else %} {% set current_page = ((offset / limit) + 1) | int %} {% endif %} {% if total_results > limit %}