add {% endif %}

i forget to add `{% endif %}` in link paginate