Change your if
statements to just check if post.previous
exists.
{% if post.previous %}
<span class="page-nav-item">
<a rel="prev" href="{{ post.previous.url }}" title="View {{ post.previous.title }}">← View previous article</a>
</span>
{% endif %}
{% if post.next %}
<span class="page-nav-item">
<a rel="next" href="{{ post.next.url }}" title="View {{ post.next.title }}">View next article →</a>
</span>
{% endif %}
Andrew
2010-01-10 21:56:38