{% if page_obj.previous_link %} {% with "top" as position %} {% include "motion/bits/pagination.html" %} {% endwith %} {% endif %} {% include "motion/bits/pagination.html" %}