mirror of
https://github.com/torproject/tpo.git
synced 2024-11-23 09:59:56 +00:00
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:
parent
d08644ab24
commit
c4bdeb40c3
@ -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 %}
|
||||
|
Loading…
Reference in New Issue
Block a user