Only add a next or previous link if such a news post exists

This commit is contained in:
Sebastian Zhorel 2020-01-02 18:09:32 +01:00
parent ec398dd956
commit ba6f2aa33c
1 changed files with 2 additions and 2 deletions

View File

@ -22,12 +22,12 @@
<table align="center" style="margin-top: 25px;">
<tr>
<th class="pagenav_prev">
<a href="{{ page.previous.url }}">&lt; Prev</a>
{% if page.previous %}<a href="{{ page.previous.url }}">{% endif %}&lt; Prev{% if page.previous %}</a>{% endif %}
</th>
<td width="50">&nbsp;
</td>
<th class="pagenav_next">
<a href="{{ page.next.url }}">Next &gt;</a>
{% if page.next %}<a href="{{ page.next.url }}">{% endif %}Next &gt;{% if page.next %}</a>{% endif %}
</th>
</tr>
</table>