Fix build errors with only 1 page of press articles

The pagination macro seems to assume there is >1 page of items but when
doing a partial build there may only be one. This skips rendering
pagination altogether when it's not needed.
This commit is contained in:
Jerome Charaoui 2022-01-19 20:33:11 -05:00
parent d08644ab24
commit c4bdeb40c3

View File

@ -49,7 +49,9 @@
<tbody>
{% from "macros/pagination.html" import render_pagination %}
{% from "macros/press.html" import render_snippet %}
{% if this.pagination.pages > 1 %}
{{ render_pagination(this.pagination) }}
{% endif %}
{% for item in this.pagination.items %}
{{ render_snippet(item, this.alt) }}
{% endfor %}