{% include "mydata_templates/pagination.html" %} {% if isNecessary %} {% else %} {# no pager needed #} {% endif %}